[go: up one dir, main page]

JP4118695B2 - Numerical control system - Google Patents

Numerical control system Download PDF

Info

Publication number
JP4118695B2
JP4118695B2 JP2003013932A JP2003013932A JP4118695B2 JP 4118695 B2 JP4118695 B2 JP 4118695B2 JP 2003013932 A JP2003013932 A JP 2003013932A JP 2003013932 A JP2003013932 A JP 2003013932A JP 4118695 B2 JP4118695 B2 JP 4118695B2
Authority
JP
Japan
Prior art keywords
data
network
control device
numerical control
communication
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.)
Expired - Fee Related
Application number
JP2003013932A
Other languages
Japanese (ja)
Other versions
JP2004227261A (en
Inventor
修也 佐野
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2003013932A priority Critical patent/JP4118695B2/en
Publication of JP2004227261A publication Critical patent/JP2004227261A/en
Application granted granted Critical
Publication of JP4118695B2 publication Critical patent/JP4118695B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Numerical Control (AREA)
  • Small-Scale Networks (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、工作機械や産業機械における数値制御システムに関するものである。
【0002】
【従来の技術】
工作機械や産業機械における数値制御システムは、数値制御装置やモーションコントローラ等のマスター制御装置が、サーボモータ等を駆動する駆動制御装置、DI/O接点やセンサーデータの制御装置などのスレーブ制御装置を制御するように構成される。以下に、工作機械を例に挙げて従来の数値制御システムの概要を説明する。
【0003】
工作機械は、一般に、ワークを加工する加工機と、搬送路に乗せられた未加工ワークを加工機に搬入し、加工済みワークを加工機から受け取り搬出する搬送機とによって構成されている。
【0004】
加工機は、例えば、搬送路から送られてきたワークを固定するテーブルと、このテーブルを移動操作して直交座標上での位置決めを行う2つのサーボモータと、テーブルの上部に設置され、ワークの加工を行う主軸モータと、2つのサーボモータと主軸モータとをそれぞれ個別に制御する3台の駆動制御装置と、表示器操作盤とを備えている。
【0005】
そして、3台の駆動制御装置は、数値制御装置に設けられる第1通信ポートにディジーチェーン接続方式で接続されている。すなわち、数値制御装置は、ディジーチェーン接続の1本の通信線を介して各駆動制御装置に対し位置、速度、トルクなどの指令を与える。各駆動制御装置は、ディジーチェーン接続の1本の通信線を介して、位置フィードバック、速度フィードバック、トルクフィードバックなどの状態量や、制御機能の状態、アラーム情報などを数値制御装置に送るようになっている。
【0006】
次に、上記の搬送機は、例えば、ベルトなどの搬送路を駆動するサーボモータと、ワークを検出するために搬送路の所定場所に配置される複数のポジションセンサと、搬送路上のワークを加工機に搬入し、排出するワーク搬出入装置と、ワーク搬出入装置を駆動するサーボモータと、上記の複数のポジションセンサの出力信号を取り込むDI/O制御装置と、上記2つのサーボモータを個別に制御する2台の駆動制御装置とを備えている。
【0007】
そして、この2台の駆動制御装置は、数値制御装置に設けられる第2通信ポートにディジーチェーン接続方式で接続され、また、上記のDI/O制御装置は、数値制御装置に設けられる第3通信ポートに接続されている。数値制御装置は、DI/O制御装置からの信号をシーケンス制御し、ワークの位置によって上記第3通信ポートにディジーチェーン接続される2台の各駆動制御装置に出す指令(位置、速度、トルクなど)のタイミングを制御し、指令を与えるようになっている。
【0008】
また、上記表示器操作盤は、数値制御装置に設けられる第4通信ポートに接続されている。すなわち、数値制御装置が表示器操作盤の表示器に対し加工プログラムやパラメータ、制御状態等を送ると、表示器は送られてきたデータを表示する。また、操作盤は入力されたデータを数値制御装置に送信するようになっている。
【0009】
なお、工作機械では、加工機が備える複数の駆動制御装置は、一般に、搬送機が備える複数の駆動制御装置よりも高速かつ高精度にサーボモータを駆動、制御する必要があるとされている。
【0010】
以上のように、工作機械を構成する従来の数値制御システムは、数値制御装置が4つの通信ポートを備え、加工機が備える複数の駆動制御装置、搬送機が備える複数の駆動制御装置およびDI/O制御装置、表示器操作盤をそれぞれ独立に制御等するように構成されている。但し、システムによっては、DI/O制御装置と表示器操作盤は、複数の駆動制御装置と同様に、数値制御装置にディジーチェーン接続方式で接続される場合もある。この場合には、数値制御装置は2つまたは3つの通信ポートを備えることになる。
【0011】
そして、数値制御装置との通信線は、数値制御装置から各装置への下り送信線と、各装置から数値制御装置への上り送信線とで構成されている。このとき、ディジーチェーン接続で各装置を接続した場合、上り送信線には複数の装置からデータが送信されるので、システムとしての通信周期を時分割して各装置の送信タイミングを決定し、各装置は、通信周期カウンタによってその送信タイミングを生成し、送信データの衝突が発生しないようにしている。
【0012】
【発明が解決しようとする課題】
しかしながら、数値制御装置を起点として様々な制御装置で構成されるネットワークを制御する場合、従来の数値制御システムでは、数値制御装置に複数のネットワークをそれぞれ直接接続するので、複数の通信線を長く這わさなければならないという問題があった。
【0013】
また、数値制御装置は、制御するネットワークの数だけ通信ポートを持つ必要があるので、通信制御回路、ドライバ部、レシーバ部などの部品を制御するネットワークの数だけ持たなくてはならなかった。
【0014】
また、各制御装置から数値制御装置にデータを送信する場合は、各制御装置は、データの衝突を回避するため、時分割された送信タイミングに十分な余裕を取る必要があるが、リアルタイムシステムにおいては、各制御装置が時分割でデータを送信する場合にデータの干渉が発生する場合がある。
【0015】
すなわち、リアルタイムシステムにおいては、制御装置の高性能化のために制御周期の高速化が不可欠であるが、制御周期と通信周期は密接な関係があり、制御周期のみが高速でも、通信周期が低速な場合にはシステムとしての性能が向上しない。このため、通信周期を高速化させる必要が生じるが、通信周期が高速になってくると、伝送路の遅延や通信ポートでの同期パターン抽出の遅延、ディジーチェーン接続のため必要となるデータのバッファリングによる遅延など、相当に大きな遅延が生ずる。
【0016】
例えば、現在最も高速な通信媒体である光ファイバを用いて16台の駆動制御装置をディジーチェーン接続した場合、光の伝播速度は5n秒/m程度であるので、光ファイバ長を20mとすると、最終段に接続された駆動制御装置に数値制御装置のデータが到達するまでに1.6μ秒の時間がかかる。この場合、かりに通信周期が125μ秒であるとすると、データの遅延は1.28%に達し、また通信周期が62.5μ秒であるとすると、データの遅延は2.59%にも達してしまう。その結果、各制御装置が時分割でデータを送信する場合、データの干渉が発生するという問題がある。
【0017】
さらに、通信周期が高速になってくると、ネットワークに接続される装置の処理能力の差が問題になってくる。前述のように各装置の制御周期と通信周期はシステムの性能に影響を与えるが、制御されるネットワークは、必ずしも高性能な装置だけで構成されるわけではない。つまり、高性能な装置のための高速な通信周期のデータを、性能がそれほど要らない低速な装置が送受信処理を行うことが生ずるので、低速な装置においてその他の処理を行う上で大きな負荷となる。
【0018】
加えて、ネットワーク上に送信されるデータが通信周期内の任意のタイミングに固定されるので、システムを緊急に停止させる非常停止情報などを送信しようとした場合、自装置が送信した後に発生した非常停止情報を送信するには、次の通信周期の送信タイミングを待たなければならず、通信周期による伝達遅れが発生してしまうという問題もある。
【0019】
この発明は、上記に鑑みてなされたもので、数値制御装置が1つの通信ポートによって、様々な制御装置で構成されるネットワークの複数個を制御することができる数値制御システムを得ることを目的とする。
【0020】
また、この発明は、ネットワークの遅延を正確に測定し、データの送信間隔を最小にする制御が行える数値制御システムを得ることを目的とする。
【0021】
さらに、この発明は、高速周期のデータと低速周期のデータとを並列に送信することが可能となる数値制御システムを得ることを目的とする。
【0022】
【課題を解決するための手段】
上記目的を達成するため、この発明にかかる数値制御システムは、少なくとも数値制御装置が配置される主ネットワークと、前記数値制御装置の指令を受けて制御動作を実施する1以上の制御装置が配置される1以上の従ネットワークとで構成され、転送レートと転送周期の一方または双方がネットワーク相互間で異なることがある数値制御システムにおいて、前記主ネットワークに対して前記1以上の従ネットワークをスター状に接続する節点に、または、前記主ネットワークに対して前記1以上の従ネットワークをディジーチェーン接続方式で接続する節点に、ネットワーク間で異なる転送レート、通信周期を制御し、ネットワーク相互間での1本の通信線を介した複数のシリアルデータの送受信を実現する分配手段が設けられているとともに、1つの転送路上に配置される複数の装置における最上位装置以下の各下位装置は、前記最上位装置に対し時分割で送信する送信タイミングを装置間の転送遅延値によって補正する手段を備えたことを特徴とする。
【0023】
この発明によれば、様々な制御装置で構成されるネットワークの複数個を、転送レート、通信周期の制御機能を持つ分配手段によってスター状に接続し、または、ディジーチェーン接続するので、数値制御装置が1つの通信ポートによって、様々な制御装置を制御することができる。このとき、分配手段が転送レート、通信周期の制御機能を持つので、各ネットワーク間の転送路の使用効率を上げることができ、また高速周期のデータと低速周期のデータとを並列に送信することが可能となる。さらに、転送遅延を測定する機能を付加することができるので、データの送信間隔を最小にする制御が行えるようになる。そして、各制御装置が送信タイミングを転送遅延値に基づき補正するようにしたので、データを衝突させることなく確実に送信することができる。また、衝突を防ぐために送信タイミング間に余分な空き時間を作る必要がないので、データを効率よく送信することが可能となる。
【0024】
【発明の実施の形態】
以下に添付図面を参照して、この発明にかかる数値制御システムの好適な実施の形態を詳細に説明する。
【0025】
実施の形態1.
図1は、この発明の実施の形態1である数値制御システムの構成を示すブロック図である。図1に示す数値制御システムは、3つのネットワーク(#1)1,(#2)2,(#3)3を、分配器4によってスター状に接続した構成である。ネットワーク(#1)1は、主ネットワークであって、数値制御装置11とこれに接続される制御装置12とが配置されている。数値制御装置11は通信線5を介して制御装置12に接続され、制御装置12は通信線6を介して分配器4に接続されている。
【0026】
ネットワーク(#2)2は、従ネットワークであって、3台の制御装置21,22,23が配置されている。3台の制御装置21,22,23は、ディジーチェーン接続の通信線8で接続され、制御装置21が通信線9を介して分配器4に接続されている。
【0027】
ネットワーク(#3)3は、従ネットワークであって、3台の制御装置31,32,33が配置されている。3台の制御装置31,32,33は、ディジーチェーン接続の通信線10で接続され、制御装置31が通信線11を介して分配器4に接続されている。
【0028】
ここで、各ネットワーク相互間では、転送レートと通信周期の一方または双方が異なる場合があるが、この実施の形態1では、次のようになっている。すなわち、ネットワーク(#1)1,(#2)2,(#3)3の転送レートを、Ta,Tb,Tcとすると、Ta=Tb=Tcである。また、ネットワーク(#1)1,(#2)2,(#3)3の通信周期を、Pa,Pb,Pcとすると、Pa=2Pb=2Pcである。そして、ネットワーク群内で最大の転送レートを基準転送レートTとすると、T=Ta=Tb=Tcである。また、ネットワーク群内で最小の通信周期を基準通信周期Pとすると、P=Paである。
【0029】
図1に示すスター接続の節点に配置される分配器4は、ネットワーク相互間のデータの分配、集約操作やネットワーク相互間の転送レートの違いを変換する装置である。例えば、図2に示すように構成される。図2は、図1に示す分配器の構成を示すブロック図である。
【0030】
図2において、レシーバ35にはネットワーク#1からのシリアルデータが入力される。受信部36は、レシーバ35から入力されるシリアルデータをパラレルデータに変換し、バッファ37と同期パターン抽出部40とに出力する。バッファ37は、入力されるパラレルデータを正しいパルス幅に修正してバッファリングし、ネットワーク#2に転送するデータを送信部38に渡し、ネットワーク#3に転送するデータを送信部46に渡す。
【0031】
同期パターン抽出部40は、受信部36にてパラレルに変換されたデータの中に含まれる同期信号を抽出し、同期信号を生成する。生成した同期信号は、通信周期Pカウンタ41に送られる。通信周期Pカウンタ41は、入力される同期信号に基づきネットワーク群の基準通信周期Pを生成する。これによって、数値制御装置11と分配器4との同期が取られるようになる。生成された基準通信周期Pは、通信周期Paカウンタ42と基準タイミング制御部43とに送られる。
【0032】
通信周期Paカウンタ42は、入力される基準通信周期Pに基づき数値制御装置11と同期のとれたネットワーク#1で使用される通信周期Paを生成する。生成された通信周期Paは、送信部53に送られる。
【0033】
基準タイミング制御部43は、入力される基準通信周期Pに基づきネットワーク#1の通信周期Paの基準タイミングに対するネットワーク#2およびネットワーク#3それぞれの基準タイミングの位相を制御し、その制御した位相の基準通信周期Pを通信周期Pbカウンタ44と通信周期Pcカウンタ45とに与える。
【0034】
通信周期Pbカウンタ44は、入力される基準通信周期Pに基づきネットワーク#2で使用される通信周期Pbを生成する。生成された通信周期Pbは、送信部38に送られる。その結果、送信部38は、バッファ37から渡されたパラレルデータを入力される通信周期Pbのタイミングにてシリアルデータに変換し、ドライバ39を介してネットワーク#2に送出する。
【0035】
通信周期Pcカウンタ45は、入力される基準通信周期Pに基づきネットワーク#3で使用される通信周期Pcを生成する。生成された通信周期Pcは、送信部46に送られる。その結果、送信部46は、バッファ37から渡されたパラレルデータを入力される通信周期Pcのタイミングにてシリアルデータに変換し、ドライバ47を介してネットワーク#3に送出する。
【0036】
また、レシーバ48にはネットワーク#2からのシリアルデータが入力される。受信部49は、レシーバ48から入力されるシリアルデータをパラレルデータに変換し、バッファ52に出力する。また、レシーバ50にはネットワーク#3からのシリアルデータが入力される。受信部51は、レシーバ50から入力されるシリアルデータをパラレルデータに変換し、バッファ52に出力する。
【0037】
バッファ52は、入力される2系統のパラレルデータを正しいパルス幅に修正してバッファリングし、送信部58に渡す。その結果、送信部38は、バッファ52から渡された2系統のパラレルデータを通信周期Paカウンタ42から入力される通信周期Paのタイミングにてシリアルデータに変換し、ドライバ54を介してネットワーク#1に送出する。
【0038】
次に、図3は、図1に示す分配器4がデータの送信タイミングを制御する動作を説明するタイムチャートである。図3において、ネットワーク#1の通信周期Pa(1)に対して、ネットワーク#2の通信周期Pb(4)とネットワーク#3の通信周期Pc(7)は、それぞれ2倍の周期になっている。また、ネットワーク#2の通信周期Pb(4)とネットワーク#3の通信周期Pc(7)は、それぞれ交互に入れ替わる関係になっている。
【0039】
図3(2)において、データ1040は、数値制御装置11からネットワーク#1の制御装置12へのデータである。これは、分配器4を介さずに直接ネットワーク#1の制御装置12に送られる。
【0040】
データ1050は、数値制御装置11からネットワーク#2の制御装置21,22,23へのデータである。分配器4は、データ1050のヘッダー部分に含まれるネットワーク#2を指定するアドレス情報を見て、図3(5)に示すデータ2040を生成し、ネットワーク#2の制御装置21,22,23に送信する。
【0041】
次の通信周期Pa(1)でのデータ1060は、数値制御装置11からネットワーク#3の制御装置31,32,33へのデータである。分配器4は、データ1060のヘッダー部分に含まれるネットワーク#3を指定するアドレス情報を見て、図3(8)に示すデータ3040を生成し、ネットワーク#3の制御装置31,32,33に送信する。
【0042】
また、図3(6)において、ネットワーク#2の制御装置21,22,23から数値制御装置11に送信されるデータ2050,2060,2070は、分配器4にて1つのパケットにまとめられ、図3(3)に示すデータ1080としてネットワーク#1に送信される。
【0043】
同様に、図3(9)において、ネットワーク#3の制御装置31,32,33から数値制御装置11に送信されるデータ3050,3060,3070は、分配器4にて1つのパケットにまとめられ、図3(3)に示すデータ1070としてネットワーク#1に送信される。
【0044】
このように、分配器4は、ネットワーク#2,#3の通信周期の位相を上述のように制御しているので、ネットワーク#1では、ネットワーク#2,#3のデータを交互に送信、受信することができるようになり、転送路を効率的に使用することが可能となる。
【0045】
図2に示すような分配器を用いた場合、分配器はパケット単位でデータの集約・分配を行うので、通信周期に依存するデータ転送遅延が発生する。次に、図4〜図7を参照してこのデータ転送遅延の発生しないシステムについて説明する。なお、図4は、図1に示す数値制御装置11の通信ポートの構成を示すブロック図である。図5は、図4に示す数値制御装置11の通信ポートにて行われるシリアルデータの合成を説明するタイムチャートである。図6は、図1に示す制御装置12,21〜23,31〜33の通信ポートの構成を示すブロック図である。図7は、図1に示す分配器4の通信ポートの構成を示すブロック図である。
【0046】
図4において、図示しないCPU等から与えられる基準転送レート(転送クロック)は、最小繰り返しデータ出現周期カウンタ57と通信周期基準タイミング生成部58とに入力される。最小繰り返しデータ出現周期カウンタ57は、入力される基準転送レート(転送クロック)によって並列化するシリアルデータが周期的に出現する最小周期をカウントし、そのカウント値をビットデータ挿入タイミング生成部59に出力する。ビットデータ挿入タイミング生成部59は、最小繰り返しデータ出現周期カウンタ57からのカウンタ値をデコードし、並列化するシリアルデータを挿入するタイミングを生成する。
【0047】
生成された挿入タイミングは、AND回路69,70,71の一方の入力端と、ネットワーク#1,#2,#3からのデータ(シリアルデータ)を受信する受信部1−20,2−20,3−20とに入力される。AND回路69,70,71の他方の入力端には、ネットワーク#1,#2,#3に与えるデータ(シリアルデータ)を生成する送信部1−10,2−10,3−10の出力が入力される。AND回路69,70,71の出力は、OR回路72を介してOR回路74の一方の入力端に入力される。
【0048】
通信周期基準タイミング生成部58は、入力される基準転送レート(転送クロック)によって規定周期のカウンタを動作させ、基準となる通信周期のタイミングを生成し、基準ビットパターン挿入部73に出力する。基準ビットパターン挿入部73は、通信周期基準タイミング生成部58が発生するタイミングに従って基準通信周期毎にシリアルデータに挿入する基準ビットパターンを発生し、OR回路74の他方の入力端に出力する。OR回路74の出力は、ドライバ75を介してネットワーク#1,#2,#3に送られる。また、ネットワーク#1,#2,#3からのデータ(シリアルデータ)は、レシーバ64を介して受信部1−20,2−20,3−20に並列に入力される。
【0049】
送信部1−10,2−10,3−10は、同様の構成である。送信タイミング生成部61は、図示しないCPU等から与えられる送信タイミングと通信周期のカウンタ値とを比較し、一致した場合に送信タイミング信号を生成し、データ送信部62に与える。データ送信部62は、図示しないCPU等から与えられるパラレルデータをシリアルデータに変換し、それを送信タイミング生成部61から与えられる送信タイミングに同期してシリアルデータ変調部63に与える。シリアルデータ変調部63は、入力されたシリアルデータをNRZ、NRZI、8B10B等の変調方式で変調し、AND回路69,70,71の他方の入力端に出力する。
【0050】
すなわち、このように送信部1−10,2−10,3−10にて生成されたシリアルデータは、AND回路69,70,71にて、ビットデータ挿入タイミング生成部59にて生成されたタイミング信号との論理積が取られ、それぞれビット列の中の規定のタイミングにおけるシリアルデータとなる。そして、並列に生成されたシリアルデータがOR回路72にて合成され、1つのシリアルデータになる。合成されたシリアルデータは、OR回路74にて基準ビットパターン挿入部73が生成する基準通信周期のビットパターンが挿入され、ドライバ75によってネットワーク#1,#2,#3に送信される。
【0051】
図5を参照して、送信部1−10,2−10,3−10にて生成されるシリアルデータの合成内容を具体的に説明する。図5では、基準転送レート(1)は、4ビットデータが最小繰り返しデータ出現回数となっている。最小繰り返しデータ出現周期カウンタ57は、基準ビットパターンが挿入されるタイミングに同期して「1」から「4」までをカウントする。このビットサイクルの1番目と2番目はネットワーク#1へのシリアルデータとして割り当てられ、3番目はネットワーク#2へのシリアルデータ、4番目はネットワーク#3へのシリアルデータとして割り当てられる。
【0052】
これらのタイミングは、ビットデータ挿入タイミング生成部59にて最小繰り返しデータ出現周期カウンタ57の出力値をデコードして生成される。その結果、送信部1−10の出力を受けるAND回路69はネットワーク#1用シリアルビット列(3)を出力する。送信部2−10の出力を受けるAND回路70はネットワーク#2用シリアルビット列(4)を出力する。送信部3−10の出力を受けるAND回路71はネットワーク#3用ビット列(5)を出力する。そして、OR回路72には、それらが合成されたシリアルビット列(2)が得られる。
【0053】
次に、受信部1−20,2−20,3−20は、同様の構成である。ラッチ回路65は、レシーバ64からのシリアルデータをビットデータ挿入タイミング生成部59から出力されるタイミング信号によってラッチし、シリアルデータ復調部66に出力する。シリアルデータ復調部66は、ラッチされたシリアルデータをNRZ、NRZI、8B10B等の復調方式によって復調し、データ受信部67に出力する。データ受信部67は、シリアルデータ復調部66からのシリアルデータをパラレルデータに変換し、外部の受信処理系に出力する。
【0054】
すなわち、受信部1−20,2−20,3−20では、レシーバ64にて受信されたデータを、ラッチ回路65にて、ビットデータ挿入タイミング生成部59から与えられるタイミングでラッチするので、合成されたシリアルデータの中から各ネットワークのデータをそれぞれ区別して受信することができる。
【0055】
図5の例で言えば、レシーバ64にて受信したシリアルデータが図5(2)に対応するので、受信部1−20のラッチ回路65は図5(3)に示すシリアルデータをラッチする。受信部2−20のラッチ回路65は図5(4)に示すシリアルデータをラッチする。受信部3−20のラッチ回路65は図5(5)に示すシリアルデータをラッチする。このように、受信部1−20,2−20,3−20では、合成されたシリアルデータがそれぞれのシリアルデータに分離される。
【0056】
次に、制御装置12,21〜23,31〜33の通信ポートについて説明する。図6において、レシーバ84は、上位装置から送られてくるシリアルデータを受信する。レシーバ84の出力は、受信クロック生成部81と基準ビットパターン検出部82と受信部1−21とOR回路86の一方の入力とに与えられている。
【0057】
受信クロック生成部81は、受信されたシリアルデータから受信クロックである基準転送レートを検出し、それを最小繰り返しデータ出現周期カウンタ80に出力する。また、基準ビットパターン検出部82は、受信されたシリアルデータ内の基準ビットパターンを検出し、そのタイミング信号を最小繰り返しデータ出現周期カウンタ80に出力する。
【0058】
最小繰り返しデータ出現周期カウンタ80は、受信クロック生成部81にて検出された基準転送レートに基づきシリアルデータが周期的に出現する最小周期をカウントし、そのカウント値をビットデータ挿入タイミング生成部83に出力する。そのとき、カウンタのタイミングが基準ビットパターン検出部82からのタイミング信号によって補正される。
【0059】
ビットデータ挿入タイミング生成部83は、最小繰り返しデータ出現周期カウンタ80からのカウント値をデコードし、シリアルデータを挿入するタイミング信号を生成する。生成されたタイミング信号は、AND回路85の一方の入力と受信部1−21とAND回路94の一方の入力と受信部1−22とに与えられている。AND回路85の他方の入力には送信部1−11の出力が与えられ、AND回路85の出力は、OR回路86の他方の入力に与えられている。OR回路86の出力は、ドライバ87を介して下位装置に送られる。
【0060】
また、レシーバ97は、下位装置から送られてくるシリアルデータを受信する。レシーバ97の出力は、受信部1−22とOR回路95の一方の入力とに与えられている。AND回路94の他方の入力には送信部1−12の出力が与えられている。AND回路94の出力は、OR回路95の他方の入力に与えられている。OR回路95の出力は、ドライバ96を介して下位装置に送られる。
【0061】
下位装置への送信部1−11と上位装置への送信部1−12とは、同様の構成である。すなわち、送信タイミング生成部91は、図示しないCPU等から与えられる送信タイミングと通信周期のカウンタ値とを比較し、一致した場合に送信タイミング信号を生成し、データ送信部92に与える。データ送信部92は、図示しないCPU等から与えられるパラレルデータをシリアルデータに変換し、それを送信タイミング生成部91から与えられる送信タイミングに同期してシリアルデータ変調部93に与える。シリアルデータ変調部93は、入力されたシリアルデータをNRZ、NRZI、8B10B等の変調方式で変調し、AND回路85,94の他方の入力端に出力する。
【0062】
その結果、下位装置への送信部1−11の出力は、AND回路85にて、ビットデータ挿入タイミング生成部83にて生成されたタイミング信号との論理積が取られ、ビット列の中の規定のタイミングにおけるシリアルデータとなる。そして、上位装置から送られてくるシリアルデータとOR回路86にて合成され、1つのシリアルデータになる。合成されたシリアルデータは、ドライバ87よって下位装置に送信される。
【0063】
また、上位装置への送信部1−12の出力は、AND回路94にて、ビットデータ挿入タイミング生成部83にて生成されたタイミング信号との論理積が取られ、ビット列の中の規定のタイミングにおけるシリアルデータとなる。そして、下位装置から送られてくるシリアルデータとOR回路95にて合成され、1つのシリアルデータになる。合成されたシリアルデータは、ドライバ96によって上位装置に送信される。
【0064】
また、上位装置からのデータを受信する受信部1−21と、下位装置からのデータを受信する受信部1−22とは、同様の構成である。すなわち、ラッチ回路88は、レシーバ84,97からのシリアルデータをビットデータ挿入タイミング生成部83から出力されるタイミング信号によってラッチし、シリアルデータ復調部89に出力する。シリアルデータ復調部89は、ラッチされたシリアルデータをNRZ、NRZI、8B10B等の復調方式によって復調し、データ受信部90に出力する。データ受信部90は、シリアルデータ復調部89からのシリアルデータをパラレルデータに変換し、外部の受信処理系に出力する。
【0065】
すなわち、受信部1−21,1−22では、レシーバ84,97にて受信されたデータを、ラッチ回路88にて、ビットデータ挿入タイミング生成部59から与えられるタイミングでラッチするので、合成されたシリアルデータの中から自装置宛のデータを受信することができる。
【0066】
次に、分配器4の通信ポートについて説明する。これは、図2に示したネットワーク#1側の受信部36および送信部53,ネットワーク#2側の送信部38および受信部49,ネットワーク#3側の送信部46および受信部51に対応している。
【0067】
図7において、レシーバ104は、ネットワーク#1からのデータを受信する。レシーバ104の出力は、受信クロック生成部101と基準ビットパターン検出部102とラッチ回路105,110とに与えられている。ラッチ回路105の出力は、ドライバ106を介してネットワーク#2に送られる。また、ラッチ回路110の出力は、ドライバ111を介してネットワーク#3に送られる。
【0068】
受信クロック生成部101は、受信されたシリアルデータから受信クロックである基準転送レートを検出し、それを最小繰り返しデータ出現周期カウンタ100に出力する。また、基準ビットパターン検出部102は、受信されたシリアルデータ内の基準ビットパターンを検出し、そのタイミング信号を最小繰り返しデータ出現周期カウンタ100に出力する。
【0069】
最小繰り返しデータ出現周期カウンタ100は、受信クロック生成部101にて検出された基準転送レートに基づきシリアルデータが周期的に出現する最小周期をカウントし、そのカウント値をビットデータ挿入タイミング生成部103に出力する。そのとき、カウンタのタイミングが基準ビットパターン検出部102からのタイミング信号によって補正される。
【0070】
ビットデータ挿入タイミング生成部103は、最小繰り返しデータ出現周期カウンタ100からのカウント値をデコードし、シリアルデータを挿入する2つ基準タイミング信号を生成する。生成された基準タイミング信号の一方(転送レートTbのタイミング信号)は、ラッチ回路105とAND回路108の一方の入力とに与えられ、生成された基準タイミング信号の他方(転送レートTcのタイミング信号)は、ラッチ回路110とAND回路113の一方の入力とに与えられている。
【0071】
AND回路108の他方の入力には、ネットワーク#2からデータを受信するレシーバ107の出力が与えられている。AND回路113の他方の入力には、ネットワーク#3からデータを受信するレシーバ112の出力が与えられている。AND回路108,113の出力は、OR回路109にて合成され、ドライバ114を介してネットワーク#1に送られる。
【0072】
以上の構成において、ネットワーク#1からのデータは、ラッチ回路105にて、ビットデータ挿入タイミング生成部103からの基準タイミングによって転送レートTbのデータに変換され、ドライバ106によってネットワーク#2に送信される。また、ネットワーク#1からのデータは、ラッチ回路110にて、ビットデータ挿入タイミング生成部103からの基準タイミングによって転送レートTcのデータに変換され、ドライバ111によってネットワーク#3に送信される。
【0073】
また、ネットワーク#2,#3からのデータは、AND回路108,113にてビットデータ挿入タイミング生成部103からのタイミング信号と同期が取られ、OR回路109にて1本のシリアルデータに合成され、ネットワーク#1に送信される。
【0074】
ここで、図7に示すような通信ポートを有した分配器4を用いた場合、ネットワーク#1の転送レートTaはTa=Tとなり、ネットワーク#2の転送レートTbはTb=1/2Tとなり、ネットワーク#3の転送レートTcはTc=1/2Tとなる。
【0075】
次に、図8は、図1に示す数値制御システムにて行われるデータの送受信を説明するタイムチャートである。図8では、図5に示されたビットパターンによってネットワーク#1,#2,#3に流れるデータの関係が示されている。
【0076】
図8において、数値制御装置11は、基準通信周期P(1)のタイミングで、ネットワーク#1,#2,#3への送信データ(2)として、基準ビットパターン1100と合成されたシリアルデータ1110とを送信する。数値制御装置11から送信されたシリアルデータ111は、制御装置12や分配器4でビット列を規定の順番で3つの並列したシリアルデータに分離される。
【0077】
したがって、ネットワーク#1では、通信周期Pa(4)のタイミングで、数値制御装置11から制御装置12への送信データ(5)として、合成されたシリアルデータ1110から分離したデータ1130が送信される。
【0078】
また、ネットワーク#2では、通信周期Pb(7)のタイミングで、数値制御装置11から制御装置21,22への送信データ(8)として、合成されたシリアルデータ1110から分離したデータ2110,2120が送信される。制御装置23には次の基準通信周期P(1)でのシリアルデータから分離したデータ2130が送信される。
【0079】
同様に、ネットワーク#3では、通信周期Pc(10)のタイミングで、数値制御装置11から制御装置31への送信データ(11)として、合成されたシリアルデータ1110から分離したデータ3110が送信される。制御装置32,33には次の基準通信周期P(1)でのシリアルデータから分離したデータ3120,3130が送信される。
【0080】
一方、ネットワーク#3では、通信周期Pc(10)のタイミングで、数値制御装置11への送信データ(12)として、制御装置31がデータ3140を送信する。また、制御装置32,33は次の通信周期Pc(10)で、データ3150,3160を送信する。
【0081】
また、ネットワーク#2では、通信周期Pb(7)のタイミングで、数値制御装置11への送信データ(9)として、制御装置21,22がデータ2140,2150を送信する。また、制御装置23は次の通信周期Pb(7)で、データ2160を送信する。
【0082】
同様に、ネットワーク#1では、通信周期Pa(4)のタイミングで、数値制御装置11への送信データ(6)として、制御装置12は、データ1140を送信する。これら制御装置12からの送信データ1140、制御装置21,22からの送信データ2140,2150、および制御装置31からの送信データ3140は、基準通信周期P(1)のタイミングで、分配器4の受信部、制御装置12の受信部にて合成され、データ1120として数値制御装置11に受信される(3)。
【0083】
同様に、制御装置23が次の通信周期Pb(7)で送るデータ2160と、制御装置32,33が次の通信周期Pc(10)で送るデータ3150,3160と、制御装置12が次の通信周期Pa(4)で送るデータ(6)とが、次の基準通信周期P(1)のタイミングで合成され、数値制御装置11に受信される(3)。
【0084】
ここで、この実施の形態1では、最小繰り返しデータ出現周期が4ビットであり、並列化されたシリアルデータが3となっているが、一般的には次のような関係となる。
【0085】
基準転送レート(物理的最大転送レート)をT[ビット/秒]、最小繰り返しデータ出現周期をNr[ビット]、基準通信周期をP[秒]とし、並列化されるシリアルデータデータの通信周期が“P、2×P、3×P、・・・、χ×P”(但し、χは自然数)としたときに、各通信周期のシリアルデータ数が“N1、N2、N3、・・・、Nχ”と与えられるとすると、全ての並列化されるシリアルデータ数Npは、
【0086】
【数1】

Figure 0004118695
となる。
【0087】
また、最小繰り返しデータ出現周期Nr(自然数)は、
【数2】
Figure 0004118695
となる。また、基準通信周期の論理転送レートは、T×Nr/2[ビット/秒]となる。
【0088】
次に、図9、図10を参照して、図1に示した数値制御システムの適用例を説明する。なお、図9は、工作機械の一般的な構成例を示す図である。図10は、図1に示す数値制御システムを図9に示す工作機械に適用した場合の構成例を示す図である。
【0089】
図9において、工作機械は、一般に、ワークを加工する加工機120と、搬送路に乗せられた未加工ワークを加工機120に搬入し、加工済みワークを加工機120から受け取り搬出する搬送機121とによって構成されている。そして、加工機120側に強電盤122と表示器操作盤123とが設けられ、搬送機121側に強電盤124が設けられている。
【0090】
加工機120は、搬送路から送られてきたワークを固定するテーブル130と、このテーブル130を移動操作して直交座標上での位置決めを行う2つのサーボモータ132,133と、テーブル130の上部に設置され、ワークの加工を行う主軸モータ138とを備えている。
【0091】
サーボモータ132,133は、それぞれボールネジ134,135を介してテーブル130に結合され、ボールネジ134,135を駆動することによって、テーブル130を直線方向に動かすようになっている。また、サーボモータ132,133は、それぞれエンコーダ136,137を備えている。
【0092】
そして、強電盤122には、数値制御装置140と2つのサーボモータ132,133と主軸モータ138とをそれぞれ個別に制御する3台の駆動制御装置141,142,143とが配置されている。3台の駆動制御装置141,142,143は、ディジーチェーン接続方式による通信線160を介して数値制御装置140の1つの通信ポート(第1通信ポート)に接続されている。
【0093】
すなわち、数値制御装置140は、ディジーチェーン接続の1本の通信線160を介して駆動制御装置141,142,143に対し位置、速度、トルクなどの指令を与える。駆動制御装置141,142,143は、ディジーチェーン接続の1本の通信線を介して、位置フィードバック、速度フィードバック、トルクフィードバックなどの状態量や、制御機能の状態、アラーム情報などを数値制御装置140に送るようになっている。
【0094】
次に、搬送機121は、ベルトなどの搬送路を駆動するサーボモータ148と、ワークを検出するために搬送路の所定場所に配置される複数のポジションセンサ145,146,147と、搬送路上のワークを加工機120に搬入し、排出するワーク搬出入装置150と、ワーク搬出入装置150を駆動するサーボモータ149とを備えている。
【0095】
そして、強電盤124には、2つのサーボモータ148,149を個別に制御する2台の駆動制御装置153,154と、複数のポジションセンサ145,146,147の出力信号を取り込むDI/O制御装置155とが配置されている。
【0096】
この2台の駆動制御装置153,154は、数値制御装置140に設けられる第2通信ポートにディジーチェーン接続方式の通信線161を介して接続され、また、DI/O制御装置155は、数値制御装置140に設けられる第3通信ポートに独立した通信線162を介して接続されている。
【0097】
数値制御装置140は、DI/O制御装置155からの信号をシーケンス制御し、ワークの位置によって上記第3通信ポートにディジーチェーン接続される2台の各駆動制御装置153,154に出す指令(位置、速度、トルクなど)のタイミングを制御し、指令を与えるようになっている。
【0098】
また、表示器操作盤123は、数値制御装置140に設けられる第4通信ポートに接続されている。すなわち、数値制御装置140が表示器操作盤123の表示器に対し加工プログラムやパラメータ、制御状態等を送ると、表示器は送られてきたデータを表示する。また、操作盤は入力されたデータを数値制御装置140に送信するようになっている。
【0099】
以上のように、一般的な工作機械を構成する数値制御システムは、数値制御装置が4つの通信ポートを備え、加工機が備える複数の駆動制御装置、搬送機が備える複数の駆動制御装置およびDI/O制御装置、表示器操作盤をそれぞれ独立に制御等するように構成されている。但し、システムによっては、DI/O制御装置と表示器操作盤は、複数の駆動制御装置と同様に、数値制御装置にディジーチェーン接続方式で接続される場合もある。この場合には、数値制御装置は2つまたは3つの通信ポートを備えることになる。
【0100】
工作機械では、加工機が備える複数の駆動制御装置は、一般に、搬送機が備える複数の駆動制御装置よりも高速かつ高精度にサーボモータを駆動、制御する必要がある。また、搬送機を制御する駆動制御装置やDI/O制御装置、表示器や操作盤は、高速、高精度な制御性能が要求されない。したがって、図9に示した数値制御システムを、図1に示した数値制御システムで置き換えると、例えば図10に示すようになる。
【0101】
図10において、加工機120の強電盤122に配置される数値制御装置140、駆動制御装置141,142,143で構成されるネットワークは、図1に示したネットワーク#1に対応している。搬送機121の強電盤124に配置される駆動制御装置153,154、DI/O制御装置155で構成されるネットワークは、図1に示したネットワーク#2に対応している。表示器操作盤123で構成されるネットワークは、図1に示したネットワーク#3に対応している。これらの3つネットワークが、分配器4によってスター状に接続されている。このように、各強電盤間を接続する通信線の本数が大幅に削減される。
【0102】
この構成によれば、ネットワーク#1での1通信周期内に送受信可能なデータ量は、Pa×Ta×8[バイト]である。一方、ネットワーク#2,#3では通信周期がネットワーク#1の通信周期の半分であるので、1通信周期で送受信可能なデータ量は、Pb×Tb×8[バイト]=Pc×Tc×8[バイト]=2×(Pa×Ta×8)[バイト]である。
【0103】
したがって、ネットワーク#2,#3での転送レートは、Tb=Tc=1/2Taで構わない。つまり、高速な通信を行うためのドライバやレシーバ、通信回路は、高速なものほどコストが高いので、高速な転送レートを必要としないネットワーク#2,#3で使用するドライバやレシーバ、通信回路のコストを下げることが可能である。
【0104】
なお、図1では、分配器を1つの装置としたが、図11に示すように、ネットワーク#1の最終端に接続された制御装置に分配器の機能を持たせることも可能である。図11は、図1に示す数値制御システムの他の構成例(分配器の機能をネットワーク#1の最終端に位置する制御装置が持つ場合)を示す図である。図11では、図1に示した分配器4が省略され、その分配器の機能を制御装置12に代えた制御装置13が持つようにした場合が示されている。
【0105】
このように、実施の形態1によれば、様々な制御装置で構成されるネットワークの複数個を、転送レート、通信周期の制御機能を持つ分配器によってスター状に接続したので、数値制御装置が1つの通信ポートによって、様々な制御装置を制御することができる。このとき、分配器が転送レート、通信周期の制御機能を持つので、各ネットワーク間の転送路の使用効率を上げることができ、また高速周期のデータと低速周期のデータとを並列に送信することが可能となる。さらに、ネットワークをスター状に接続することで、制御装置を必要な場所に配置することが容易になる。なお、低速周期のデータを扱うネットワークの装置では、高速な転送レートを必要としないので、ドライバやレシーバ、通信回路のコストを下げることが可能となる。
【0106】
実施の形態2.
図12は、この発明の実施の形態2である数値制御システムの構成を示すブロック図である。なお、図12では、図1に示した構成と同一ないしは同等である構成要素には同一の符号が付されている。ここでは、この実施の形態2に関わる部分を中心に説明する。
【0107】
図12に示す数値制御システムは、主ネットワークであるネットワーク(#1)に分配器170を介して従ネットワークであるネットワーク(#2)2が接続され、ネットワーク(#2)2に分配器171を介して従ネットワークであるネットワーク(#3)3が接続されている。すなわち、ネットワーク(#1)1に対し、ネットワーク(#2)2,(#3)3は、分配器170,171を介してディジーチェーン接続されている。
【0108】
ここで、各ネットワーク相互間では、転送レートと通信周期の一方または双方が異なる場合があるが、この実施の形態2では、次のようになっている。すなわち、ネットワーク(#1)1,(#2)2,(#3)3の転送レートを、Ta,Tb,Tcとすると、1/2Ta=Tb=1/2Tcである。また、ネットワーク(#1)1,(#2)2,(#3)3の通信周期を、Pa,Pb,Pcとすると、Pa=1/2Pb=2Pcである。そして、ネットワーク群内で最大の転送レートを基準転送レートTとすると、T=Tbである。また、ネットワーク群内で最小の通信周期を基準通信周期Pとすると、P=Pbである。
【0109】
図12に示す分配器170,171は、ネットワーク相互間のデータの分配、集約操作やネットワーク相互間の転送レートの違いを変換する装置である。例えば、図13に示すように構成される。図13は、図12に示す分配器の構成を示すブロック図である。なお、図13では、図2に示した構成と同一ないしは同等である構成要素には同一の符号が付されている。ここでは、実施の形態2に関わる部分を中心に説明する。
【0110】
図13が分配器170の構成である場合には、レシーバ35は、ネットワーク#1からのデータを受信し、ドライバ39は、ネットワーク#2にデータを送信する。通信周期Pb(Pc)カウンタ176は、ネットワーク#2の通信周期Pbおよびネットワーク#2への送信タイミング信号を生成する。また、レシーバ48は、ネットワーク#2からのデータを受信し、ドライバ54は、ネットワーク#1にデータを送信する。通信周期Pa(Pb)カウンタ175は、ネットワーク#1の通信周期Paおよびネットワーク#1への送信タイミング信号を生成する。
【0111】
図13が分配器171の構成である場合には、レシーバ35は、ネットワーク#2からのデータを受信し、ドライバ39は、ネットワーク#3にデータを送信する。通信周期Pb(Pc)カウンタ176は、ネットワーク#3の通信周期Pcおよびネットワーク#3への送信タイミング信号を生成する。また、レシーバ48は、ネットワーク#3からのデータを受信し、ドライバ54は、ネットワーク#2にデータを送信する。通信周期Pa(Pb)カウンタ175は、ネットワーク#2の通信周期Pbおよびネットワーク#2への送信タイミング信号を生成する。
【0112】
次に、図14は、図12に示す分配器がデータの送信タイミングを制御する動作を説明するタイムチャートである。図14において、数値制御装置11は、通信周期Pa(1)のタイミングで、ネットワーク#1の制御装置12へのデータ1041と、ネットワーク#2の制御装置21,22,23へのデータ1051とネットワーク#3の制御装置31,32,33へのデータ1061とを送信する。
【0113】
制御装置21,22,23へのデータ1051は、通信周期Pb(4)のタイミングで、分配器170を介してネットワーク#2に送られる(5)。ネットワーク#2の通信周期Pbは、ネットワーク#1の通信周期Paの1/2であるので、データ1051には、ネットワーク#2の制御装置21,22,23の2周期分の指令が含まれている。
【0114】
データ1051では、1周期目と2周期目のデータ配置がそれぞれ決められている。分配器170は、データの配置によって1周期目のデータ、2周期目のデータをそれぞれネットワーク#2の制御装置21,22,23に送信する。
【0115】
制御装置31,32,33へのデータ1061は、まず、通信周期Pb(4)のタイミングで、分配器170を介してネットワーク#2に送信される(5)。ネットワーク#2に送信されたデータ2081は、通信周期Pc(7)のタイミングで、分配器171を介してデータ3041としてネットワーク#3に送信される(8)。
【0116】
データ1051,1061は、それぞれそのヘッダー部分にネットワークを指定するアドレス情報を含んでおり、分配器170,171は、そのアドレス情報を元にデータを各ネットワークに送信する。なお、ネットワーク#3の通信周期Pcの位相は、分配器171の基準タイミング制御部43によって制御されているので、ネットワーク#1とネットワーク#3におけるデータ遅延は最小限に抑えられている。
【0117】
また、通信周期Pb(4)のタイミングで、ネットワーク#2の制御装置21,22,23から数値制御装置11に送信されるデータ2051,2061,2071等(6)は、2周期分が分配器170によって1つのパケットにまとめられ、通信周期Pa(1)のタイミングで、データ1081としてネットワーク#1に送信される(3)。
【0118】
通信周期Pc(7)のタイミングで、ネットワーク#3の制御装置31,32,33から数値制御装置11に送信されるデータ3051,3061,3071等(9)は、分配器171によって1つのパケットにまとめられ、通信周期Pb(4)のタイミングで、データ2091としてネットワーク#2に送信され(6)、さらに通信周期Pa(1)のタイミングで、分配器170によってデータ1071としてネットワーク#1に送信される(3)。
【0119】
ここで、ネットワーク#2は、このようにネットワーク#1,#3間のデータやり取りを仲介するが、ネットワーク#2の通信周期Pbは、ネットワーク#1,#3の通信周期Pa,Pcの半分であるので、転送レートが全て同じ場合には、ネットワーク#2の1通信周期で送受信できるデータ量は、半分となってしまう。したがって、この実施の形態2では、ネットワーク#2の転送レートTbをTb=2×Ta=2×Tcとすることで、1通信周期内で送受信できるデータ量はネットワーク#1,#2,#3の間で同じとなるようにしている。
【0120】
次に、図12に示す数値制御システムにおいて、分配器を図13に示した構成とする場合、実施の形態1と同様にデータ転送遅延が発生する。次に、データ転送遅延の発生しないシステムを説明する。数値制御装置11の通信ポートは、実施の形態1(図4)に示すように構成でき、制御装置12,21〜23,31〜33の通信ポートは、実施の形態1(図6)に示すように構成でき、分配器170,171の通信ポートは、ほぼ実施の形態1(図7)に示すように構成できる。したがって、通信線上のシリアルデータは、図15に示すようになり、データの送信は、図16に示すように行われる。
【0121】
図15は、図12に示す数値制御装置11の通信ポートにて行われるシリアルデータの合成を説明するタイムチャートである。図15において、基準転送レート(1)は、4ビットデータが最小繰り返しデータ出現回数となっている。ネットワーク#1用のシリアルデータ(3)とネットワーク#2用のシリアルデータ(4)とネットワーク#3用のシリアルデータ(5)とが合成されて通信線に送出され(2)、ネットワーク#1,#2,#3に並列に与えられる。
【0122】
次に、各装置の通信ポートは、実施の形態1にて説明した内容で動作するのでデータの送受信は、図16に示す手順で行われる。図16は、図12に示す数値制御システムにて行われるデータの送受信を説明するタイムチャートである。
【0123】
図16において、数値制御装置11は、基準通信周期P(1)のタイミングで、ネットワーク#1,#2,#3への送信データ(2)として、基準ビットパターン1101と合成されたシリアルデータ1111とを送信する。数値制御装置11から送信されたシリアルデータ1111は、制御装置12や分配器170,171でビット列を規定の順番で3つの並列したシリアルデータに分離される。
【0124】
したがって、ネットワーク#1では、通信周期Pa(4)のタイミングで、数値制御装置11から制御装置12への送信データ(5)として、合成されたシリアルデータ1111から分離したデータ1041が送信される。
【0125】
また、ネットワーク#2では、通信周期Pb(7)のタイミングで、数値制御装置11から制御装置21,22、23への送信データ(8)として、合成されたシリアルデータ1111から分離したデータ1051が送信される。
【0126】
同様に、ネットワーク#3では、通信周期Pc(10)のタイミングで、数値制御装置11から制御装置31,32,33への送信データ(11)として、合成されたシリアルデータ1111から分離したデータ1061が送信される。
【0127】
一方、ネットワーク#3では、通信周期Pc(10)のタイミングで、数値制御装置11への送信データ(12)として、制御装置31,32,33がデータ3051,3061,3071を送信する。
【0128】
また、ネットワーク#2では、通信周期Pb(7)のタイミングで、数値制御装置11への送信データ(9)として、制御装置21,22,23がデータ2051,2061,2071を送信する。
【0129】
同様に、ネットワーク#1では、通信周期Pa(4)のタイミングで、数値制御装置11への送信データ(5)として、制御装置12は、データ1071を送信する。これら制御装置12からの送信データ1071、制御装置21,22,23からの送信データ2051,2061,2071、および制御装置31,32からの送信データ3051,3061は、基準通信周期P(1)のタイミングで、分配器170,171の受信部、制御装置12の受信部にて合成され、データ1121として数値制御装置11に受信される(3)。
【0130】
同様に、制御装置33が同じ通信周期Pb(7)で送るデータ3071(12)と、制御装置21,22,23が同じ通信周期Pc(10)で送るデータ(9)とは、同じ基準通信周期P(1)のタイミングで合成され、数値制御装置11に受信される(3)。
【0131】
次に、図17を参照して、図12に示した数値制御システムの適用例を説明する。なお、図17は、図12に示す数値制御システムを図9に示す工作機械に適用した場合の構成例を示す図である。
【0132】
実施の形態1にて説明したように、加工機を駆動する駆動制御装置は、一般的に高速、高精度な制御性能が要求される。また、加工機を駆動する駆動制御装置の制御ループが、位置、速度、電流の各制御ループで構成され、数値制御装置からの指令が位置の指令として与えられる場合には、数値制御装置から駆動制御装置への位置指令はオープンループとなるので、駆動制御装置からのフィードバックデータを数値制御装置側の制御器に取り込む必要がない。
【0133】
そのため、この実施の形態2では、加工機を駆動する駆動制御装置を想定して、制御装置21,22,23で構成されるネットワーク#2の通信周期は、ネットワーク#1,#3の通信周期よりも短くなっている。このような構成をとっても加工機を駆動する駆動制御装置である制御装置21,22,23の高速、高精度が保障される。
【0134】
したがって、図12に示す数値制御システムを図9に示す工作機械に適用した場合の構成は、例えば図17に示すようになる。図17において、数値制御装置140は、図9では、強電盤122内に加工機120を駆動する駆動制御装置141,142,143と共に配置されていたが、図17では、加工機120の前面に設けた強電盤168内に、表示器操作盤123と共に配置されている。数値制御装置140と表示器操作盤123とで構成されるネットワークが図12に示したネットワーク#1に対応している。
【0135】
また、加工機120を駆動する駆動制御装置141,142,143で構成されるネットワークが図12に示したネットワーク#2に対応し、ネットワーク#1とは分配器170を介してディジーチェーン接続されている。また、搬送路を駆動する駆動制御装置153,154及び、ワークの位置情報を検出するDI/O制御装置155で構成されるネットワークが図12に示したネットワーク#3に対応し、ネットワーク#2とは分配器171を介してディジーチェーン接続されている。このように、各強電盤間を接続する通信線の本数が大幅に削減される。
【0136】
次に、図18は、図17に示す数値制御システムでの位置指令による制御を説明する制御系統図である。図18において、数値制御装置180と駆動制御装置181とはネットワーク183を介して接続され、数値制御装置180が備える位置指令生成部182が発行する位置指令は、ネットワーク183を介して駆動制御装置181に送られる。駆動制御装置181では、演算器184が、送られてきた位置指令とエンコーダ189からの位置フィードバック情報との誤差を算出し、位置制御器185に送る。
【0137】
位置制御器185は、位置指令と位置フィードバックとの誤差に適切なゲインを乗算し、速度指令を生成する。速度指令は、演算器186にて、エンコーダ190からの位置フィードバックを微分器191によって微分して得られる速度フィードバックとの誤差が算出され、速度制御器187に送られる。速度制御器187では、速度指令と速度フィードバックとの誤差に適切なゲインを乗算し、電流指令を生成し、電流制御器188に送られる。電流制御器188は、電流指令に適切なゲインを乗算し、サーボモータ189を駆動する。このように、駆動制御装置181では、数値制御装置180から位置で指令を与えられるだけで、サーボモータ189を駆動制御することができる。
【0138】
なお、図12では、分配器170,171を1つの装置としたが、図19に示すように、ネットワーク#1の最終端に接続された制御装置に分配器170の機能を持たせ、ネットワーク#2の最終端に接続された制御装置に分配器171の機能を持たせることも可能である。図19は、図12に示す数値制御システムの他の構成例(分配器の機能をネットワーク#1,#2の最終端に位置する制御装置が持つ場合)を示す図である。図19では、図12に示した分配器170,171が省略され、分配器170の機能を制御装置12に代えた制御装置14が持つようにし、分配器171の機能を制御装置23に代えた制御装置24が持つようにした場合が示されている。
【0139】
また、各制御装置の通信ポートは、図6に示す構成として説明したが、図4に示す送信部1−10,2−10,3−10、受信部1−20,2−20,3−20のように送受信部を複数個持つようにしてもよい。このようにすれば、各制御装置は、自ネットワーク以外のネットワークとのデータ送受信が可能となる。
【0140】
このように、実施の形態2によれば、様々な制御装置で構成されるネットワークの複数個を、転送レート、通信周期の制御機能を持つ分配器によってディジーチェーン接続したので、数値制御装置が1つの通信ポートによって、様々な制御装置を制御することができる。このとき、分配器が転送レート、通信周期の制御機能を持つので、各ネットワーク間の転送路の使用効率を上げることができ、また高速周期のデータと低速周期のデータとを並列に送信することが可能となる。なお、低速周期のデータを扱うネットワークの装置では、高速な転送レートを必要としないので、ドライバやレシーバ、通信回路のコストを下げることが可能となる。
【0141】
実施の形態3.
図20は、この発明の実施の形態3である数値制御システムの構成を示すブロック図である。この実施の形態3では、実施の形態1(図1,図11)または実施の形態2(図12,図19)において、1つの転送路上に配置される複数の装置における最上位装置以下の各下位装置が、前記最上位装置に対し時分割で送信する送信タイミングを装置間の転送遅延値によって補正する場合の構成例が示されている。但し、図20では、説明の便宜から、最上位装置は、数値制御装置であるとしている。
【0142】
すなわち、図20に示す数値制御システムは、数値制御装置193に対して複数の制御装置194,195,196がディジーチェーン接続された1つのネットワークによって構成されている。図9に示した工作機械で言えば、制御装置194,195,196は、サーボモータの駆動制御装置141〜144,153,154やポジションセンサーの制御装置であるDI/O制御装置155に相当する。
【0143】
制御装置194,195,196は、数値制御装置193と同じ通信周期Pで動作するが、転送路および制御装置194,195,196には、遅延要素が存在するので、数値制御装置193から送信されるデータは、それからの遅延要素の影響を受けるので、制御装置194,195,196では、通信周期にずれが生ずる。この実施の形態3では、次のようにして、その通信周期のずれを補正している。
【0144】
制御装置194,195,196の通信ポートは、実施の形態1で示した分配器4(図2)や実施の形態2で示した分配器170,171(図13)と同等の機能を持つことから、例えば、図21に示すように構成することができる。図21は、図20に示す制御装置の通信ポートの構成を示すブロック図である。なお、図21では、図2や図13に示した構成と同一ないしは同等である構成要素には同一の符号が付されている。
【0145】
図21において、レシーバ35には上位装置からのシリアルデータが入力される。受信部36は、レシーバ35から入力されるシリアルデータをパラレルデータに変換し、バッファ37と同期パターン抽出部40とに出力する。バッファ37は、入力されるパラレルデータを正しいパルス幅に修正してバッファリングし、下位装置に転送するデータをスイッチ198の一方の切替入力端に出力する。
【0146】
スイッチ198は、他方の切替入力端が送信部38の出力端に接続され、切替出力端がドライバ39の入力端に接続されている。すなわち、レシーバ35が受信した上位装置の送信データを下位装置に渡すときは、スイッチ198は、バッファ37の出力端とドライバ39の入力端とを接続し、自装置の送信データを下位装置に渡すときは、スイッチ198は、送信部38の出力端とドライバ39の入力端とを接続するように制御される。
【0147】
また、レシーバ48には下位装置からのシリアルデータが入力される。受信部49は、レシーバ48から入力されるシリアルデータをパラレルデータに変換し、バッファ52に出力する。バッファ52は、入力されるパラレルデータを正しいパルス幅に修正してバッファリングし、上位装置に転送するデータをスイッチ202の一方の切替入力端に出力する。
【0148】
スイッチ202は、他方の切替入力端が送信部53の出力端に接続され、切替出力端がドライバ54の入力端に接続されている。すなわち、レシーバ48が受信した下位装置の送信データを上位装置に渡すときは、スイッチ202は、バッファ52の出力端とドライバ54の入力端とを接続し、自装置の送信データを上位装置に渡すときは、スイッチ202は、送信部53の出力端とドライバ54の入力端とを接続するように制御される。
【0149】
同期パターン抽出部40は、受信部36にてパラレルに変換されたデータの中に含まれる同期信号を抽出し、同期信号を生成する。生成した同期信号は、通信周期Pカウンタ199,200に送られる。通信周期Pカウンタ199,200は、入力される同期信号に基づきネットワークの基準となる通信周期Pおよび送信タイミング信号を生成する。これによって、数値制御装置11との同期が取られるようになる。
【0150】
通信周期Pカウンタ199にて生成された通信周期Pおよび送信タイミング信号は、送信部38に送られる。送信部38は、通信周期Pカウンタ199から与えられる送信タイミング信号によって通信周期Pを時分割した所定のタイミングにて下位装置向けの送信データをスイッチ198の他方の切替入力端に送出する。
【0151】
一方、メモリ201には、各制御装置間での遅延による通信周期のずれに対する送信タイミング補正量が格納されている。これは、システムの立ち上げ時などでの測定値に基づき設定されている。通信周期Pカウンタ200は、入力される同期信号に基づきネットワークの基準となる通信周期Pおよび送信タイミング信号を生成する際に、メモリ201から送信タイミング補正量を取り出し、生成する送信タイミング信号を所定のタイミングから進遅させる操作を行うようになっている。送信部53は、通信周期Pカウンタ200から与えられる送信タイミング信号によって通信周期Pを時分割した所定のタイミングにて上位装置向けの送信データをスイッチ202の他方の切替入力端に送出する。
【0152】
すなわち、数値制御装置193と制御装置194,195,196は、上記のように各々が持つ通信周期カウンタによって生成したタイミングに基づき通信周期Pを時分割してデータを送信する。したがって、数値制御装置193と制御装置194,195,196は、データの衝突が発生しない送信タイミングを一意に決定できる必要がある。そのため、制御装置194,195,196は、数値制御装置193から送信されるデータに含まれる同期パターンによって通信周期Pの同期を取るようにしている。
【0153】
しかし、転送路には通信媒体の遅延があり、制御装置194,195,196にはディジーチェーンバッファリングによる遅延や、通信ポートでの同期パターン抽出時での遅延などがある。そのため、数値制御装置193から送信されるデータは、上記の各種遅延の影響を受けるので、制御装置194,195,196では、通信周期にずれが生ずる。
【0154】
この制御装置194,195,196間の通信周期の遅延量は、システムが一度構成されると測定が可能である。したがって、数値制御装置193への送信タイミングの補正量も予めメモリ201に格納して用意することができる。以下図22を参照して、送信タイミングの補正操作を具体的に説明する。図22は、図20に示す数値制御システムにて行われる通信周期の遅延量によって送信タイミングを補正する動作を説明するタイムチャートである。
【0155】
図22において、通信周期501,601,701は、それぞれ制御装置194,195,196内でカウントされる通信周期である。通信周期601は、通信周期501に対し時間d1だけ遅れている。通信周期701は、通信周期501に対し時間d2だけ遅れている。また、通信周期701は、通信周期601に対しては時間d23だけ遅れている。
【0156】
ここで、数値制御装置193は、通信周期Pの基準点から制御装置194,195,196にデータを送信する。制御装置194は、通信周期Pの基準点から時間1/2P経過した後に数値制御装置193にデータを送信する。制御装置195は、通信周期Pの基準点から時間1/4P経過した後に数値制御装置193にデータを送信する。制御装置196は、通信周期Pの基準点から数値制御装置193にデータを送信するものとする。
【0157】
各制御装置の送信タイミングは、各制御装置内でカウントされた通信周期Pを基準にしたものであるが、前述のように同期パターンを含むデータの遅延により通信周期が各々ずれている。そこで、各制御装置における基準となる通信周期Pに対する遅延値を測定し、それに対する補正量(送信タイミング補正量)を内部メモリに設定する。
【0158】
設定する補正量は、遅延値の2倍の値を設定すればよい。すなわち、制御装置195では補正量d1×2を設定し、制御装置196では補正量d2×2を設定する。その結果、制御装置195からは送信タイミングを補正しデータ603が送信され、制御装置196からは送信タイミングを補正したデータ703が送信される。
【0159】
このように、実施の形態3によれば、数値制御装置に対し複数の制御装置がディジーチェーン接続される場合に、各制御装置が送信タイミングを転送遅延値に基づき補正するようにしたので、データを衝突させることなく確実に送信することができる。また、衝突を防ぐために送信タイミング間に余分な空き時間を作る必要がないので、データを効率よく送信することが可能となる。
【0160】
実施の形態4.
この発明の実施の形態4では、実施の形態1(図1,図11)または実施の形態2(図12,図19)において、1つの転送路上に配置される複数の装置における最上位装置以下の各装置が最上位装置にデータ送信を行う場合のデータ衝突を回避する方法として接続順に送信する場合の構成例が示されている。したがって、説明の便宜から、システム構成として実施の形態3(図20)を援用する。また、複数の制御装置は、図21と同様構成の通信ポートを備えている。
【0161】
装置の接続順序は、システム構築時には既知であるが、システム構築の際に何らかの人的誤りによって数値制御装置に設定した接続順番と各制御装置に設定した接続順番とを誤る場合がある。かかる場合には、接続順序に従った通信ができなくなる。そこで、この実施の形態4では、人的過ちを防止する観点から、初期手順として、図23に示す処理を実施して接続順序を調べることにしている。図23は、この発明の実施の形態4である数値制御システムにて行われる送信順序を決定する動作を説明するフローチャートである。
【0162】
図23に示す処理を実施する初期通信時には、制御装置194,195,196の通信ポートでは、図21において、スイッチ198は、送信部38とドライバ39とを接続するように設定されており、数値制御装置193からのデータが下位装置に流れないようになっている。
【0163】
この状態で数値制御装置193は、通信線先頭の1局目への問い合せを行うため、局番号nに「1」を設定し(ステップST11)、1局目の装置の種別を問い合わせる要求データを送信し(ステップST12)、装置種別の回答受信を待機する(ステップST13)。
【0164】
数値制御装置193は、制御装置194から装置種別の回答を受信すると(ステップST13:Yes)、1局目に接続されている装置が制御装置194であることを認識し、ステップST14に進む。このとき、制御装置194は、1局目に対する問い合せを受けるので、自装置が1局目の装置であることを同時に認識することができる。
【0165】
なお、数値制御装置193は、装置種別の問い合わせ送信後、一定時間応答が得られない場合には(ステップST13:No)、ステップST12に戻り、再度、1局目の装置の種別を問い合わせる要求データを送信する。この再度の要求を所定回数行っても回答がないときは、ステップST16に進むようになっている。
【0166】
次に、ステップST14では、数値制御装置193は、認識できた1局目の装置(制御装置194)に対し、スイッチ198の接続をバッファ37とドライバ39との接続に切り替え、スイッチ201の接続をバッファ52とドライバ54との接続に切り替える要求データを送信する。1局目の装置(制御装置194)は、指示に従いスイッチ198,201の接続切り替えを行い、スイッチ切替が完了したことを数値制御装置193に通知する(ステップST15:Yes)。
【0167】
なお、この場合も、数値制御装置193は、スイッチ切換要求の送信後、一定時間応答が得られない場合には(ステップST15:No)、ステップST14に戻り、再度、1局目の装置(制御装置194)に対し、スイッチ切換要求を送信するが、スイッチ切替完了通知は必ず送られてくる。
【0168】
数値制御装置193は、1局目の装置(制御装置194)からスイッチ切替完了通知を受信すると(ステップST15:Yes)、局番号を1つ歩進し、すなわち、n=n+1とし(ステップST16)、歩進した局番号「n=n+1」と接続装置数(図20の例では、接続装置数=3)との大小関係を比較する(ステップST17)。その結果、歩進した局番号「n=n+1」が接続装置数以内であるときは(ステップST17:No)、ステップST12に戻り、2局目以降の接続装置の確認を繰り返す(ステップST12〜ST17)。
【0169】
これによって、数値制御装置193は、制御装置194,195,196の接続順序を認識し、また制御装置194,195,196では、自装置の接続順序を認識する、すなわち、自装置の接続順序による送信順位を認識することができる。
【0170】
次に、図24を参照して、制御装置194,195,196の送信動作を説明する。なお、図24は、決定された送信順序によって送信タイミングを補正する動作を説明するタイムチャートである。上記したように、制御装置194,195,196は、図21と同様構成の通信ポートを備え、メモリ201には、送信タイミング補正量が格納されている。
【0171】
図24において、通信周期511,611,711は、それぞれ制御装置194,195,196内でカウントされる通信周期である。通信周期611は、通信周期511に対し時間d1だけ遅れている。通信周期711は、通信周期511に対し時間d2だけ遅れている。この点は、図22に示した場合と同様である。
【0172】
この実施の形態4では、制御装置194,195,196は、数値制御装置193を先頭としたとき、通信線の接続順序に従い順次数値制御装置193にデータを送信していく。制御装置194は、通信周期Pの基準から数値制御装置193にデータを送信する。制御装置195は、通信周期Pの基準点から時間1/4P経過した後に数値制御装置193にデータを送信する。制御装置196は、通信周期Pの基準点から時間1/2P経過した後に数値制御装置193にデータを送信する。
【0173】
このように制御装置194,195,196がそれぞれ通信線の接続順にデータを送信すると、制御装置194,195,196のそれぞれが送信タイミングを補正しなくても各送信データが干渉することはない。しかし、このままでは、データとデータの間隔が無駄にあいてしまう。また、接続の先頭に位置する制御装置194が最終端に位置する制御装置196から送信されたデータを受け取る時間が非常に遅くなり、通信周期の最後に空き時間がないと次のデータが次の通信周期に跨ってしまい、上記の実施の形態3と同様になってしまう。
【0174】
すなわち、上記の実施の形態3では、最終端に接続された制御装置196は、通信周期の遅れを補正するために現在の通信周期よりも前の通信周期に送信タイミングを補正するようにしている。通信周期を跨ぐデータの送受信は通信ポートの回路構成を複雑にするという難点がある。
【0175】
そこで、この実施の形態4では、制御装置195のメモリ201には、送信タイミング補正量として時間d1×2を設定し、制御装置196のメモリ201には、送信タイミング補正量として時間d2×2を設定し、それぞれ所定の送信タイミングよりも早いタイミングでデータ613,713を送信できるようにしている。
【0176】
その結果、データとデータの間を最適値にすることができる。また、最終端に位置する制御装置196では、送信タイミングが現在の通信周期内となるので、送信データが通信周期を跨らないようにすることが可能となり、回路構成の複雑化を回避することが可能となる。
【0177】
実施の形態5.
この発明の実施の形態5では、実施の形態1(図1,図11)または実施の形態2(図12,図19)において、1つの転送路上に配置される複数の装置が転送路でのデータの衝突回避や転送効率を上げるために必要となる転送路の伝達遅延を測定する構成例が示されている。したがって、説明の便宜から、システム構成として実施の形態3(図20)を援用する。
【0178】
また、複数の制御装置の通信ポートは、例えば図25に示すように構成される。図25は、この発明の実施の形態5である数値制御システムにおける制御装置の通信ポートの構成を示すブロック図である。なお、図25では、図21に示した構成と同一ないしは同等である構成部分には、同一に符号が付されている。ここでは、この実施の形態5に関わる部分を中心に説明する。
【0179】
図25に示すように、図21に示した2路のスイッチ201に代えて、3路のスイッチ205が設けられている。スイッチ205は、自装置のデータを上位装置に送信する場合に送信部53とドライバ54とを接続し、下位装置からのデータを上位装置に送信する場合にバッファ52とドライバ54とを接続するのに加え、上位装置からのデータを上位装置にループバック送信する場合に、レシーバ35の出力とドライバ54の入力とを接続することを行う。
【0180】
また、数値制御装置と複数の制御装置とは、通信ポートの一部として、例えば図26に示すような遅延測定回路を備えている。図26は、各装置の通信ポートに設けられる遅延測定回路の構成を示すブロック図である。
【0181】
図26に示す遅延測定回路210は、送信回路212が、図示しないCPU等からの送信起動によって発生する送信起動信号211を受けて測定データを発生する。この測定データは、ドライバ213から下位装置に向けて送信される。このとき、カウンタ217が送信起動信号211を受けてカウント動作を開始する。また、下位装置から送られてきた測定データは、レシーバ214から受信回路215に入力する。受信回路215は、測定データの受信を確認すると、停止信号216を出力する。カウンタ217は、停止信号216によってカウント動作を停止する。図示しないCPU等は停止信号216を受けて測定完了を確認し、カウンタ217のカウント値を取り込み、遅延時間を求める。
【0182】
次に、図27〜図29を参照して、測定例を説明する。なお、図27は、2つの装置間で遅延測定を行う場合の構成例である。図28は、複数の装置を跨いで遅延測定を行う場合の構成例である。図29は、各装置が下位の装置に対して遅延測定を行う場合の構成例である。
【0183】
図27において、数値制御装置193は、図26に示した遅延測定回路210を備え、制御装置194は、図25に示した通信ポートを備えている。すなわち、制御装置194は、スイッチ205は、レシーバ35(222)の出力とドライバ54(223)の入力とを接続するよう切り替えられている。これによって、制御装置194は、上位装置(数値制御装置)から送られてきたデータをそのまま折り返して上位装置(数値制御装置)に送信する。
【0184】
数値制御装置193が送信起動信号211によって測定データを送信すると、測定データは、ドライバ221から制御装置194に送られ、レシーバ222、ドライバ223を経由して数値制御装置193のレシーバ224に到達し、遅延測定回路210の受信回路215に入力する。遅延測定回路210の受信回路215が測定データの受信を確認すると、カウンタ217がカウント動作を停止する。このときのカウント値を読み込むことによって、数値制御装置193と制御装置194との間のデータ伝達遅延を測定することができる。
【0185】
図28において、数値制御装置193は、図26に示した遅延測定回路210を備え、制御装置194,195は、図25に示した通信ポートを備えている。すなわち、制御装置194では、スイッチ198がレシーバ35(232)とドライバ39(233)とを接続し、スイッチ205がレシーバ48(236)とドライバ39(237)とを接続するように切り替えられている。これにより、制御装置194は、上位装置からの測定データは下位装置に通過させ、下位装置からの測定データは上位装置に通過させる。また、制御装置194は、スイッチ205は、レシーバ35(234)の出力とドライバ54(235)の入力とを接続するよう切り替えられている。
【0186】
数値制御装置193が送信起動信号211によって測定データを送信すると、測定データは、ドライバ231から制御装置194に送られ、レシーバ232、ドライバ233を経由して制御装置195に送られる。制御装置195では、測定データがレシーバ234、ドライバ235を経由して制御装置194に送られる。制御装置194では、測定データがレシーバ236、ドライバ237を経由して数値制御装置193のレシーバ238に到達し、遅延測定回路210の受信回路215に入力する。遅延測定回路210の受信回路215が測定データの受信を確認すると、カウンタ217がカウント動作を停止する。このときのカウント値を読み込むことによって、数値制御装置193と制御装置194,195との間を往復するデータ伝達遅延を測定することができる。
【0187】
複数の制御装置がディジーチェーン接続方式で接続されている場合、図27,図28の動作を繰り返すことによって、最上位制御装置(数値制御装置)から下位に存在する各制御装置の往復の伝達時間を下位装置毎に測定することができる。
【0188】
図29において、数値制御装置193と制御装置194は、図26に示した遅延測定回路210を備え、制御装置195は、図25に示した通信ポートを備えている。制御装置194,195は、スイッチ205は、レシーバ35(242,252)の出力とドライバ54(243,253)の入力とを接続するよう切り替えられている。これによって、制御装置194,195は、上位装置から送られてきたデータをそのまま折り返して上位装置に送信する。
【0189】
数値制御装置193が送信起動信号211によって測定データを送信すると、測定データは、ドライバ241から制御装置194に送られ、レシーバ242、ドライバ243を経由して数値制御装置193のレシーバ244に到達し、遅延測定回路210の受信回路215に入力する。遅延測定回路210の受信回路215が測定データの受信を確認すると、カウンタ217がカウント動作を停止する。このときのカウント値を読み込むことによって、数値制御装置193と制御装置194との間のデータ伝達遅延を測定することができる。
【0190】
また、制御装置194が送信起動信号211によって測定データを送信すると、測定データは、ドライバ251から制御装置195に送られ、レシーバ252、ドライバ253を経由して制御装置194のレシーバ254に到達し、遅延測定回路210の受信回路215に入力する。遅延測定回路210の受信回路215が測定データの受信を確認すると、カウンタ217がカウント動作を停止する。このときのカウント値を読み込むことによって、制御装置194と制御装置195との間のデータ伝達遅延を測定することができる。この方法によれば、遅延時間の測定にかかる時間を短縮することが可能となる。
【0191】
このように、実施の形態5によれば、装置間のケーブル長に起因する伝達遅延や、ディジーチェーン接続線や分配器をデータが経由するときに発生する伝達遅延は、ケーブル長やシステムの構成によって変わるが、それを測定することができるので、システム毎に最適な伝達遅延補正量を設定することが可能となる。また、各装置が隣接する下位装置との間での転送遅延を測定できるので、遅延時間の測定にかかる時間を短縮することが可能となる。
【0192】
【発明の効果】
以上説明したように、この発明によれば、様々な制御装置で構成されるネットワークの複数個を、転送レート、通信周期の制御機能を持つ分配手段によってスター状に接続し、または、ディジーチェーン接続するので、数値制御装置が1つの通信ポートによって、様々な制御装置を制御することができる。このとき、分配手段が転送レート、通信周期の制御機能を持つので、各ネットワーク間の転送路の使用効率を上げることができ、また高速周期のデータと低速周期のデータとを並列に送信することが可能となる。さらに、転送遅延を測定する機能を付加することができるので、データの送信間隔を最小にする制御が行えるようになる。そして、各制御装置が送信タイミングを転送遅延値に基づき補正するようにしたので、データを衝突させることなく確実に送信することができる。また、衝突を防ぐために送信タイミング間に余分な空き時間を作る必要がないので、データを効率よく送信することが可能となる。
【図面の簡単な説明】
【図1】 この発明の実施の形態1である数値制御システムの構成を示すブロック図である。
【図2】 図1に示す分配器の構成を示すブロック図である。
【図3】 図1に示す分配器がデータの送信タイミングを制御する動作を説明するタイムチャートである。
【図4】 図1に示す数値制御装置の通信ポートの構成を示すブロック図である。
【図5】 図4に示す数値制御装置の通信ポートにて行われるシリアルデータの合成を説明するタイムチャートである。
【図6】 図1に示す制御装置の通信ポートの構成を示すブロック図である。
【図7】 図1に示す分配器の通信ポートの構成を示すブロック図である。
【図8】 図1に示す数値制御システムにて行われるデータの送受信を説明するタイムチャートである。
【図9】 工作機械の一般的な構成例を示す図である。
【図10】 図1に示す数値制御システムを図9に示す工作機械に適用した場合の構成例を示す図である。
【図11】 図1に示す数値制御システムの他の構成例(分配器の機能をネットワーク#1の最終端に位置する制御装置が持つ場合)を示す図である。
【図12】 この発明の実施の形態2である数値制御システムの構成を示すブロック図である。
【図13】 図12に示す分配器の構成を示すブロック図である。
【図14】 図12に示す分配器がデータの送信タイミングを制御する動作を説明するタイムチャートである。
【図15】 図12に示す数値制御装置にて行われるシリアルデータの合成を説明するタイムチャートである。
【図16】 図12に示す数値制御システムにて行われるデータの送受信を説明するタイムチャートである。
【図17】 図12に示す数値制御システムを図9に示す工作機械に適用した場合の構成を示す図である。
【図18】 図17に示す数値制御システムでの位置指令による制御を説明する制御系統図である。
【図19】 図12に示す数値制御システムの他の構成例(分配器の機能をネットワーク#1,#2の最終端に位置する制御装置が持つ場合)を示す図である。
【図20】 この発明の実施の形態3である数値制御システムの構成を示すブロック図である。
【図21】 図20に示す制御装置の通信ポートの構成を示すブロック図である。
【図22】 図20に示す数値制御システムにて行われる通信周期の遅延量によって送信タイミングを補正する動作を説明するタイムチャートである。
【図23】 この発明の実施の形態4である数値制御システムにて行われる送信順序を決定する動作を説明するフローチャートである。
【図24】 決定された送信順序によって送信タイミングを補正する動作を説明するタイムチャートである。
【図25】 この発明の実施の形態5である数値制御システムにおける制御装置の通信ポートの構成を示すブロック図である。
【図26】 各装置の通信ポートに設けられる遅延測定回路の構成を示すブロック図である。
【図27】 2つの装置間で遅延測定を行う場合の構成例を示す図である。
【図28】 複数の装置を跨いで遅延測定を行う場合の構成例を示す図である。
【図29】 各装置が下位の装置に対して遅延測定を行う場合の構成例を示す図である。
【符号の説明】
1 ネットワーク#1、2 ネットワーク#2、3 ネットワーク#3、4,170,171 分配器、11,193 数値制御装置、11〜14,21〜24,31〜33,194〜196 制御装置、210 遅延測定回路。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a numerical control system for machine tools and industrial machines.
[0002]
[Prior art]
In numerical control systems for machine tools and industrial machines, master control devices such as numerical control devices and motion controllers are equipped with drive control devices that drive servo motors, slave control devices such as DI / O contacts and sensor data control devices. Configured to control. The outline of a conventional numerical control system will be described below by taking a machine tool as an example.
[0003]
A machine tool is generally composed of a processing machine that processes a workpiece, and a transfer machine that loads an unprocessed work placed on a conveyance path into the processing machine, receives the processed workpiece from the processing machine, and carries it out.
[0004]
The processing machine is, for example, a table that fixes a work sent from a conveyance path, two servo motors that move the table to perform positioning on Cartesian coordinates, and an upper part of the table. It includes a spindle motor that performs machining, three drive control devices that individually control the two servo motors and the spindle motor, and a display operation panel.
[0005]
The three drive control devices are connected to a first communication port provided in the numerical control device by a daisy chain connection method. That is, the numerical control device gives commands such as position, speed, and torque to each drive control device via a single communication line connected in a daisy chain. Each drive control device sends state quantities such as position feedback, speed feedback, torque feedback, control function status, alarm information, etc. to the numerical control device via a single daisy chain communication line. ing.
[0006]
Next, for example, the above-described transport machine processes a servo motor that drives a transport path such as a belt, a plurality of position sensors arranged at predetermined positions on the transport path to detect the work, and a work on the transport path. A workpiece loading / unloading device that loads into and out of the machine, a servo motor that drives the workpiece loading / unloading device, a DI / O control device that captures the output signals of the plurality of position sensors, and the two servo motors individually And two drive control devices to be controlled.
[0007]
The two drive control devices are connected to a second communication port provided in the numerical control device by a daisy chain connection method, and the DI / O control device is connected to a third communication provided in the numerical control device. Connected to the port. The numerical control device sequence-controls the signal from the DI / O control device, and issues commands (position, speed, torque, etc.) to each of the two drive control devices connected to the third communication port according to the position of the workpiece. ) Is controlled to give commands.
[0008]
The display operation panel is connected to a fourth communication port provided in the numerical controller. That is, when the numerical control device sends a machining program, parameters, control state, etc. to the display of the display operation panel, the display displays the transmitted data. The operation panel transmits input data to the numerical controller.
[0009]
In a machine tool, a plurality of drive control devices included in a processing machine generally needs to drive and control a servo motor at a higher speed and with higher accuracy than a plurality of drive control devices included in a conveyor.
[0010]
As described above, in the conventional numerical control system constituting the machine tool, the numerical control device includes four communication ports, the plurality of drive control devices included in the processing machine, the plurality of drive control devices included in the conveyor, and the DI / The O control device and the display operation panel are each independently controlled. However, depending on the system, the DI / O control device and the display operation panel may be connected to the numerical control device by a daisy chain connection method, like the plurality of drive control devices. In this case, the numerical controller is provided with two or three communication ports.
[0011]
The communication line with the numerical control device is composed of a downstream transmission line from the numerical control device to each device and an upstream transmission line from each device to the numerical control device. At this time, when each device is connected by daisy chain connection, since data is transmitted from a plurality of devices to the upstream transmission line, the transmission cycle of the system is time-shared to determine the transmission timing of each device, The apparatus generates the transmission timing by a communication cycle counter so that transmission data does not collide.
[0012]
[Problems to be solved by the invention]
However, when controlling a network composed of various control devices starting from the numerical control device, in the conventional numerical control system, a plurality of networks are directly connected to the numerical control device. There was a problem that had to be done.
[0013]
Further, since the numerical control device needs to have communication ports as many as the number of networks to be controlled, it has to have as many networks as to control components such as a communication control circuit, a driver unit, and a receiver unit.
[0014]
In addition, when transmitting data from each control device to the numerical control device, each control device needs to have a sufficient margin for time-divided transmission timing in order to avoid data collision. In some cases, data interference may occur when each control device transmits data in a time-sharing manner.
[0015]
In other words, in a real-time system, it is indispensable to increase the control cycle in order to improve the performance of the control device. In such a case, the performance as a system is not improved. For this reason, it is necessary to increase the communication cycle. However, if the communication cycle increases, the transmission path delay, the synchronization pattern extraction delay at the communication port, and the data buffer required for daisy chain connection A considerable delay occurs, such as a ring delay.
[0016]
For example, when 16 drive control devices are daisy chain connected using an optical fiber which is the fastest communication medium at present, the propagation speed of light is about 5 nsec / m. Therefore, if the optical fiber length is 20 m, It takes 1.6 μs for the data of the numerical control device to reach the drive control device connected to the final stage. In this case, if the communication cycle is 125 μsec, the data delay reaches 1.28%, and if the communication cycle is 62.5 μsec, the data delay reaches 2.59%. End up. As a result, there is a problem in that data interference occurs when each control device transmits data in a time division manner.
[0017]
Furthermore, as the communication cycle becomes faster, a difference in processing capability between devices connected to the network becomes a problem. As described above, the control cycle and communication cycle of each device affect the system performance, but the controlled network is not necessarily composed of only high-performance devices. In other words, since data of a high-speed communication cycle for a high-performance device is transmitted / received by a low-speed device that does not require much performance, it becomes a heavy load when performing other processing in the low-speed device. .
[0018]
In addition, since the data transmitted on the network is fixed at an arbitrary timing within the communication cycle, when trying to transmit emergency stop information that urgently stops the system, an emergency occurred after the device itself transmitted In order to transmit the stop information, it is necessary to wait for the transmission timing of the next communication cycle, which causes a problem that a transmission delay due to the communication cycle occurs.
[0019]
The present invention has been made in view of the above, and an object of the present invention is to obtain a numerical control system in which a numerical control device can control a plurality of networks composed of various control devices by one communication port. To do.
[0020]
It is another object of the present invention to obtain a numerical control system capable of accurately measuring a network delay and performing control to minimize a data transmission interval.
[0021]
Another object of the present invention is to provide a numerical control system that can transmit high-speed data and low-speed data in parallel.
[0022]
[Means for Solving the Problems]
  In order to achieve the above object, a numerical control system according to the present invention includes at least a main network in which a numerical control device is arranged, and one or more control devices that perform a control operation in response to a command from the numerical control device. A numerical control system in which one or both of a transfer rate and a transfer cycle may be different between networks.The one or more slave networks with respect to the master networkTo the nodes connecting in a star shape, orThe one or more slave networks with respect to the master networkDistribution means for controlling transmission rates and communication cycles that are different between networks at nodes that connect to each other using a daisy chain connection method, and for transmitting and receiving a plurality of serial data between networks via a single communication lineAnd the subordinate devices below the highest-level device in a plurality of devices arranged on one transfer path determine the transmission timing to be transmitted in time division to the highest-level device by the transfer delay value between the devices. Means to correctIt is provided with.
[0023]
  According to the present invention, a plurality of networks composed of various control devices are connected in a star shape or distributed in a daisy chain by distribution means having a transfer rate and communication cycle control function. However, various control devices can be controlled by one communication port. At this time, since the distribution means has a function of controlling the transfer rate and communication cycle, the use efficiency of the transfer path between each network can be increased, and high-speed data and low-speed data can be transmitted in parallel. Is possible. Furthermore, since a function for measuring the transfer delay can be added, control for minimizing the data transmission interval can be performed.Since each control device corrects the transmission timing based on the transfer delay value, the data can be reliably transmitted without colliding. In addition, since it is not necessary to create an extra free time between transmission timings in order to prevent a collision, data can be transmitted efficiently.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
Exemplary embodiments of a numerical control system according to the present invention will be explained below in detail with reference to the accompanying drawings.
[0025]
Embodiment 1 FIG.
FIG. 1 is a block diagram showing the configuration of a numerical control system according to Embodiment 1 of the present invention. The numerical control system shown in FIG. 1 has a configuration in which three networks (# 1) 1, (# 2) 2 and (# 3) 3 are connected in a star shape by a distributor 4. The network (# 1) 1 is a main network, and a numerical control device 11 and a control device 12 connected thereto are arranged. The numerical controller 11 is connected to the controller 12 via the communication line 5, and the controller 12 is connected to the distributor 4 via the communication line 6.
[0026]
The network (# 2) 2 is a slave network, and three control devices 21, 22, and 23 are arranged. The three control devices 21, 22, and 23 are connected by a daisy chain-connected communication line 8, and the control device 21 is connected to the distributor 4 through the communication line 9.
[0027]
The network (# 3) 3 is a slave network, and three control devices 31, 32, and 33 are arranged. The three control devices 31, 32, and 33 are connected by a daisy chain-connected communication line 10, and the control device 31 is connected to the distributor 4 via the communication line 11.
[0028]
Here, between the networks, one or both of the transfer rate and the communication cycle may be different. In the first embodiment, the following is performed. That is, if the transfer rates of the networks (# 1) 1, (# 2) 2 and (# 3) 3 are Ta, Tb and Tc, Ta = Tb = Tc. If the communication cycles of the networks (# 1) 1, (# 2) 2 and (# 3) 3 are Pa, Pb and Pc, Pa = 2Pb = 2Pc. When the maximum transfer rate in the network group is the reference transfer rate T, T = Ta = Tb = Tc. Further, assuming that the minimum communication period in the network group is the reference communication period P, P = Pa.
[0029]
The distributor 4 arranged at the node of the star connection shown in FIG. 1 is a device that converts the difference in data distribution / aggregation between networks and the transfer rate between networks. For example, it is configured as shown in FIG. FIG. 2 is a block diagram showing a configuration of the distributor shown in FIG.
[0030]
In FIG. 2, serial data from the network # 1 is input to the receiver 35. The receiving unit 36 converts the serial data input from the receiver 35 into parallel data, and outputs the parallel data to the buffer 37 and the synchronization pattern extracting unit 40. The buffer 37 corrects and buffers the input parallel data with a correct pulse width, passes the data to be transferred to the network # 2 to the transmitter 38, and passes the data to be transferred to the network # 3 to the transmitter 46.
[0031]
The synchronization pattern extraction unit 40 extracts a synchronization signal included in the data converted in parallel by the reception unit 36 and generates a synchronization signal. The generated synchronization signal is sent to the communication period P counter 41. The communication cycle P counter 41 generates a reference communication cycle P for the network group based on the input synchronization signal. As a result, the numerical controller 11 and the distributor 4 are synchronized. The generated reference communication period P is sent to the communication period Pa counter 42 and the reference timing control unit 43.
[0032]
The communication cycle Pa counter 42 generates a communication cycle Pa used in the network # 1 synchronized with the numerical controller 11 based on the input reference communication cycle P. The generated communication cycle Pa is sent to the transmission unit 53.
[0033]
The reference timing control unit 43 controls the phase of each reference timing of the network # 2 and the network # 3 with respect to the reference timing of the communication cycle Pa of the network # 1 based on the inputted reference communication cycle P, and the reference of the controlled phase The communication period P is given to the communication period Pb counter 44 and the communication period Pc counter 45.
[0034]
The communication cycle Pb counter 44 generates a communication cycle Pb used in the network # 2 based on the inputted reference communication cycle P. The generated communication period Pb is sent to the transmission unit 38. As a result, the transmission unit 38 converts the parallel data passed from the buffer 37 into serial data at the timing of the input communication cycle Pb, and sends it to the network # 2 via the driver 39.
[0035]
The communication cycle Pc counter 45 generates a communication cycle Pc used in the network # 3 based on the inputted reference communication cycle P. The generated communication cycle Pc is sent to the transmitter 46. As a result, the transmission unit 46 converts the parallel data passed from the buffer 37 into serial data at the timing of the input communication cycle Pc, and sends it to the network # 3 via the driver 47.
[0036]
The serial data from the network # 2 is input to the receiver 48. The receiving unit 49 converts the serial data input from the receiver 48 into parallel data and outputs the parallel data to the buffer 52. The serial data from the network # 3 is input to the receiver 50. The receiving unit 51 converts serial data input from the receiver 50 into parallel data and outputs the parallel data to the buffer 52.
[0037]
The buffer 52 corrects the input two systems of parallel data to correct pulse widths and buffers them, and passes them to the transmitter 58. As a result, the transmission unit 38 converts the two systems of parallel data passed from the buffer 52 into serial data at the timing of the communication cycle Pa input from the communication cycle Pa counter 42, and the network # 1 via the driver 54. To send.
[0038]
Next, FIG. 3 is a time chart for explaining the operation in which the distributor 4 shown in FIG. 1 controls the data transmission timing. In FIG. 3, the communication cycle Pb (4) of the network # 2 and the communication cycle Pc (7) of the network # 3 are twice as long as the communication cycle Pa (1) of the network # 1. . Further, the communication cycle Pb (4) of the network # 2 and the communication cycle Pc (7) of the network # 3 are alternately switched.
[0039]
In FIG. 3B, data 1040 is data from the numerical control device 11 to the control device 12 of the network # 1. This is sent directly to the control device 12 of the network # 1 without going through the distributor 4.
[0040]
Data 1050 is data from the numerical control device 11 to the control devices 21, 22, and 23 of the network # 2. The distributor 4 looks at the address information specifying the network # 2 included in the header portion of the data 1050, generates the data 2040 shown in FIG. 3 (5), and sends it to the control devices 21, 22, 23 of the network # 2. Send.
[0041]
Data 1060 in the next communication cycle Pa (1) is data from the numerical control device 11 to the control devices 31, 32, and 33 of the network # 3. The distributor 4 looks at the address information designating the network # 3 included in the header portion of the data 1060, generates the data 3040 shown in FIG. 3 (8), and sends it to the control devices 31, 32, 33 of the network # 3. Send.
[0042]
3 (6), data 2050, 2060, 2070 transmitted from the control devices 21, 22, 23 of the network # 2 to the numerical control device 11 are collected into one packet by the distributor 4, 3 (3) is transmitted to the network # 1 as data 1080.
[0043]
Similarly, in FIG. 3 (9), data 3050, 3060, 3070 transmitted from the control devices 31, 32, 33 of the network # 3 to the numerical control device 11 are combined into one packet by the distributor 4, The data 1070 shown in FIG. 3 (3) is transmitted to the network # 1.
[0044]
As described above, the distributor 4 controls the phase of the communication cycle of the networks # 2 and # 3 as described above. Therefore, in the network # 1, the data of the networks # 2 and # 3 are alternately transmitted and received. Thus, the transfer path can be used efficiently.
[0045]
When the distributor as shown in FIG. 2 is used, the distributor aggregates and distributes data in units of packets, so that a data transfer delay depending on the communication cycle occurs. Next, a system in which no data transfer delay occurs will be described with reference to FIGS. FIG. 4 is a block diagram showing the configuration of the communication port of the numerical controller 11 shown in FIG. FIG. 5 is a time chart for explaining the serial data composition performed at the communication port of the numerical controller 11 shown in FIG. FIG. 6 is a block diagram showing a configuration of communication ports of the control devices 12, 21 to 23, and 31 to 33 shown in FIG. FIG. 7 is a block diagram showing the configuration of the communication port of the distributor 4 shown in FIG.
[0046]
In FIG. 4, a reference transfer rate (transfer clock) given from a CPU (not shown) is input to a minimum repetition data appearance period counter 57 and a communication period reference timing generation unit 58. The minimum repetition data appearance period counter 57 counts the minimum period in which serial data to be parallelized appears periodically according to the input reference transfer rate (transfer clock), and outputs the count value to the bit data insertion timing generation unit 59. To do. The bit data insertion timing generation unit 59 decodes the counter value from the minimum repetitive data appearance period counter 57 and generates a timing for inserting serial data to be parallelized.
[0047]
The generated insertion timing is determined by receiving units 1-20, 2-20, which receive data (serial data) from one input terminal of AND circuits 69, 70, 71 and networks # 1, # 2, # 3. 3-20. At the other input ends of the AND circuits 69, 70, 71, outputs of the transmission units 1-10, 2-10, 3-10 that generate data (serial data) to be given to the networks # 1, # 2, # 3 are provided. Entered. The outputs of the AND circuits 69, 70, 71 are input to one input terminal of the OR circuit 74 via the OR circuit 72.
[0048]
The communication cycle reference timing generation unit 58 operates a counter with a specified cycle according to the input reference transfer rate (transfer clock), generates a reference communication cycle timing, and outputs it to the reference bit pattern insertion unit 73. The reference bit pattern insertion unit 73 generates a reference bit pattern to be inserted into serial data for each reference communication cycle according to the timing generated by the communication cycle reference timing generation unit 58 and outputs the reference bit pattern to the other input terminal of the OR circuit 74. The output of the OR circuit 74 is sent to the networks # 1, # 2, and # 3 via the driver 75. Data (serial data) from the networks # 1, # 2, and # 3 is input in parallel to the receiving units 1-20, 2-20, and 3-20 via the receiver 64.
[0049]
The transmission units 1-10, 2-10, and 3-10 have the same configuration. The transmission timing generation unit 61 compares the transmission timing given from a CPU (not shown) and the like with the counter value of the communication cycle, and generates a transmission timing signal if it matches, and gives it to the data transmission unit 62. The data transmission unit 62 converts parallel data given from a CPU (not shown) into serial data, and gives it to the serial data modulation unit 63 in synchronization with the transmission timing given from the transmission timing generation unit 61. The serial data modulation unit 63 modulates the input serial data by a modulation method such as NRZ, NRZI, 8B10B, etc., and outputs it to the other input terminals of the AND circuits 69, 70, 71.
[0050]
That is, the serial data generated by the transmission units 1-10, 2-10, and 3-10 in this way is generated by the AND circuits 69, 70, and 71 at the timing generated by the bit data insertion timing generation unit 59. The logical product with the signal is taken, and each becomes serial data at a prescribed timing in the bit string. The serial data generated in parallel is combined by the OR circuit 72 to become one serial data. The combined serial data is inserted with the bit pattern of the reference communication cycle generated by the reference bit pattern insertion unit 73 by the OR circuit 74 and transmitted to the networks # 1, # 2, and # 3 by the driver 75.
[0051]
With reference to FIG. 5, the composition of the serial data generated by transmission units 1-10, 2-10, and 3-10 will be specifically described. In FIG. 5, the reference transfer rate (1) is that the 4-bit data is the minimum number of repeated data appearances. The minimum repetition data appearance period counter 57 counts “1” to “4” in synchronization with the timing at which the reference bit pattern is inserted. The first and second bit cycles are assigned as serial data to the network # 1, the third is assigned as serial data to the network # 2, and the fourth is assigned as serial data to the network # 3.
[0052]
These timings are generated by decoding the output value of the minimum repetition data appearance period counter 57 in the bit data insertion timing generation unit 59. As a result, the AND circuit 69 that receives the output of the transmission unit 1-10 outputs the serial bit string (3) for network # 1. The AND circuit 70 that receives the output of the transmission unit 2-10 outputs the serial bit string (4) for the network # 2. The AND circuit 71 that receives the output of the transmission unit 3-10 outputs the bit string (5) for network # 3. In the OR circuit 72, a serial bit string (2) obtained by synthesizing them is obtained.
[0053]
Next, the receiving units 1-20, 2-20, and 3-20 have the same configuration. The latch circuit 65 latches the serial data from the receiver 64 by the timing signal output from the bit data insertion timing generation unit 59 and outputs the latched data to the serial data demodulation unit 66. The serial data demodulator 66 demodulates the latched serial data by a demodulation method such as NRZ, NRZI, 8B10B, etc., and outputs the demodulated data to the data receiver 67. The data receiver 67 converts the serial data from the serial data demodulator 66 into parallel data, and outputs the parallel data to an external reception processing system.
[0054]
That is, in the receiving units 1-20, 2-20, and 3-20, the data received by the receiver 64 is latched by the latch circuit 65 at the timing given from the bit data insertion timing generating unit 59. The network data can be received separately from the serial data.
[0055]
In the example of FIG. 5, since the serial data received by the receiver 64 corresponds to FIG. 5 (2), the latch circuit 65 of the receiving unit 1-20 latches the serial data shown in FIG. 5 (3). The latch circuit 65 of the receiving unit 2-20 latches the serial data shown in FIG. The latch circuit 65 of the receiving unit 3-20 latches the serial data shown in FIG. As described above, in the reception units 1-20, 2-20, and 3-20, the synthesized serial data is separated into the respective serial data.
[0056]
Next, communication ports of the control devices 12, 21 to 23, and 31 to 33 will be described. In FIG. 6, a receiver 84 receives serial data sent from a host device. The output of the receiver 84 is given to one input of the reception clock generation unit 81, the reference bit pattern detection unit 82, the reception unit 1-21, and the OR circuit 86.
[0057]
The reception clock generation unit 81 detects a reference transfer rate that is a reception clock from the received serial data, and outputs it to the minimum repetition data appearance period counter 80. Further, the reference bit pattern detection unit 82 detects the reference bit pattern in the received serial data and outputs the timing signal to the minimum repeated data appearance period counter 80.
[0058]
The minimum repetition data appearance period counter 80 counts the minimum period in which serial data appears periodically based on the reference transfer rate detected by the reception clock generation unit 81, and sends the count value to the bit data insertion timing generation unit 83. Output. At that time, the timing of the counter is corrected by the timing signal from the reference bit pattern detection unit 82.
[0059]
The bit data insertion timing generation unit 83 decodes the count value from the minimum repetitive data appearance period counter 80 and generates a timing signal for inserting serial data. The generated timing signal is supplied to one input of the AND circuit 85, the receiving unit 1-21, the one input of the AND circuit 94, and the receiving unit 1-22. The other input of the AND circuit 85 is supplied with the output of the transmission unit 1-11, and the output of the AND circuit 85 is supplied to the other input of the OR circuit 86. The output of the OR circuit 86 is sent to the lower order device via the driver 87.
[0060]
Further, the receiver 97 receives serial data sent from the lower device. The output of the receiver 97 is given to the receiving unit 1-22 and one input of the OR circuit 95. The output of the transmission unit 1-12 is given to the other input of the AND circuit 94. The output of the AND circuit 94 is given to the other input of the OR circuit 95. The output of the OR circuit 95 is sent to the lower order device via the driver 96.
[0061]
The transmission unit 1-11 to the lower device and the transmission unit 1-12 to the upper device have the same configuration. That is, the transmission timing generation unit 91 compares the transmission timing given from a CPU (not shown) and the like with the counter value of the communication cycle, generates a transmission timing signal when they match, and provides the data transmission unit 92 with the transmission timing signal. The data transmission unit 92 converts parallel data given from a CPU (not shown) into serial data, and gives it to the serial data modulation unit 93 in synchronization with the transmission timing given from the transmission timing generation unit 91. The serial data modulation unit 93 modulates the input serial data by a modulation method such as NRZ, NRZI, 8B10B, etc., and outputs it to the other input terminals of the AND circuits 85 and 94.
[0062]
As a result, the output of the transmission unit 1-11 to the lower-level device is logically ANDed with the timing signal generated by the bit data insertion timing generation unit 83 by the AND circuit 85, and specified in the bit string. Serial data at the timing. Then, it is combined with the serial data sent from the host device by the OR circuit 86 to become one serial data. The synthesized serial data is transmitted to the lower order device by the driver 87.
[0063]
Further, the output of the transmission unit 1-12 to the higher-level device is ANDed with the timing signal generated by the bit data insertion timing generation unit 83 by the AND circuit 94, and a prescribed timing in the bit string is obtained. Serial data in Then, it is combined with the serial data sent from the lower device by the OR circuit 95 to become one serial data. The combined serial data is transmitted to the host device by the driver 96.
[0064]
The receiving unit 1-21 that receives data from the higher-level device and the receiving unit 1-22 that receives data from the lower-level device have the same configuration. That is, the latch circuit 88 latches the serial data from the receivers 84 and 97 by the timing signal output from the bit data insertion timing generation unit 83 and outputs the latched serial data to the serial data demodulation unit 89. The serial data demodulator 89 demodulates the latched serial data by a demodulation method such as NRZ, NRZI, 8B10B, etc., and outputs the demodulated data to the data receiver 90. The data receiving unit 90 converts serial data from the serial data demodulating unit 89 into parallel data, and outputs the parallel data to an external reception processing system.
[0065]
That is, in the receiving units 1-21, 1-22, the data received by the receivers 84, 97 are latched by the latch circuit 88 at the timing given from the bit data insertion timing generating unit 59, so that they are synthesized. Data addressed to the device can be received from serial data.
[0066]
Next, the communication port of the distributor 4 will be described. This corresponds to the receiving unit 36 and transmitting unit 53 on the network # 1 side, the transmitting unit 38 and receiving unit 49 on the network # 2 side, the transmitting unit 46 and the receiving unit 51 on the network # 3 side shown in FIG. Yes.
[0067]
In FIG. 7, the receiver 104 receives data from the network # 1. The output of the receiver 104 is given to the reception clock generation unit 101, the reference bit pattern detection unit 102, and the latch circuits 105 and 110. The output of the latch circuit 105 is sent to the network # 2 via the driver 106. The output of the latch circuit 110 is sent to the network # 3 through the driver 111.
[0068]
The reception clock generation unit 101 detects a reference transfer rate that is a reception clock from the received serial data, and outputs it to the minimum repetition data appearance period counter 100. Further, the reference bit pattern detection unit 102 detects the reference bit pattern in the received serial data and outputs the timing signal to the minimum repetition data appearance period counter 100.
[0069]
The minimum repetition data appearance period counter 100 counts the minimum period in which serial data appears periodically based on the reference transfer rate detected by the reception clock generation unit 101, and outputs the count value to the bit data insertion timing generation unit 103. Output. At that time, the timing of the counter is corrected by the timing signal from the reference bit pattern detection unit 102.
[0070]
The bit data insertion timing generation unit 103 decodes the count value from the minimum repetitive data appearance period counter 100 and generates two reference timing signals for inserting serial data. One of the generated reference timing signals (timing signal of transfer rate Tb) is applied to one input of the latch circuit 105 and the AND circuit 108, and the other of the generated reference timing signals (timing signal of transfer rate Tc). Is supplied to one input of the latch circuit 110 and the AND circuit 113.
[0071]
The other input of the AND circuit 108 is given the output of the receiver 107 that receives data from the network # 2. The other input of the AND circuit 113 is given the output of the receiver 112 that receives data from the network # 3. The outputs of the AND circuits 108 and 113 are combined by the OR circuit 109 and sent to the network # 1 via the driver 114.
[0072]
In the above configuration, data from the network # 1 is converted into data at the transfer rate Tb by the latch circuit 105 according to the reference timing from the bit data insertion timing generation unit 103, and transmitted to the network # 2 by the driver 106. . The data from the network # 1 is converted into data at the transfer rate Tc by the latch circuit 110 according to the reference timing from the bit data insertion timing generation unit 103, and transmitted to the network # 3 by the driver 111.
[0073]
The data from the networks # 2 and # 3 is synchronized with the timing signal from the bit data insertion timing generation unit 103 by the AND circuits 108 and 113, and is synthesized into one serial data by the OR circuit 109. , Transmitted to network # 1.
[0074]
Here, when the distributor 4 having the communication port as shown in FIG. 7 is used, the transfer rate Ta of the network # 1 is Ta = T, the transfer rate Tb of the network # 2 is Tb = 1 / 2T, The transfer rate Tc of the network # 3 is Tc = 1 / 2T.
[0075]
Next, FIG. 8 is a time chart for explaining data transmission / reception performed in the numerical control system shown in FIG. In FIG. 8, the relationship between data flowing in the networks # 1, # 2, and # 3 is shown by the bit pattern shown in FIG.
[0076]
In FIG. 8, the numerical control device 11 has serial data 1110 combined with the reference bit pattern 1100 as transmission data (2) to the networks # 1, # 2, and # 3 at the timing of the reference communication cycle P (1). And send. The serial data 111 transmitted from the numerical control device 11 is separated into three parallel serial data in a prescribed order by the control device 12 and the distributor 4 in a bit sequence.
[0077]
Therefore, in the network # 1, data 1130 separated from the synthesized serial data 1110 is transmitted as transmission data (5) from the numerical control device 11 to the control device 12 at the timing of the communication cycle Pa (4).
[0078]
In the network # 2, data 2110 and 2120 separated from the synthesized serial data 1110 are transmitted as transmission data (8) from the numerical control device 11 to the control devices 21 and 22 at the timing of the communication cycle Pb (7). Sent. Data 2130 separated from the serial data in the next reference communication cycle P (1) is transmitted to the control device 23.
[0079]
Similarly, in the network # 3, data 3110 separated from the synthesized serial data 1110 is transmitted as transmission data (11) from the numerical control device 11 to the control device 31 at the timing of the communication cycle Pc (10). . Data 3120 and 3130 separated from the serial data in the next reference communication cycle P (1) are transmitted to the control devices 32 and 33.
[0080]
On the other hand, in the network # 3, the control device 31 transmits data 3140 as transmission data (12) to the numerical control device 11 at the timing of the communication cycle Pc (10). In addition, the control devices 32 and 33 transmit data 3150 and 3160 in the next communication cycle Pc (10).
[0081]
In the network # 2, the control devices 21 and 22 transmit data 2140 and 2150 as transmission data (9) to the numerical control device 11 at the timing of the communication cycle Pb (7). Further, the control device 23 transmits the data 2160 in the next communication cycle Pb (7).
[0082]
Similarly, in the network # 1, the control device 12 transmits data 1140 as transmission data (6) to the numerical control device 11 at the timing of the communication cycle Pa (4). The transmission data 1140 from the control device 12, the transmission data 2140 and 2150 from the control devices 21 and 22 and the transmission data 3140 from the control device 31 are received by the distributor 4 at the timing of the reference communication cycle P (1). Are received by the numerical control device 11 as data 1120 (3).
[0083]
Similarly, data 2160 sent by the control device 23 in the next communication cycle Pb (7), data 3150 and 3160 sent by the control devices 32 and 33 in the next communication cycle Pc (10), and control device 12 sends the next communication. The data (6) sent in the cycle Pa (4) is synthesized at the timing of the next reference communication cycle P (1) and received by the numerical controller 11 (3).
[0084]
Here, in the first embodiment, the minimum repetition data appearance cycle is 4 bits and the serialized serial data is 3, but generally, the relationship is as follows.
[0085]
The reference transfer rate (physical maximum transfer rate) is T [bits / second], the minimum repetition data appearance cycle is Nr [bits], the reference communication cycle is P [seconds], and the communication cycle of serial data data to be parallelized is When “P, 2 × P, 3 × P,..., Χ × P” (where χ is a natural number), the number of serial data in each communication cycle is “N1, N2, NThree,..., Nχ ″, all serial data numbers Np to be parallelized are
[0086]
[Expression 1]
Figure 0004118695
It becomes.
[0087]
The minimum repetition data appearance period Nr (natural number) is
[Expression 2]
Figure 0004118695
It becomes. Further, the logical transfer rate of the reference communication cycle is T × Nr / 2 [bit / second].
[0088]
Next, an application example of the numerical control system shown in FIG. 1 will be described with reference to FIGS. FIG. 9 is a diagram illustrating a general configuration example of a machine tool. 10 is a diagram showing a configuration example when the numerical control system shown in FIG. 1 is applied to the machine tool shown in FIG.
[0089]
In FIG. 9, a machine tool generally includes a processing machine 120 that processes a workpiece, and a transfer machine 121 that loads an unprocessed workpiece placed on a conveyance path into the processing machine 120, receives a processed workpiece from the processing machine 120, and carries it out. And is composed of. A high power panel 122 and a display operation panel 123 are provided on the processing machine 120 side, and a high power panel 124 is provided on the transport machine 121 side.
[0090]
The processing machine 120 includes a table 130 for fixing a work sent from the conveyance path, two servo motors 132 and 133 for performing positioning on the Cartesian coordinates by moving the table 130, and an upper part of the table 130. A spindle motor 138 that is installed and processes a workpiece is provided.
[0091]
The servo motors 132 and 133 are coupled to the table 130 via ball screws 134 and 135, respectively, and by driving the ball screws 134 and 135, the table 130 is moved in a linear direction. The servo motors 132 and 133 are provided with encoders 136 and 137, respectively.
[0092]
The high-power panel 122 is provided with three drive control devices 141, 142, and 143 that individually control the numerical control device 140, the two servo motors 132 and 133, and the spindle motor 138, respectively. The three drive control devices 141, 142, and 143 are connected to one communication port (first communication port) of the numerical control device 140 via a communication line 160 using a daisy chain connection method.
[0093]
That is, the numerical controller 140 gives commands such as position, speed, and torque to the drive controllers 141, 142, and 143 through one communication line 160 connected in a daisy chain. The drive control devices 141, 142, and 143 send state quantities such as position feedback, speed feedback, and torque feedback, control function states, alarm information, and the like via a single daisy chain communication line. To send to.
[0094]
Next, the transport machine 121 includes a servo motor 148 that drives a transport path such as a belt, a plurality of position sensors 145, 146, and 147 disposed at predetermined positions on the transport path to detect a workpiece, A workpiece loading / unloading device 150 for loading and unloading the workpiece into / from the processing machine 120 and a servo motor 149 for driving the workpiece loading / unloading device 150 are provided.
[0095]
The high-power panel 124 includes two drive control devices 153 and 154 that individually control the two servo motors 148 and 149, and a DI / O control device that captures output signals from a plurality of position sensors 145, 146, and 147. 155 are arranged.
[0096]
The two drive control devices 153 and 154 are connected to a second communication port provided in the numerical control device 140 via a daisy chain connection type communication line 161, and the DI / O control device 155 includes a numerical control. It is connected to a third communication port provided in the device 140 via an independent communication line 162.
[0097]
The numerical control device 140 performs sequence control on the signal from the DI / O control device 155, and outputs a command (position) to each of the two drive control devices 153 and 154 that are daisy chain connected to the third communication port according to the position of the workpiece. , Speed, torque, etc.) and control the timing.
[0098]
The display operation panel 123 is connected to a fourth communication port provided in the numerical control device 140. That is, when the numerical controller 140 sends a machining program, parameters, control status, etc. to the display of the display operation panel 123, the display displays the transmitted data. In addition, the operation panel transmits input data to the numerical controller 140.
[0099]
As described above, in a numerical control system constituting a general machine tool, a numerical control device includes four communication ports, a plurality of drive control devices included in a processing machine, a plurality of drive control devices included in a conveyor, and DI. The / O control device and the display operation panel are controlled independently. However, depending on the system, the DI / O control device and the display operation panel may be connected to the numerical control device by a daisy chain connection method, like the plurality of drive control devices. In this case, the numerical controller is provided with two or three communication ports.
[0100]
In a machine tool, a plurality of drive control devices included in a processing machine generally needs to drive and control a servo motor at a higher speed and with higher accuracy than a plurality of drive control devices included in a conveyor. In addition, the drive control device, the DI / O control device, the display device, and the operation panel that control the transport device do not require high-speed and high-precision control performance. Therefore, when the numerical control system shown in FIG. 9 is replaced with the numerical control system shown in FIG. 1, for example, the result is as shown in FIG.
[0101]
In FIG. 10, a network composed of the numerical control device 140 and the drive control devices 141, 142, and 143 arranged on the high power board 122 of the processing machine 120 corresponds to the network # 1 shown in FIG. A network composed of the drive control devices 153 and 154 and the DI / O control device 155 arranged on the high power board 124 of the transport machine 121 corresponds to the network # 2 shown in FIG. The network constituted by the display operation panel 123 corresponds to the network # 3 shown in FIG. These three networks are connected in a star shape by a distributor 4. In this way, the number of communication lines connecting the high power boards is greatly reduced.
[0102]
According to this configuration, the amount of data that can be transmitted and received within one communication cycle in the network # 1 is Pa × Ta × 8 [bytes]. On the other hand, in the networks # 2 and # 3, since the communication cycle is half of the communication cycle of the network # 1, the amount of data that can be transmitted and received in one communication cycle is Pb × Tb × 8 [bytes] = Pc × Tc × 8 [ Byte] = 2 × (Pa × Ta × 8) [Byte].
[0103]
Therefore, the transfer rate in the networks # 2 and # 3 may be Tb = Tc = 1 / 2Ta. In other words, drivers, receivers, and communication circuits for high-speed communication are more expensive as they are faster, so drivers, receivers, and communication circuits used in networks # 2 and # 3 that do not require high-speed transfer rates. Cost can be reduced.
[0104]
In FIG. 1, the distributor is a single device, but as shown in FIG. 11, the control device connected to the final end of the network # 1 can have the function of the distributor. FIG. 11 is a diagram showing another configuration example of the numerical control system shown in FIG. 1 (in the case where the controller located at the final end of the network # 1 has the function of a distributor). FIG. 11 shows a case where the distributor 4 shown in FIG. 1 is omitted and the controller 13 has the function of the distributor instead of the controller 12.
[0105]
Thus, according to the first embodiment, since a plurality of networks composed of various control devices are connected in a star shape by a distributor having a transfer rate and communication cycle control function, the numerical control device Various control devices can be controlled by one communication port. At this time, since the distributor has a function of controlling the transfer rate and communication cycle, it is possible to improve the use efficiency of the transfer path between each network, and to transmit the high-speed data and the low-speed data in parallel. Is possible. Furthermore, by connecting the network in a star shape, it becomes easy to arrange the control device at a necessary place. Note that a network device that handles low-cycle data does not require a high transfer rate, and thus the cost of drivers, receivers, and communication circuits can be reduced.
[0106]
Embodiment 2. FIG.
FIG. 12 is a block diagram showing the configuration of the numerical control system according to the second embodiment of the present invention. In FIG. 12, the same reference numerals are given to the same or equivalent components as those shown in FIG. Here, the description will be focused on the portion related to the second embodiment.
[0107]
In the numerical control system shown in FIG. 12, a network (# 2) 2 that is a slave network is connected to a network (# 1) that is a main network via a distributor 170, and a distributor 171 is connected to the network (# 2) 2. A network (# 3) 3 which is a slave network is connected through the network. That is, the networks (# 2) 2 and (# 3) 3 are daisy chain connected to the network (# 1) 1 via the distributors 170 and 171.
[0108]
Here, between the networks, one or both of the transfer rate and the communication cycle may be different. In the second embodiment, the following is performed. That is, assuming that the transfer rates of the networks (# 1) 1, (# 2) 2 and (# 3) 3 are Ta, Tb and Tc, 1 / 2Ta = Tb = 1 / 2Tc. Further, if the communication cycles of the networks (# 1) 1, (# 2) 2 and (# 3) 3 are Pa, Pb and Pc, Pa = 1 / 2Pb = 2Pc. When the maximum transfer rate in the network group is the reference transfer rate T, T = Tb. Further, assuming that the minimum communication cycle in the network group is the reference communication cycle P, P = Pb.
[0109]
Distributors 170 and 171 shown in FIG. 12 are devices that convert data distribution and aggregation operations between networks and differences in transfer rates between networks. For example, it is configured as shown in FIG. FIG. 13 is a block diagram showing a configuration of the distributor shown in FIG. In FIG. 13, the same reference numerals are given to components that are the same as or equivalent to the configuration shown in FIG. 2. Here, the description will focus on the parts related to the second embodiment.
[0110]
When FIG. 13 shows the configuration of the distributor 170, the receiver 35 receives data from the network # 1, and the driver 39 transmits data to the network # 2. The communication cycle Pb (Pc) counter 176 generates a communication cycle Pb of the network # 2 and a transmission timing signal to the network # 2. The receiver 48 receives data from the network # 2, and the driver 54 transmits data to the network # 1. The communication cycle Pa (Pb) counter 175 generates a communication cycle Pa of the network # 1 and a transmission timing signal to the network # 1.
[0111]
When FIG. 13 shows the configuration of the distributor 171, the receiver 35 receives data from the network # 2, and the driver 39 transmits data to the network # 3. The communication period Pb (Pc) counter 176 generates a communication period Pc of the network # 3 and a transmission timing signal to the network # 3. The receiver 48 receives data from the network # 3, and the driver 54 transmits data to the network # 2. The communication cycle Pa (Pb) counter 175 generates a communication cycle Pb of the network # 2 and a transmission timing signal to the network # 2.
[0112]
Next, FIG. 14 is a time chart for explaining the operation in which the distributor shown in FIG. 12 controls the data transmission timing. In FIG. 14, the numerical control device 11 has data 1041 to the control device 12 of the network # 1, data 1051 to the control devices 21, 22, and 23 of the network # 2, and the network at the timing of the communication cycle Pa (1). Data 1061 is transmitted to the control devices 31, 32, 33 of # 3.
[0113]
Data 1051 to the control devices 21, 22, and 23 is sent to the network # 2 via the distributor 170 at the timing of the communication cycle Pb (4) (5). Since the communication cycle Pb of the network # 2 is ½ of the communication cycle Pa of the network # 1, the data 1051 includes instructions for two cycles of the control devices 21, 22, 23 of the network # 2. Yes.
[0114]
In the data 1051, the data arrangement of the first cycle and the second cycle is determined. The distributor 170 transmits the data of the first period and the data of the second period to the control devices 21, 22, and 23 of the network # 2, respectively, depending on the data arrangement.
[0115]
Data 1061 to the control devices 31, 32, and 33 is first transmitted to the network # 2 via the distributor 170 at the timing of the communication cycle Pb (4) (5). The data 2081 transmitted to the network # 2 is transmitted to the network # 3 as the data 3041 through the distributor 171 at the timing of the communication cycle Pc (7) (8).
[0116]
Each of the data 1051 and 1061 includes address information designating a network in its header portion, and the distributors 170 and 171 transmit data to each network based on the address information. Since the phase of the communication cycle Pc of the network # 3 is controlled by the reference timing control unit 43 of the distributor 171, the data delay in the network # 1 and the network # 3 is minimized.
[0117]
Further, the data 2051, 2061, 2071, etc. (6) transmitted from the control devices 21, 22, 23 of the network # 2 to the numerical control device 11 at the timing of the communication cycle Pb (4) are distributed by two cycles. The data is collected into one packet by 170 and transmitted to the network # 1 as data 1081 at the timing of the communication cycle Pa (1) (3).
[0118]
Data 3051, 3061, 3071, etc. (9) transmitted from the control devices 31, 32, 33 of the network # 3 to the numerical control device 11 at the timing of the communication cycle Pc (7) are converted into one packet by the distributor 171. At the timing of the communication cycle Pb (4), the data 2091 is transmitted to the network # 2 (6), and at the timing of the communication cycle Pa (1), the distributor 170 transmits the data 1071 to the network # 1. (3).
[0119]
Here, the network # 2 mediates the data exchange between the networks # 1 and # 3 in this way, but the communication cycle Pb of the network # 2 is half of the communication cycles Pa and Pc of the networks # 1 and # 3. Therefore, when all the transfer rates are the same, the amount of data that can be transmitted and received in one communication cycle of the network # 2 is halved. Therefore, in the second embodiment, by setting the transfer rate Tb of the network # 2 to Tb = 2 × Ta = 2 × Tc, the amount of data that can be transmitted / received within one communication cycle is the network # 1, # 2, # 3. To be the same between.
[0120]
Next, in the numerical control system shown in FIG. 12, when the distributor is configured as shown in FIG. 13, a data transfer delay occurs as in the first embodiment. Next, a system in which no data transfer delay occurs will be described. The communication port of the numerical control device 11 can be configured as shown in the first embodiment (FIG. 4), and the communication ports of the control devices 12, 21 to 23, 31 to 33 are shown in the first embodiment (FIG. 6). The communication ports of the distributors 170 and 171 can be configured almost as shown in the first embodiment (FIG. 7). Therefore, the serial data on the communication line is as shown in FIG. 15, and the data is transmitted as shown in FIG.
[0121]
FIG. 15 is a time chart for explaining the serial data composition performed at the communication port of the numerical controller 11 shown in FIG. In FIG. 15, the reference transfer rate (1) is such that 4-bit data is the minimum number of repeated data appearances. Serial data (3) for network # 1, serial data (4) for network # 2, and serial data (5) for network # 3 are combined and sent to the communication line (2), network # 1, It is given in parallel to # 2 and # 3.
[0122]
Next, since the communication port of each device operates with the contents described in the first embodiment, data transmission / reception is performed according to the procedure shown in FIG. FIG. 16 is a time chart for explaining data transmission / reception performed in the numerical control system shown in FIG.
[0123]
In FIG. 16, the numerical control device 11 has serial data 1111 combined with the reference bit pattern 1101 as transmission data (2) to the networks # 1, # 2, and # 3 at the timing of the reference communication cycle P (1). And send. Serial data 1111 transmitted from the numerical control device 11 is separated into three parallel serial data in a prescribed order by the control device 12 and distributors 170 and 171.
[0124]
Therefore, in the network # 1, the data 1041 separated from the synthesized serial data 1111 is transmitted as transmission data (5) from the numerical control device 11 to the control device 12 at the timing of the communication cycle Pa (4).
[0125]
In the network # 2, the data 1051 separated from the synthesized serial data 1111 is transmitted as the transmission data (8) from the numerical control device 11 to the control devices 21, 22, and 23 at the timing of the communication cycle Pb (7). Sent.
[0126]
Similarly, in the network # 3, data 1061 separated from the synthesized serial data 1111 as transmission data (11) from the numerical control device 11 to the control devices 31, 32, and 33 at the timing of the communication cycle Pc (10). Is sent.
[0127]
On the other hand, in the network # 3, the control devices 31, 32, and 33 transmit data 3051, 3061, and 3071 as transmission data (12) to the numerical control device 11 at the timing of the communication cycle Pc (10).
[0128]
In the network # 2, the control devices 21, 22, and 23 transmit data 2051, 2061, and 2071 as transmission data (9) to the numerical control device 11 at the timing of the communication cycle Pb (7).
[0129]
Similarly, in the network # 1, the control device 12 transmits data 1071 as transmission data (5) to the numerical control device 11 at the timing of the communication cycle Pa (4). The transmission data 1071 from the control device 12, the transmission data 2051, 2061, 2071 from the control devices 21, 22, 23, and the transmission data 3051, 3061 from the control devices 31, 32 are in the reference communication cycle P (1). At the timing, the signals are combined by the receiving units of the distributors 170 and 171 and the receiving unit of the control device 12 and received as data 1121 by the numerical control device 11 (3).
[0130]
Similarly, the data 3071 (12) sent by the control device 33 in the same communication cycle Pb (7) and the data (9) sent by the control devices 21, 22, and 23 in the same communication cycle Pc (10) are the same reference communication. They are synthesized at the timing of the period P (1) and received by the numerical controller 11 (3).
[0131]
Next, an application example of the numerical control system shown in FIG. 12 will be described with reference to FIG. FIG. 17 is a diagram showing a configuration example when the numerical control system shown in FIG. 12 is applied to the machine tool shown in FIG.
[0132]
As described in the first embodiment, the drive control device that drives the processing machine generally requires high-speed and high-precision control performance. In addition, the control loop of the drive control device that drives the processing machine is composed of position, speed, and current control loops. When the command from the numerical control device is given as the position command, the control loop is driven from the numerical control device. Since the position command to the control device is an open loop, it is not necessary to take in feedback data from the drive control device to the controller on the numerical control device side.
[0133]
Therefore, in the second embodiment, assuming the drive control device that drives the processing machine, the communication cycle of the network # 2 configured by the control devices 21, 22, and 23 is the communication cycle of the networks # 1 and # 3. Is shorter. Even with such a configuration, the high speed and high accuracy of the control devices 21, 22, and 23, which are drive control devices for driving the processing machine, are guaranteed.
[0134]
Therefore, the configuration when the numerical control system shown in FIG. 12 is applied to the machine tool shown in FIG. 9 is as shown in FIG. 17, for example. In FIG. 17, the numerical control device 140 is arranged with the drive control devices 141, 142, and 143 that drive the processing machine 120 in the high electrical panel 122 in FIG. 9, but in FIG. It is arranged together with the display operation panel 123 in the provided high power panel 168. A network composed of the numerical controller 140 and the display operation panel 123 corresponds to the network # 1 shown in FIG.
[0135]
Further, the network composed of the drive control devices 141, 142, and 143 that drive the processing machine 120 corresponds to the network # 2 shown in FIG. 12, and is daisy chain connected to the network # 1 via the distributor 170. Yes. Further, a network composed of the drive control devices 153 and 154 that drive the conveyance path and the DI / O control device 155 that detects the position information of the work corresponds to the network # 3 shown in FIG. Are connected in a daisy chain via a distributor 171. In this way, the number of communication lines connecting the high power boards is greatly reduced.
[0136]
Next, FIG. 18 is a control system diagram for explaining the control based on the position command in the numerical control system shown in FIG. In FIG. 18, the numerical control device 180 and the drive control device 181 are connected via a network 183, and the position command issued by the position command generation unit 182 included in the numerical control device 180 is transmitted via the network 183. Sent to. In the drive control device 181, the computing unit 184 calculates an error between the received position command and the position feedback information from the encoder 189 and sends it to the position controller 185.
[0137]
The position controller 185 multiplies an error between the position command and the position feedback by an appropriate gain to generate a speed command. For the speed command, an error from the speed feedback obtained by differentiating the position feedback from the encoder 190 by the differentiator 191 is calculated by the calculator 186 and sent to the speed controller 187. The speed controller 187 multiplies an error between the speed command and the speed feedback by an appropriate gain, generates a current command, and sends the current command to the current controller 188. The current controller 188 multiplies the current command by an appropriate gain and drives the servo motor 189. As described above, the drive control device 181 can drive and control the servo motor 189 only by being given a command by the position from the numerical control device 180.
[0138]
In FIG. 12, the distributors 170 and 171 are one device. However, as shown in FIG. 19, the control device connected to the final end of the network # 1 has the function of the distributor 170, and the network # It is also possible to give the function of the distributor 171 to the control device connected to the last end of the two. FIG. 19 is a diagram showing another configuration example of the numerical control system shown in FIG. 12 (in the case where the controller located at the final end of the networks # 1 and # 2 has the function of a distributor). In FIG. 19, the distributors 170 and 171 shown in FIG. 12 are omitted, the controller 14 has the function of the distributor 170 replaced by the controller 12, and the function of the distributor 171 is replaced by the controller 23. A case in which the control device 24 is provided is shown.
[0139]
Moreover, although the communication port of each control apparatus was demonstrated as a structure shown in FIG. 6, the transmission part 1-10, 2-10, 3-10 shown in FIG. 4, the receiving part 1-20, 2-20, 3- A plurality of transmission / reception units may be provided as shown in FIG. In this way, each control device can transmit / receive data to / from a network other than its own network.
[0140]
Thus, according to the second embodiment, since a plurality of networks composed of various control devices are daisy-chain connected by a distributor having a transfer rate and communication cycle control function, the numerical control device is 1 Various control devices can be controlled by one communication port. At this time, since the distributor has a function of controlling the transfer rate and communication cycle, it is possible to improve the use efficiency of the transfer path between each network, and to transmit the high-speed data and the low-speed data in parallel. Is possible. Note that a network device that handles low-cycle data does not require a high transfer rate, and thus the cost of drivers, receivers, and communication circuits can be reduced.
[0141]
Embodiment 3 FIG.
FIG. 20 is a block diagram showing a configuration of a numerical control system according to Embodiment 3 of the present invention. In the third embodiment, each of the devices below the highest device in the plurality of devices arranged on one transfer path in the first embodiment (FIGS. 1 and 11) or the second embodiment (FIGS. 12 and 19). A configuration example is shown in which the lower-level device corrects the transmission timing transmitted in a time division manner to the highest-level device by the transfer delay value between the devices. However, in FIG. 20, for the convenience of explanation, the highest-level device is assumed to be a numerical control device.
[0142]
That is, the numerical control system shown in FIG. 20 includes a single network in which a plurality of control devices 194, 195, and 196 are daisy chain connected to the numerical control device 193. Speaking of the machine tool shown in FIG. 9, the control devices 194, 195, and 196 correspond to servo motor drive control devices 141 to 144, 153, and 154 and a DI / O control device 155 that is a position sensor control device. .
[0143]
The control devices 194, 195, and 196 operate with the same communication cycle P as the numerical control device 193. However, since the transfer path and the control devices 194, 195, and 196 have delay elements, they are transmitted from the numerical control device 193. Therefore, the control devices 194, 195, and 196 cause a shift in the communication cycle. In the third embodiment, the shift in the communication cycle is corrected as follows.
[0144]
The communication ports of the control devices 194, 195, 196 have functions equivalent to those of the distributor 4 (FIG. 2) shown in the first embodiment and the distributors 170, 171 (FIG. 13) shown in the second embodiment. For example, it can be configured as shown in FIG. FIG. 21 is a block diagram showing a configuration of a communication port of the control device shown in FIG. In FIG. 21, the same reference numerals are given to components that are the same as or equivalent to the configurations shown in FIG. 2 and FIG.
[0145]
In FIG. 21, serial data from the host device is input to the receiver 35. The receiving unit 36 converts the serial data input from the receiver 35 into parallel data, and outputs the parallel data to the buffer 37 and the synchronization pattern extracting unit 40. The buffer 37 corrects the input parallel data to a correct pulse width, buffers the data, and outputs the data to be transferred to the lower device to one switching input terminal of the switch 198.
[0146]
The switch 198 has the other switching input terminal connected to the output terminal of the transmission unit 38 and the switching output terminal connected to the input terminal of the driver 39. That is, when the transmission data of the host device received by the receiver 35 is transferred to the lower device, the switch 198 connects the output terminal of the buffer 37 and the input terminal of the driver 39 and passes the transmission data of the own device to the lower device. In some cases, the switch 198 is controlled to connect the output end of the transmission unit 38 and the input end of the driver 39.
[0147]
In addition, serial data from a lower-level device is input to the receiver 48. The receiving unit 49 converts the serial data input from the receiver 48 into parallel data and outputs the parallel data to the buffer 52. The buffer 52 corrects and buffers the input parallel data so as to have a correct pulse width, and outputs data to be transferred to the host device to one switching input terminal of the switch 202.
[0148]
The switch 202 has the other switching input terminal connected to the output terminal of the transmission unit 53, and the switching output terminal connected to the input terminal of the driver 54. That is, when passing the transmission data of the lower apparatus received by the receiver 48 to the upper apparatus, the switch 202 connects the output terminal of the buffer 52 and the input terminal of the driver 54 and passes the transmission data of the own apparatus to the upper apparatus. At this time, the switch 202 is controlled to connect the output end of the transmission unit 53 and the input end of the driver 54.
[0149]
The synchronization pattern extraction unit 40 extracts a synchronization signal included in the data converted in parallel by the reception unit 36 and generates a synchronization signal. The generated synchronization signal is sent to communication cycle P counters 199, 200. The communication cycle P counters 199 and 200 generate a communication cycle P and a transmission timing signal that are used as a network reference based on the input synchronization signal. As a result, synchronization with the numerical controller 11 is achieved.
[0150]
The communication period P and the transmission timing signal generated by the communication period P counter 199 are sent to the transmission unit 38. The transmission unit 38 transmits transmission data for the lower apparatus to the other switching input terminal of the switch 198 at a predetermined timing obtained by time-dividing the communication period P by the transmission timing signal provided from the communication period P counter 199.
[0151]
On the other hand, the memory 201 stores a transmission timing correction amount for a communication cycle shift due to a delay between the control devices. This is set based on the measured value at the time of starting up the system. The communication cycle P counter 200 extracts the transmission timing correction amount from the memory 201 when generating the communication cycle P and the transmission timing signal which are the reference of the network based on the input synchronization signal, and determines the transmission timing signal to be generated as a predetermined value. The operation to advance / delay from the timing is performed. The transmission unit 53 sends transmission data for the higher-level device to the other switching input terminal of the switch 202 at a predetermined timing obtained by time-sharing the communication period P by the transmission timing signal given from the communication period P counter 200.
[0152]
That is, the numerical control device 193 and the control devices 194, 195, and 196 transmit data by time-sharing the communication period P based on the timing generated by the communication period counters as described above. Therefore, the numerical controller 193 and the controllers 194, 195, and 196 need to be able to uniquely determine the transmission timing at which no data collision occurs. Therefore, the control devices 194, 195, and 196 are configured to synchronize the communication cycle P with the synchronization pattern included in the data transmitted from the numerical control device 193.
[0153]
However, there is a communication medium delay in the transfer path, and the control devices 194, 195, 196 have a delay due to daisy chain buffering, a delay at the time of extracting a synchronization pattern at the communication port, and the like. For this reason, the data transmitted from the numerical control device 193 is affected by the above-described various delays, so that the control devices 194, 195, and 196 cause a shift in the communication cycle.
[0154]
The amount of delay in the communication cycle between the control devices 194, 195, 196 can be measured once the system is configured. Therefore, the correction amount of the transmission timing to the numerical control device 193 can also be stored in advance in the memory 201 and prepared. Hereinafter, the transmission timing correction operation will be described in detail with reference to FIG. FIG. 22 is a time chart for explaining the operation of correcting the transmission timing by the delay amount of the communication cycle performed in the numerical control system shown in FIG.
[0155]
In FIG. 22, communication periods 501, 601, and 701 are communication periods counted in the control devices 194, 195, and 196, respectively. The communication period 601 is delayed from the communication period 501 by a time d1. The communication cycle 701 is delayed from the communication cycle 501 by a time d2. Further, the communication cycle 701 is delayed from the communication cycle 601 by a time d23.
[0156]
Here, the numerical controller 193 transmits data from the reference point of the communication cycle P to the controllers 194, 195, 196. The control device 194 transmits data to the numerical control device 193 after the time 1 / 2P has elapsed from the reference point of the communication period P. The control device 195 transmits data to the numerical control device 193 after a time ¼ P has elapsed from the reference point of the communication period P. The control device 196 transmits data from the reference point of the communication period P to the numerical control device 193.
[0157]
The transmission timing of each control device is based on the communication cycle P counted in each control device, but the communication cycle is shifted by the delay of data including the synchronization pattern as described above. Therefore, a delay value with respect to the communication cycle P serving as a reference in each control device is measured, and a correction amount (transmission timing correction amount) corresponding thereto is set in the internal memory.
[0158]
The correction amount to be set may be set to a value twice the delay value. That is, the control device 195 sets the correction amount d1 × 2, and the control device 196 sets the correction amount d2 × 2. As a result, the control device 195 transmits the data 603 with the transmission timing corrected, and the control device 196 transmits the data 703 with the transmission timing corrected.
[0159]
As described above, according to the third embodiment, when a plurality of control devices are daisy chain connected to the numerical control device, each control device corrects the transmission timing based on the transfer delay value. Can be transmitted reliably without colliding. In addition, since it is not necessary to create an extra free time between transmission timings in order to prevent a collision, data can be transmitted efficiently.
[0160]
Embodiment 4 FIG.
In the fourth embodiment of the present invention, in the first embodiment (FIGS. 1 and 11) or the second embodiment (FIGS. 12 and 19), the uppermost apparatus in a plurality of apparatuses arranged on one transfer path is not included. As an example of a method for avoiding data collision when each device transmits data to the highest-level device, a configuration example in the case of transmitting in the order of connection is shown. Therefore, for convenience of explanation, Embodiment 3 (FIG. 20) is used as the system configuration. In addition, the plurality of control devices include communication ports having the same configuration as in FIG.
[0161]
The connection order of devices is known at the time of system construction, but the connection order set in the numerical control device and the connection order set in each control device may be mistaken due to some human error during system construction. In such a case, communication according to the connection order cannot be performed. Therefore, in the fourth embodiment, from the viewpoint of preventing human error, as an initial procedure, the processing shown in FIG. 23 is performed to check the connection order. FIG. 23 is a flowchart for explaining the operation for determining the transmission order performed in the numerical control system according to the fourth embodiment of the present invention.
[0162]
In the initial communication for performing the processing shown in FIG. 23, in the communication port of the control devices 194, 195, 196, in FIG. Data from the control device 193 is prevented from flowing to the lower device.
[0163]
In this state, the numerical controller 193 sets “1” to the station number n in order to make an inquiry to the first station of the communication line (step ST11), and requests data for inquiring the type of the first station device. It transmits (step ST12), and waits for reception of a reply for the device type (step ST13).
[0164]
When the numerical control device 193 receives the device type response from the control device 194 (step ST13: Yes), the numerical control device 193 recognizes that the device connected to the first station is the control device 194, and proceeds to step ST14. At this time, since the control device 194 receives an inquiry for the first station, it can simultaneously recognize that its own device is the first station device.
[0165]
If the numerical control device 193 cannot obtain a response for a certain period of time after transmitting the device type inquiry (step ST13: No), the numerical control device 193 returns to step ST12 and requests data for inquiring the device type of the first station again. Send. If there is no answer even after making this request again a predetermined number of times, the process proceeds to step ST16.
[0166]
Next, in step ST14, the numerical control device 193 switches the connection of the switch 198 to the connection between the buffer 37 and the driver 39 for the first station device (control device 194) that can be recognized, and the connection of the switch 201 is changed. Request data for switching to the connection between the buffer 52 and the driver 54 is transmitted. The first station device (control device 194) switches the connection of the switches 198 and 201 in accordance with the instruction, and notifies the numerical control device 193 that the switch switching has been completed (step ST15: Yes).
[0167]
Also in this case, the numerical control device 193 returns to step ST14 when the response is not obtained for a certain time after transmission of the switch change request (step ST15: No), and again the first station device (control) A switch switching request is transmitted to the apparatus 194), but a switch switching completion notification is always sent.
[0168]
When receiving the switch switching completion notification from the first station device (control device 194) (step ST15: Yes), the numerical controller 193 increments the station number by one, ie, n = n + 1 (step ST16). The step number “n = n + 1” and the number of connected devices (number of connected devices = 3 in the example of FIG. 20) are compared (step ST17). As a result, when the advanced station number “n = n + 1” is within the number of connected devices (step ST17: No), the process returns to step ST12, and the confirmation of connected devices after the second station is repeated (steps ST12 to ST17). ).
[0169]
As a result, the numerical control device 193 recognizes the connection order of the control devices 194, 195, and 196, and the control devices 194, 195, and 196 recognize the connection order of the own device, that is, according to the connection order of the own device. The transmission order can be recognized.
[0170]
Next, the transmission operation of the control devices 194, 195, 196 will be described with reference to FIG. FIG. 24 is a time chart for explaining the operation of correcting the transmission timing according to the determined transmission order. As described above, the control devices 194, 195, and 196 include a communication port having the same configuration as that in FIG. 21, and the transmission timing correction amount is stored in the memory 201.
[0171]
In FIG. 24, communication periods 511, 611, and 711 are communication periods counted in the control devices 194, 195, and 196, respectively. The communication cycle 611 is delayed from the communication cycle 511 by a time d1. The communication cycle 711 is delayed from the communication cycle 511 by a time d2. This is the same as the case shown in FIG.
[0172]
In the fourth embodiment, the control devices 194, 195, and 196 sequentially transmit data to the numerical control device 193 in accordance with the connection order of the communication lines when the numerical control device 193 is the head. The control device 194 transmits data to the numerical control device 193 from the reference of the communication cycle P. The control device 195 transmits data to the numerical control device 193 after a time ¼ P has elapsed from the reference point of the communication period P. The control device 196 transmits data to the numerical control device 193 after the time 1 / 2P has elapsed from the reference point of the communication period P.
[0173]
If the control devices 194, 195, 196 transmit data in the order of connection of the communication lines in this way, the transmission data will not interfere even if each of the control devices 194, 195, 196 does not correct the transmission timing. However, if this is the case, the interval between data is wasted. In addition, the time when the control device 194 located at the beginning of the connection receives the data transmitted from the control device 196 located at the last end becomes very late, and if there is no free time at the end of the communication cycle, the next data It extends over the communication cycle and becomes the same as in the third embodiment.
[0174]
That is, in the above-described third embodiment, the control device 196 connected to the final end corrects the transmission timing in a communication cycle before the current communication cycle in order to correct a delay in the communication cycle. . Transmission / reception of data across communication cycles has a difficulty in complicating the circuit configuration of the communication port.
[0175]
Therefore, in the fourth embodiment, time d1 × 2 is set as the transmission timing correction amount in the memory 201 of the control device 195, and time d2 × 2 is set as the transmission timing correction amount in the memory 201 of the control device 196. The data 613 and 713 can be transmitted at a timing earlier than a predetermined transmission timing.
[0176]
As a result, an optimal value can be set between data. In addition, in the control device 196 located at the final end, since the transmission timing is within the current communication cycle, it is possible to prevent transmission data from straddling the communication cycle, and avoid complication of the circuit configuration. Is possible.
[0177]
Embodiment 5 FIG.
In the fifth embodiment of the present invention, in the first embodiment (FIGS. 1 and 11) or the second embodiment (FIGS. 12 and 19), a plurality of devices arranged on one transfer path are used in the transfer path. A configuration example is shown in which a transfer path transmission delay necessary for avoiding data collision and increasing transfer efficiency is measured. Therefore, for convenience of explanation, Embodiment 3 (FIG. 20) is used as the system configuration.
[0178]
The communication ports of the plurality of control devices are configured as shown in FIG. 25, for example. FIG. 25 is a block diagram showing the configuration of the communication port of the control device in the numerical control system according to the fifth embodiment of the present invention. In FIG. 25, the same or equivalent components as those shown in FIG. 21 are denoted by the same reference numerals. Here, the description will be focused on the portion related to the fifth embodiment.
[0179]
As shown in FIG. 25, a three-way switch 205 is provided in place of the two-way switch 201 shown in FIG. The switch 205 connects the transmission unit 53 and the driver 54 when transmitting data of its own device to the host device, and connects the buffer 52 and driver 54 when transmitting data from the lower device to the host device. In addition, when loopback transmission of data from the host device is performed to the host device, the output of the receiver 35 and the input of the driver 54 are connected.
[0180]
The numerical control device and the plurality of control devices include a delay measurement circuit as shown in FIG. 26, for example, as part of the communication port. FIG. 26 is a block diagram illustrating a configuration of a delay measurement circuit provided in a communication port of each device.
[0181]
In the delay measurement circuit 210 shown in FIG. 26, the transmission circuit 212 receives the transmission activation signal 211 generated by transmission activation from a CPU (not shown) and generates measurement data. This measurement data is transmitted from the driver 213 to the lower device. At this time, the counter 217 receives the transmission activation signal 211 and starts the counting operation. Further, the measurement data sent from the lower apparatus is input from the receiver 214 to the receiving circuit 215. When the reception circuit 215 confirms reception of the measurement data, the reception circuit 215 outputs a stop signal 216. The counter 217 stops the counting operation by the stop signal 216. A CPU or the like (not shown) receives the stop signal 216, confirms completion of measurement, takes in the count value of the counter 217, and obtains a delay time.
[0182]
Next, a measurement example will be described with reference to FIGS. FIG. 27 is a configuration example in the case where delay measurement is performed between two devices. FIG. 28 is a configuration example in the case of performing delay measurement across a plurality of devices. FIG. 29 is a configuration example when each device performs delay measurement on a lower-level device.
[0183]
27, the numerical control device 193 includes the delay measurement circuit 210 illustrated in FIG. 26, and the control device 194 includes the communication port illustrated in FIG. That is, in the control device 194, the switch 205 is switched to connect the output of the receiver 35 (222) and the input of the driver 54 (223). As a result, the control device 194 returns the data sent from the host device (numerical control device) as it is and transmits it to the host device (numerical control device).
[0184]
When the numerical control device 193 transmits measurement data by the transmission activation signal 211, the measurement data is sent from the driver 221 to the control device 194, reaches the receiver 224 of the numerical control device 193 via the receiver 222 and the driver 223, This is input to the receiving circuit 215 of the delay measuring circuit 210. When the reception circuit 215 of the delay measurement circuit 210 confirms reception of the measurement data, the counter 217 stops the counting operation. By reading the count value at this time, the data transmission delay between the numerical controller 193 and the controller 194 can be measured.
[0185]
28, the numerical control device 193 includes the delay measurement circuit 210 illustrated in FIG. 26, and the control devices 194 and 195 include the communication port illustrated in FIG. That is, in the control device 194, the switch 198 is switched so as to connect the receiver 35 (232) and the driver 39 (233), and the switch 205 is switched so as to connect the receiver 48 (236) and the driver 39 (237). . As a result, the control device 194 passes measurement data from the host device to the lower device, and passes measurement data from the lower device to the host device. In the control device 194, the switch 205 is switched to connect the output of the receiver 35 (234) and the input of the driver 54 (235).
[0186]
When the numerical control device 193 transmits measurement data by the transmission activation signal 211, the measurement data is sent from the driver 231 to the control device 194, and is sent to the control device 195 via the receiver 232 and the driver 233. In the control device 195, the measurement data is sent to the control device 194 via the receiver 234 and the driver 235. In the control device 194, the measurement data reaches the receiver 238 of the numerical control device 193 via the receiver 236 and the driver 237 and is input to the reception circuit 215 of the delay measurement circuit 210. When the reception circuit 215 of the delay measurement circuit 210 confirms reception of the measurement data, the counter 217 stops the counting operation. By reading the count value at this time, it is possible to measure the data transmission delay that reciprocates between the numerical controller 193 and the controllers 194 and 195.
[0187]
When a plurality of control devices are connected by the daisy chain connection method, the reciprocal transmission time of each control device existing below the highest control device (numerical control device) is repeated by repeating the operations of FIGS. Can be measured for each subordinate device.
[0188]
29, the numerical control device 193 and the control device 194 include the delay measurement circuit 210 illustrated in FIG. 26, and the control device 195 includes the communication port illustrated in FIG. In the control devices 194 and 195, the switch 205 is switched to connect the output of the receiver 35 (242, 252) and the input of the driver 54 (243, 253). As a result, the control devices 194 and 195 return the data sent from the host device as it is and transmit it to the host device.
[0189]
When the numerical control device 193 transmits measurement data by the transmission activation signal 211, the measurement data is sent from the driver 241 to the control device 194, and reaches the receiver 244 of the numerical control device 193 via the receiver 242 and the driver 243. This is input to the receiving circuit 215 of the delay measuring circuit 210. When the reception circuit 215 of the delay measurement circuit 210 confirms reception of the measurement data, the counter 217 stops the counting operation. By reading the count value at this time, the data transmission delay between the numerical controller 193 and the controller 194 can be measured.
[0190]
When the control device 194 transmits measurement data by the transmission activation signal 211, the measurement data is sent from the driver 251 to the control device 195, reaches the receiver 254 of the control device 194 via the receiver 252 and the driver 253, This is input to the receiving circuit 215 of the delay measuring circuit 210. When the reception circuit 215 of the delay measurement circuit 210 confirms reception of the measurement data, the counter 217 stops the counting operation. By reading the count value at this time, the data transmission delay between the control device 194 and the control device 195 can be measured. According to this method, it is possible to reduce the time required for measuring the delay time.
[0191]
As described above, according to the fifth embodiment, the transmission delay caused by the cable length between the devices and the transmission delay generated when data passes through the daisy chain connection line or the distributor are not limited to the cable length or the system configuration. However, since it can be measured, an optimum transmission delay correction amount can be set for each system. In addition, since each device can measure a transfer delay between adjacent devices, it is possible to reduce the time required for measuring the delay time.
[0192]
【The invention's effect】
  As described above, according to the present invention, a plurality of networks composed of various control devices are connected in a star shape by distribution means having a transfer rate and communication cycle control function, or daisy chain connection. Therefore, the numerical control device can control various control devices by one communication port. At this time, since the distribution means has a function of controlling the transfer rate and communication cycle, the use efficiency of the transfer path between each network can be increased, and high-speed data and low-speed data can be transmitted in parallel. Is possible. Furthermore, since a function for measuring the transfer delay can be added, control for minimizing the data transmission interval can be performed.Since each control device corrects the transmission timing based on the transfer delay value, the data can be reliably transmitted without colliding. In addition, since it is not necessary to create an extra free time between transmission timings in order to prevent a collision, data can be transmitted efficiently.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a numerical control system according to a first embodiment of the present invention.
FIG. 2 is a block diagram showing a configuration of a distributor shown in FIG.
FIG. 3 is a time chart illustrating an operation in which the distributor shown in FIG. 1 controls the transmission timing of data.
4 is a block diagram showing a configuration of a communication port of the numerical controller shown in FIG. 1. FIG.
FIG. 5 is a time chart for explaining the serial data synthesis performed at the communication port of the numerical controller shown in FIG. 4;
6 is a block diagram showing a configuration of a communication port of the control device shown in FIG. 1. FIG.
7 is a block diagram showing a configuration of a communication port of the distributor shown in FIG. 1. FIG.
FIG. 8 is a time chart for explaining data transmission / reception performed in the numerical control system shown in FIG. 1;
FIG. 9 is a diagram illustrating a general configuration example of a machine tool.
10 is a diagram showing a configuration example when the numerical control system shown in FIG. 1 is applied to the machine tool shown in FIG. 9;
11 is a diagram showing another configuration example of the numerical control system shown in FIG. 1 (in the case where the controller located at the final end of the network # 1 has the function of a distributor).
FIG. 12 is a block diagram showing a configuration of a numerical control system according to a second embodiment of the present invention.
13 is a block diagram showing a configuration of a distributor shown in FIG.
FIG. 14 is a time chart for explaining an operation in which the distributor shown in FIG. 12 controls the transmission timing of data.
FIG. 15 is a time chart illustrating serial data synthesis performed by the numerical controller shown in FIG. 12;
FIG. 16 is a time chart for explaining data transmission / reception performed in the numerical control system shown in FIG. 12;
17 is a diagram showing a configuration when the numerical control system shown in FIG. 12 is applied to the machine tool shown in FIG.
18 is a control system diagram for explaining control by a position command in the numerical control system shown in FIG.
FIG. 19 is a diagram showing another configuration example of the numerical control system shown in FIG. 12 (in the case where the controller located at the final end of the networks # 1 and # 2 has the function of a distributor).
FIG. 20 is a block diagram showing a configuration of a numerical control system according to a third embodiment of the present invention.
FIG. 21 is a block diagram showing a configuration of a communication port of the control device shown in FIG. 20;
FIG. 22 is a time chart for explaining an operation of correcting the transmission timing by the delay amount of the communication cycle performed in the numerical control system shown in FIG.
FIG. 23 is a flowchart illustrating an operation for determining a transmission order performed in the numerical control system according to the fourth embodiment of the present invention;
FIG. 24 is a time chart for explaining an operation of correcting the transmission timing according to the determined transmission order.
FIG. 25 is a block diagram showing a configuration of a communication port of a control device in a numerical control system according to a fifth embodiment of the present invention.
FIG. 26 is a block diagram illustrating a configuration of a delay measurement circuit provided in a communication port of each device.
FIG. 27 is a diagram illustrating a configuration example in a case where delay measurement is performed between two devices.
FIG. 28 is a diagram illustrating a configuration example when delay measurement is performed across a plurality of devices.
FIG. 29 is a diagram illustrating a configuration example when each device performs delay measurement on a lower-level device.
[Explanation of symbols]
1 Network # 1, 2 Network # 2, 3 Network # 3, 4, 170, 171 Distributor, 11, 193 Numerical control device, 11-14, 21-24, 31-33, 194-196 Control device, 210 Delay Measuring circuit.

Claims (4)

少なくとも数値制御装置が配置される主ネットワークと、前記数値制御装置の指令を受けて制御動作を実施する1以上の制御装置が配置される1以上の従ネットワークとで構成され、転送レートと転送周期の一方または双方がネットワーク相互間で異なることがある数値制御システムにおいて、
前記主ネットワークに対して前記1以上の従ネットワークをスター状に接続する節点に、または、前記主ネットワークに対して前記1以上の従ネットワークをディジーチェーン接続方式で接続する節点に、ネットワーク間で異なる転送レート、通信周期を制御し、ネットワーク相互間での1本の通信線を介した複数のシリアルデータの送受信を実現する分配手段が設けられているとともに、
1つの転送路上に配置される複数の装置における最上位装置以下の各下位装置は、前記最上位装置に対し時分割で送信する送信タイミングを装置間の転送遅延値によって補正する手段、
を備えたことを特徴とする数値制御システム。
It is composed of at least a main network in which a numerical control device is arranged, and one or more slave networks in which one or more control devices that perform control operations in response to a command from the numerical control device are arranged, and transfer rate and transfer cycle In numerical control systems where one or both of the networks may differ between networks,
The node connecting said one or more slave network in a star shape with respect to the main network, or, the one or more slave network nodes connected by daisy-chain scheme to the main network, differ between networks Distributing means for controlling the transfer rate and communication cycle and realizing transmission / reception of a plurality of serial data via a single communication line between networks is provided.
Means for correcting the transmission timing transmitted in a time-sharing manner with respect to the highest-level device by a transfer delay value between the devices in each of the lower-level devices below the highest-level device in a plurality of devices arranged on one transfer path;
A numerical control system characterized by comprising:
少なくとも数値制御装置が配置される主ネットワークと、前記数値制御装置の指令を受けて制御動作を実施する1以上の制御装置が配置される1以上の従ネットワークとで構成され、転送レートと転送周期の一方または双方がネットワーク相互間で異なることがある数値制御システムにおいて、
前記主ネットワークに対して前記1以上の従ネットワークをスター状に接続する節点に、または、前記主ネットワークに対して前記1以上の従ネットワークをディジーチェーン接続方式で接続する節点に、ネットワーク間で異なる転送レート、通信周期を制御し、ネットワーク相互間での1本の通信線を介した複数のシリアルデータの送受信を実現する分配手段が設けられているとともに、
1つの転送路上に配置される複数の装置における最上位装置は、初期通信時において各下位装置の接続順を検出し、各下位装置に対し自装置の接続順による送信順位を認識させる手段、を備え、
前記最上位装置以下の各下位装置は、前記最上位装置に対する送信タイミングを装置間の転送遅延値によって補正する手段
を備えたことを特徴とする数値制御システム。
It is composed of at least a main network in which a numerical control device is arranged, and one or more slave networks in which one or more control devices that perform control operations in response to a command from the numerical control device are arranged, and transfer rate and transfer cycle In numerical control systems where one or both of the networks may differ between networks,
The nodes differ from network to node connecting the one or more slave networks to the master network in a star shape or connecting the one or more slave networks to the master network in a daisy chain connection manner. Distributing means for controlling the transfer rate and communication cycle and realizing transmission / reception of a plurality of serial data via a single communication line between networks is provided.
A highest-level device in a plurality of devices arranged on one transfer path detects a connection order of each lower-level device at the time of initial communication, and causes each lower-level device to recognize a transmission order according to the connection order of its own device. Prepared,
Each subordinate device below the most significant device is means for correcting the transmission timing for the most significant device by a transfer delay value between the devices ,
Numerical control systems that comprising the.
1つの転送路上に配置される複数の装置における最上位装置は、各下位装置との間の転送遅延を先頭の装置から順番に測定する手段、
を備えたことを特徴とする請求項1または2に記載の数値制御システム。
The highest device in a plurality of devices arranged on one transfer path is a means for measuring the transfer delay with each lower device in order from the first device,
The numerical control system according to claim 1, further comprising:
1つの転送路上に配置される複数の装置における各装置は、隣接する下位装置との間の転送遅延を測定する手段、
を備えたことを特徴とする請求項1〜のいずれか一つに記載の数値制御システム。
Means for measuring a transfer delay between adjacent devices in a plurality of devices arranged on one transfer path;
The numerical control system according to any one of claims 1 to 3 , further comprising:
JP2003013932A 2003-01-22 2003-01-22 Numerical control system Expired - Fee Related JP4118695B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003013932A JP4118695B2 (en) 2003-01-22 2003-01-22 Numerical control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003013932A JP4118695B2 (en) 2003-01-22 2003-01-22 Numerical control system

Publications (2)

Publication Number Publication Date
JP2004227261A JP2004227261A (en) 2004-08-12
JP4118695B2 true JP4118695B2 (en) 2008-07-16

Family

ID=32902133

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003013932A Expired - Fee Related JP4118695B2 (en) 2003-01-22 2003-01-22 Numerical control system

Country Status (1)

Country Link
JP (1) JP4118695B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5407633B2 (en) * 2008-07-28 2014-02-05 株式会社リコー Communication apparatus, communication system having the same, and communication method
JP5822621B2 (en) * 2011-09-27 2015-11-24 富士機械製造株式会社 Servo drive system
JP5815660B2 (en) 2013-12-25 2015-11-17 ファナック株式会社 Numerical control system
CN107615197B (en) * 2015-05-12 2020-07-14 三菱电机株式会社 Numerical control device
JP6404975B2 (en) 2017-03-21 2018-10-17 ファナック株式会社 Slave, serial communication system, and communication method of serial communication system
JP7559381B2 (en) 2020-06-30 2024-10-02 ブラザー工業株式会社 Numerical control device, control method for numerical control device, and machine tool
JP7546902B2 (en) 2020-10-29 2024-09-09 株式会社Kmc Sensor system, sensor and machine control method

Also Published As

Publication number Publication date
JP2004227261A (en) 2004-08-12

Similar Documents

Publication Publication Date Title
CN101083657B (en) Real-time Synchronization Network Controller of Numerical Control System
US7366205B2 (en) Method for synchronizing nodes of a communications system
US7930041B2 (en) Industrial controller with coordination of network transmissions using global clock
EP2408110B1 (en) Power layer generation of inverter gate drive signals
EP3056868B1 (en) Multiplexing communication system and working robot
US20100232430A1 (en) System and method for transmitting real-time-critical and non-real-time-critical data in a distributed industrial automation system
JP3566304B2 (en) Bus control device and bus control system
JP2738106B2 (en) Multiplex communication controller
CN103425106A (en) Linux-based Ethercat maser/slave station control system and method
JP4118695B2 (en) Numerical control system
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
US7835404B2 (en) Method for synchronization in a redundant communication system
CN112910593A (en) Synchronous control system and method applied to servo motor driver
JP2023523428A (en) Synchronization of Pulse Width Modulation Control
JP4029617B2 (en) Numerical control system and communication timing setting method in the numerical control system
JP4980292B2 (en) Numerical control system that communicates with multiple amplifiers at different communication cycles
JP2017184086A (en) Multiplex communication system and work machine
WO2021010166A1 (en) Serial communication method and serial communication system
JP2011113118A (en) Servo motor control network and communication method thereof
TWI834071B (en) Multi-axis servo control system
CN100501618C (en) Self-synchronizing AC servo system matched with high-speed serial communication
JPS6368905A (en) Positioning control system
JPH09114776A (en) Data transmission system
JPH0619661B2 (en) Distributed numerical controller
JP4642683B2 (en) Automatic synchronous AC servo system for high-speed serial communication and its operating method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051208

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071001

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071002

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071115

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080422

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080423

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110502

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110502

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120502

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120502

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130502

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140502

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees