JP2004242031A - Communications system - Google Patents
Communications system Download PDFInfo
- Publication number
- JP2004242031A JP2004242031A JP2003028702A JP2003028702A JP2004242031A JP 2004242031 A JP2004242031 A JP 2004242031A JP 2003028702 A JP2003028702 A JP 2003028702A JP 2003028702 A JP2003028702 A JP 2003028702A JP 2004242031 A JP2004242031 A JP 2004242031A
- Authority
- JP
- Japan
- Prior art keywords
- transmission
- data
- transmitted
- master station
- slave station
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
【課題】マスタ局とスレーブ局との間で任意のタイミングで送信するメッセージデータの高速伝送を可能とする。
【解決手段】マスタ局Mの送信部45に、スレーブ局SL1〜SL4宛の同期データを格納するための送信レジスタ62〜65と、何れかのスレーブ局宛に送信するメッセージデータを格納するための送信レジスタ66〜68とを設け、メッセージデータを送信レジスタ66に書き込み、ここに書き込みきれない場合には送信レジスタ67、68の順に順次書き込む。送信周期期間毎に、各スレーブ局に送信レジスタ62〜65の同期データを送信した後、送信レジスタ66〜68を順次切り替えて何れか一つの送信レジスタに格納されているメッセージデータの一部を指定のスレーブ局宛に送信し、メッセージデータを複数に分割して複数の送信周期にわたって指定のスレーブ局宛に送信し、スレーブ局側で、分割されたメッセージデータを復元する。
【選択図】 図7To enable high-speed transmission of message data transmitted at an arbitrary timing between a master station and a slave station.
A transmission unit (45) of a master station (M) stores transmission registers (62 to 65) for storing synchronization data addressed to slave stations (SL1 to SL4) and a message register for storing message data to be transmitted to any one of the slave stations. Transmission registers 66 to 68 are provided, and message data is written to the transmission register 66. If the message data cannot be written there, the transmission registers 67 and 68 are sequentially written. After transmitting the synchronization data of the transmission registers 62 to 65 to each slave station for each transmission cycle period, the transmission registers 66 to 68 are sequentially switched to specify a part of the message data stored in any one of the transmission registers. , The message data is divided into a plurality of pieces, transmitted to a designated slave station over a plurality of transmission cycles, and the slave station side restores the divided message data.
[Selection diagram] FIG.
Description
【0001】
【発明の属する技術分野】
この発明は、サーボモータ制御、主軸モータ制御を行うサーボアンプ制御装置、或いは主軸アンプ制御装置等からなる複数のスレーブ局と、数値制御装置からなるマスタ局との間を、シリアル伝送線により接続し、両者間でデータ伝送を行うようにした通信システムに関する。
【0002】
【従来の技術】
従来、複数のスレーブ局と、これらスレーブ局を制御するマスタ局とで構成される通信システムにおいては、例えば、これらスレーブ局及びマスタ局間を、半二重方式のシリアル伝送用のバスラインで接続するようにした通信システムが提案されている。この通信システムにおいては、マスタ局からのメッセージを受け取ったスレーブ局がフレーム受信終了後、バスラインを受信用から送信用に切り替え、スレーブ局からの送信を行うようにしている。
【0003】
つまり、図13に示すように、第1のスレーブ局SL1では、マスタ局Mからフレームを受信すると、バスラインを受信用から送信用に切り替え、マスタ局M宛にフレームを送信する。次に、マスタ局Mが、第2のスレーブ局SL2にフレームを送信し、第2のスレーブ局SL2がこれを受信すると、この第2のスレーブ局SL2では、バスラインを受信用から送信用に切り替え、マスタ局Mにフレームを送信する。各スレーブ局SL1〜SL4がこの動作を行うことによって、マスタ局Mとスレーブ局SL1〜SL4との間の通信が、フレームどうしが衝突することなく行われるようになっている。
【0004】
しかしながら、このように、バスラインを受信用と送信用とで切り替えて通信を行うようにした場合、図13に示すように、受信用及び送信用との切り替えに伴う無駄時間Δtが発生し、また、フレームの受信及び送信を同時に行うことができない。
これに対し、例えば、マスタ局とスレーブ局との間を全二重方式のシリアル伝送ラインによって接続するようにした方法も提案されている(例えば、特開平11−17712号公報参照。)
この場合、フレームの送信及び受信を同時に行うことができ、つまり、マスタ局がスレーブ局にフレームを送信している間でも、スレーブ局がマスタ局にフレームを送信することが可能であり、伝送効率を向上させることができ伝送時間の短縮を図ることができる。
【0005】
そして、例えば、サーボモータ制御、主軸モータ制御を行うサーボアンプ制御装置、主軸アンプ制御装置からなる複数のスレーブ局と、数値制御装置からなるマスタ局とから構成される数値制御システムにおいては、上述のような通信システムを構成することによって、高速な同期通信を可能とし、サーボモータ軸の位置決め等といったモーションコントールを適切に行うことができるようになっている。
【0006】
【特許文献1】
特開平11−17712号公報
【0007】
【発明が解決しようとする課題】
しかしながら、上述のような数値制御システムにおいては、マスタ局と複数のスレーブ局との間で、サーボ軸の位置決め制御用のデータを高速に同期伝送する必要がある。このため、この位置決め制御用データ伝送以外の、例えば、保守用データをスレーブ局から取り出す場合、或いはスレーブ局へ各種制御定数をセットアップする場合等には、例えば、スレーブ局としてのサーボアンプや各種制御装置に別途、データ授受用のパーソナルコンピュータ等を直接接続し、このパーソナルコンピュータとスレーブ局との間で、例えばRS232C通信等によって、行うようにしている。
【0008】
しかしながら、最近の高機能化に伴い、モーションコントールを行いながら、各スレーブへの個別の伝送、すなわちメッセージ伝送も合わせて行う必要性が高まっており、位置決め用の高速シリアルバスを兼用しての通信が望まれていた。そこで、この発明は、上記従来の未解決の問題点に着目してなされたものであり、各スレーブ局とマスタ局との間の同期伝送用の通信回線を兼用して、スレーブ局個別にメッセージ伝送を行うことの可能な、通信システムを提供することを目的としている。
【0009】
【課題を解決するための手段】
上記目的を達成するために、本発明の請求項1に係る通信システムは、マスタ局及び当該マスタ局と全二重方式のシリアル伝送ラインで接続されるスレーブ局を備え、前記マスタ局と前記スレーブ局との間で、所定の送信周期で定期送信データの授受を行うようにした通信システムにおいて、前記送信周期で特定される送信周期期間内の前記定期送信データの授受が行われていない空き時間に、前記シリアル伝送ラインを利用して前記マスタ局とスレーブ局との間で定期送信する必要のない非定期送信データの授受を行うようにしたことを特徴としている。
【0010】
また、請求項2に係る通信システムは、マスタ局及び当該マスタ局と全二重方式のシリアル伝送ラインで接続されるスレーブ局を備え、前記スレーブ局は、前記マスタ局から自局宛のデータを受信したときに前記マスタ局宛にデータを送信するようにした通信システムにおいて、前記マスタ局は、前記定期送信データを、前記送信周期で前記スレーブ局宛に送信する定期送信手段と、前記送信周期で特定される送信周期期間内の前記定期送信データの授受が行われない空き時間に、前記シリアル伝送ラインを利用して定期送信する必要のない非定期送信データを前記スレーブ局に送信する非定期送信手段と、を備え、前記スレーブ局は、前記マスタ局から受信したデータのデータ種が前記定期送信データであるか非定期送信データであるかを判別するデータ種判別手段と、前記マスタ局からデータを受信したとき、前記マスタ局宛に送信すべき前記定期送信データ及び前記非定期送信データのうち、前記データ種判別手段で特定されるデータ種と同一種のデータを、前記マスタ局宛に送信する応答データ送信手段と、を備えることを特徴としている。
【0011】
また、請求項3に係る通信システムは、前記請求項2記載の通信システムにおいて、前記マスタ局の前記非定期送信手段は、送信すべき前記非定期送信データを前記空き時間内に送信可能なデータ長に分割する分割手段と、当該分割手段で分割した非定期送信データの分割ブロックを、当該分割ブロック単位で複数の送信周期にわたって送信する分割送信手段を備え、前記スレーブ局は、複数の送信周期にわたって送信された複数の前記分割ブロックから元の非定期送信データを復元する復元手段、を備えることを特徴としている。
【0012】
また、請求項4に係る通信システムは、前記請求項3記載の通信システムにおいて、前記マスタ局の前記非定期送信手段は、前記空き時間を予測する空き時間予測手段を備え、前記分割送信手段は、前記空き時間予測手段で予測された空き時間に応じて前記非定周期送信データを分割するようになっていることを特徴としている。
【0013】
また、請求項5に係る通信システムは、前記請求項3記載の通信システムにおいて、前記分割送信手段は、前記非定周期送信データを、予め設定された容量の複数の記憶領域に分割して格納し、一の送信周期期間内に、一の記憶領域に格納されたデータを送信するようになっていることを特徴としている。
また、請求項6に係る通信システムは、前記請求項4記載の通信システムにおいて、前記分割送信手段は、前記非定周期送信データを、予め設定された容量の複数の記憶領域に分割して格納し、前記空き時間予測手段で予測された空き時間と、前記記憶領域の容量とをもとに、前記空き時間内にデータ送信可能な前記記憶領域の個数を推定し、一の送信周期期間内に、前記推定した個数分の記憶領域に格納されたデータを送信するようになっていることを特徴としている。
【0014】
【発明の実施の形態】
以下に、本発明の実施の形態を説明する。
図1は、本発明の第1の実施の形態を適用した通信システムの構成を示した概略構成図である。
図1において、Mは、例えばNC制御装置等で構成されるマスタ局、S1〜S4は、サーボアンプ制御装置、主軸アンプ制御装置等で構成されるスレーブ局であって、これらマスタ局Mとスレーブ局SL1〜SL4とは、全二重方式のシリアルバスL1、L2を介して、マルチドロップ形式で接続されている。
【0015】
なお、ここでは、4つのスレーブ局SL1〜SL4が接続されている場合について説明しているが、これに限るものではなく、任意数のスレーブ局を接続することができる。
そして、マスタ局Mは各スレーブ局SL1〜SL4と予め設定した所定の送信周期毎に、データ伝送を行っており、図2(a)に示すように、マスタ局Mは、各スレーブ局間で同期をとるためのタクト同期用データを、前記送信周期毎に、各スレーブ局宛に、ブロードキャスト伝送によって送信する。このタクト同期用データを受信した各スレーブ局の演算処理部(CPU)では、このタクト同期用データを受信した時点で先に受信している同期データを取り込みこれに基づいて制御対象に対する処理を行うようになっている。つまり、各スレーブ局SL1〜SL4がマスタ局からの同期データを受信するタイミングが異なることから、タクト同期用データを受信した時点を基準として、各スレーブ局SL1〜SL4の演算処理部が同期データに対する制御を行うようにすることによって、各スレーブ局SL1〜SL4間で同期をとるようになっている。
【0016】
また、マスタ局Mは、各スレーブ局に対して、前記送信周期毎に各スレーブ局がその制御対象を制御するための制御情報等といった情報を同期データとして送信する。この同期データを受信した各スレーブ局では、その応答として、スレーブ局における制御対象の制御状況、或いはそのモニタ情報等を、同期データとして、マスタ局Mに送信する。
【0017】
つまり、マスタ局Mは、図2(a)に示すように、前記送信周期毎に、まず、タクト同期用データDBをブロードキャストで送信した後、例えばスレーブ局SL1宛に同期データDM1を送信して、この同期データDM1を受信したスレーブ局SL1からの応答としての同期データDS1を受信し、次に、スレーブ局SL2宛に同期データDM2を送信して、この同期データDM2に対する応答としての同期データDS2を受信し、次にスレーブ局SL3宛に同期データDM3を送信し、というように、順次各スレーブ局宛に同期データを送信し、この応答を受信するようにしている。
【0018】
そして、この処理を各送信周期毎に行うことによって、図2(b)に示すように、各送信周期毎に、各スレーブ局宛に制御情報等を送信し、その応答として、各スレーブ局から各制御対象の制御状況情報等を受信するようになっている。
そして、この通信システムにおいては、図3に示すように、さらに、送信周期の開始から次の送信周期の開始までの1送信周期期間内の、各スレーブ局宛にタクト同期用データ及び同期データを送信した後の空き時間に、各スレーブ局間で同期させる必要のない各スレーブ局が個別に必要とする情報或いはマスタ局が各スレーブ局の情報として個別に必要とする情報を、メッセージデータM−DM及びM−DSとしてマスタ局M及びスレーブ局SL1〜SL4間で送受信するようにしている。なお、図3において、M−DMはマスタ局Mから何れかのスレーブ局宛に送信されるメッセージデータを表し、M−DSは、マスタ局MからのメッセージデータM−DMを受信したスレーブ局からマスタ局M宛に送信されるメッセージデータを表す。
【0019】
図4は、マスタ局Mとスレーブ局SL1〜SL4との間で伝送される伝送フレームのフォーマットの一例を示したものであって、マスタ局Mからスレーブ局SL1〜SL4への伝送フレームは、図4(a)に示すように、フレームの開始を表すフラグデータm1、フレームの送信先を表す送信先アドレスm2、データ種を表す制御コマンドm3、伝送データm4、フレーム検査シーケンス用のチェック用データm5、そして、フレームの終了を表すフラグデータm6、から構成されている。なお、制御コマンドm3としてのデータ種としては、スレーブ局間での同期をとるために各スレーブ局宛に送信されるタクト同期用データ、各スレーブ局に同期伝送される同期データ、及び、個別のスレーブ局宛に伝送されるメッセージデータがある。
【0020】
また、スレーブ局からマスタ局への伝送フレームは、図4(b)に示すように、フレームの開始を表すフラグデータs1、フレームの送信元を表す送信元アドレスs2、制御コマンドm3と同様の伝送フレームのデータ種を表す制御コマンドs3、伝送データs4、フレーム検査シーケンス用のチェック用データs5、そして、フレームの終了を表すフラグデータs6とから構成されている。なお、前記伝送フレームにおいて、伝送データm4及びs4は情報が設定されない場合もある。
【0021】
図5は、スレーブ局の構成を示すブロック図である。なお、各スレーブ局は同一に構成されているので、ここではスレーブ局SL1について説明する。
スレーブ局SL1は、図5に示すように、全二重方式のシリアルバスの一方のバスラインL1から伝送フレームを受信し、この伝送フレーム中のデータ情報を演算処理部(CPU)11に伝達する受信部13と、演算処理部11で設定されたスレーブ局に送信する送信データをもとに伝送フレームを生成し、これを他方のバスラインL2に送信する送信部15とを備えている。
【0022】
そして、前記演算処理部(CPU)11は、マスタ局Mから通知される、自局において制御している図示しない各種機器の位置指令或いは速度指令等の制御情報をもとに、各種機器を制御すると共に、これら各種機器の位置情報や速度情報等のモニタ情報を予め設定された周期で収集して送信データを生成し、これを送信部15に出力する。
【0023】
前記受信部13は、図5に示すように、バスラインL1からの伝送フレームを取り込む第1受信レジスタ部21と、第1受信レジスタ部21に取り込まれた伝送フレームから、伝送フレームの開始を表すフラグデータm1を検出するフラグ検出部22と、このフラグ検出部22でフラグデータm1を検出したとき、第1受信レジスタ部21の伝送フレームのうちの、送信先アドレスm2からフレーム検査シーケンスチェック用データm5を順次取り込む第2受信レジスタ部23と、第1受信レジスタ部21の伝送フレーム中の送信先アドレスm2、制御コマンドm3及び伝送データm4に対し、CRCチェック等のフレーム検査シーケンス演算を行い、その演算結果と伝送フレームのチェック用データm5とを比較し、異常を検出したとき、これを演算処理部11に通知するFCS計算・比較部24と、第2受信レジスタ部23で取り込んだ伝送フレームの送信先アドレスm2を参照し、これが自局のアドレスであるかどうかを判定し、送信先アドレスm2が自局のアドレスであることを確認することができたとき、第2受信レジスタ部23の伝送フレームの中から伝送データm4及び制御コマンドm3を第3受信レジスタ部25に書き込むと共に、前記送信部15に対して起動指令を通知するアドレス検出部26と、第3受信レジスタ部25に書き込まれた制御コマンドm3を参照して、タクト同期用データであるか、同期データであるか、メッセージデータであるか、を判定する制御コマンド検出部27と、この制御コマンド検出部27によって制御される切り替え回路28と、第4受信レジスタ部29及び第5受信レジスタ部30と、を備えている。
【0024】
前記制御コマンド検出部27は、前記制御コマンドm3を参照し、これがタクト同期用データであるときには、切り替え回路28を制御して第3受信レジスタ部25と演算処理部(CPU)11とを接続して、タクト同期用データを受信したことを演算処理部11に通知する。また、前記制御コマンドm3が、同期データであるときには、第3受信レジスタ部25と第4受信レジスタ部29とを接続し、また、メッセージデータであるときには、第3受信レジスタ部25と第5レジスタ部30とを接続する。さらに、送信部15の後述の制御コマンド付加部35に対し、受信した伝送フレームが、同期データであるか、メッセージデータであるかを通知する。また、送信部15の後述の切り替え回路33を制御する。
【0025】
そして、演算処理部11では、タクト同期用データを受信した時点を、同期制御の同期データの送信周期の開始時点として認識して第4受信レジスタ部29及び第5受信レジスタ部30を参照し、前記第4受信レジスタ部29の伝送データm4を、マスタ局Mからの同期データとして取り込んでこれに基づき所定の処理を行う。また、前記第5受信レジスタ部30の伝送データm4が変更されていれば、これをメッセージデータとして読み込み、その内容に応じて所定の処理を実行し、このメッセージデータが、スレーブ局側で保持する情報の送信要求である場合には、指定された情報からなる送信データを生成し、必要に応じてこれを分割して送信レジスタ32に書き込む。また、マスタ局から分割されたメッセージデータを受信しているときには、送信レジスタ32に意味をなさない送信データを書き込むか或いは空データを書き込む等して、ダミーのメッセージデータをマスタ局Mに送信するようになっている。
【0026】
一方、前記送信部15は、マスタ局Mに同期データとして送信する送信データを書き込むための送信レジスタ31と、メッセージデータとして送信する送信データを書き込むための送信レジスタ32と、前記送信レジスタ31及び32の何れか一方と、第1送信レジスタ34とを選択的に接続する切り替え回路33と、前記制御コマンド検出部27から通知される、受信した伝送フレームの制御コマンドm3と同じデータ種を、送信レジスタ31に書き込まれた伝送データs4としての送信データに、制御コマンドs3として付加する制御コマンド付加部35と、これら制御コマンドs3及び伝送データs4に自局のアドレスを送信元アドレスs2として付加し、これをフレーム情報として第2送信レジスタ37に書き込むアドレス挿入部36と、第2送信レジスタ37に書き込まれるフレーム情報に対しCRCチェック等のフレーム検査シーケンス演算を行い、その演算結果をチェック用データs5としてフレーム情報に付加するFCS計算部38と、送信回路39によって第2送信レジスタ37から読み出されるフレーム情報に、フラグデータs1、s6を付加するフラグ挿入部40とを備えている。
【0027】
そして、前記切り替え回路33は、前記受信部13の制御コマンド検出部27によって制御され、制御コマンド検出部27は、受信した伝送フレームの制御コマンドm3が同期データであるときには、同期データ伝送用の送信レジスタ31と第1送信レジスタ34とを接続し、制御コマンドm3がメッセージデータであるときには、メッセージデータ伝送用の送信レジスタ32と第1送信レジスタ34とを接続する。
【0028】
また、前記送信回路39は、受信部13から起動指令が通知されると、前記受信部13がこの起動指令を通知するトリガとなった受信フレームの制御コマンドに応じて切り替え回路33で選択された同期データ又はメッセージデータからなる伝送データS4と、これに対応する制御コマンドs3と自局の送信元アドレスs2とからなるフレーム情報が前記第2送信レジスタ37に格納された後、この第2送信レジスタ37から、このフレーム情報を読み出し、フラグデータs1、送信元アドレスs2、制御コマンドs3、伝送データs4、チェック用データs5及びフラグデータs6からなる伝送フレームとして、フラグデータs1から順にバスラインL2に送信する。
【0029】
つまり、送信部15では、受信部13で受信した伝送フレームの制御コマンドが同期データであれば、同期データからなる伝送フレームを送信し、逆にメッセージデータであれば、メッセージデータからなる伝送フレームを送信するというように、受信した伝送フレームの制御コマンドで特定されるデータ種と同じデータ種のデータからなる伝送フレームを生成し、これを送信するようになっている。また、送信部15では、伝送フレームを受信したときには、これ以前に送信レジスタ31又は32に既に書き込まれている送信データを、伝送フレームとして送信するようになっている。
【0030】
図6は、マスタ局Mの受信部43の構成を示すブロック図である。
なお、マスタ局Mも、スレーブ局と同様に、スレーブ局からの伝送フレームを受信する受信部43と、演算処理部41で設定された送信データをもとに伝送フレームを生成し、これを送信する送信部45とから構成されている。
【0031】
図6に示すように前記受信部43は、バスラインL2からの伝送フレームを取り込む第1受信レジスタ部51と、第1受信レジスタ部51に取り込まれた伝送フレームから伝送フレームの開始を表すフラグデータs1を検出するフラグ検出部52と、このフラグ検出部52でフラグデータs1を検出したとき、フラグデータs1からs6までを一つの伝送フレームとして、第1受信レジスタ部51の伝送フレームを取り込む第2受信レジスタ部53と、第1受信レジスタ部51の伝送フレームに対しフレーム検査シーケンス演算を行い、その演算結果と伝送フレームのチェック用データs5とを比較し、異常を検出したとき、これを演算処理部41に通知するFCS計算・比較部54と、第2受信レジスタ部53に取り込まれた伝送フレームの送信元アドレスs2を参照し、その送信元のスレーブ局を認識すると共に、第2受信レジスタ部53に取り込まれた伝送フレームの中から、伝送データs4を第3受信レジスタ部55に書き込むアドレス検出部56と、第3受信レジスタ部55に書き込まれた制御コマンドm3を参照して、同期データであるか、メッセージデータであるか、を判定する制御コマンド検出部57と、この制御部コマンド検出部57によって制御される切り替え回路58、第4受信レジスタ部59及び第5受信レジスタ部60、を備えている。
【0032】
前記制御コマンド検出部57は、前記制御コマンドm3を参照し、これが同期データであるときには、前記切り替え回路58を制御して第3受信レジスタ部55と第4受信レジスタ部59とを接続し、また、メッセージデータであるときには、第3受信レジスタ部55と第5受信レジスタ部60とを接続する。
そして、演算処理部41では、所定の周期で第4受信レジスタ部59を参照すると共に、何れかのスレーブ局に対してメッセージデータを送信した場合には、必要に応じて所定のタイミングで第5受信レジスタ部60を参照して、それぞれに書き込まれた伝送データs4をマスタ局Mからの受信データとして処理するようになっている。
【0033】
一方、前記送信部45は、図7に示すように、演算処理部41によって、スレーブ局に送信する送信データが書き込まれる送信レジスタ61〜68と、この送信レジスタ61〜68のうちの何れかと、後述の第1送信レジスタ71とを選択的に接続する切り替え回路69と、前記第1送信レジスタ71に書き込まれた送信データを伝送データm4とし、この伝送データm4にこの伝送データm4が、、タクト同期用データ、同期データ或いはメッセージデータの何れであるかを表す制御コマンドm4を付加するコマンド付加部70と、前記第1送信レジスタ71に書き込まれた伝送データm4及び前記制御コマンドm3に、送信先のスレーブ局を特定するアドレスを送信先アドレスm2として付加し、これをフレーム情報として第2送信レジスタ72に書き込むアドレス挿入部73と、第2送信レジスタ73に書き込まれるフレーム情報に対しフレーム検査シーケンス演算を行いその演算結果を、チェック用データm5として前記フレーム情報に付加するFCS計算部74と、送信回路75が第2送信レジスタ72のフレーム情報を読み出したとき、これに、フラグデータm1、m6を付加するフラグ挿入部76と、演算処理部41から送信データ書き込み終了が通知されたとき送信回路75に起動指令を通知するタイミング発生回路77と、を備えている。
【0034】
そして、前記送信回路75は、タイミング発生回路77から起動指令が通知されると、これをトリガとして前記第2送信レジスタ72のフレーム情報を読み出し、フラグデータm1、送信元アドレスm2、制御コマンドm3、伝送データm4、チェック用データm5及びフラグデータm6を一つの伝送フレームとして、フラグデータm1から順にバスラインL1に送信する。
【0035】
また、前記タイミング発生回路77は、演算処理部41から送信データ書き込み終了の通知、また、マスタ局Mから同期伝送を行うスレーブ局の最大数、メッセージデータの有無、また、メッセージデータがある場合には、メッセージデータの書き込み終了の通知、その送信先のスレーブ局、メッセージデータの分割数を入力し、これら情報に基づいて、切り替え回路69の切り替えを行い、伝送データm4を順次更新する。また、切り替え回路69の切り替えと共に、切り替え先の、送信レジスタ61〜68が、タクト同期用であるか、同期データ用であるか、メッセージ伝送用の何れであるかを識別可能な情報、例えば、送信レジスタを識別するための識別情報等を、コマンド付加部70に出力する。
【0036】
このコマンド付加部70では、この識別情報をもとに制御コマンドを判断し、これを第1送信レジスタ71の伝送データm4に付加する。また、伝送エラーの発生の有無等の伝送状態情報を、必要に応じて演算処理部41に通知し、演算処理部41では、この伝送状態情報に基づいて再送信処理を行う等の対処を行うようになっている。
【0037】
前記送信レジスタ61〜68のうち、送信レジスタ61は、タクト同期用データを書き込むための送信レジスタである。また、送信レジスタ62〜64は、スレーブ局宛の同期データを書き込むための送信レジスタであって、それぞれスレーブ局と一対一に対応している。また、送信レジスタ66〜68は、メッセージデータを書き込むための送信レジスタである。ここでは、メッセージデータを三分割して送信するようにしているため、メッセージデータ用の送信レジスタを3つ備えている。また、これらメッセージデータ用の送信レジスタ66〜68は、連続したアドレスに設定され、メッセージデータの送信レジスタ66〜68への書き込みを行うことによって、自動的に、これら3つの送信レジスタに分割されて書き込まれるようになっている。また、これら送信レジスタ66〜68の容量は、この送信レジスタ66〜68のそれぞれに書き込まれた送信データからなる伝送フレームを形成しこれを送信した場合に、同期データの送受信に影響を及ぼすことなく送信を行うことの可能な容量に設定される。
【0038】
そして、前記演算処理部41は、各スレーブ局からの伝送フレームによって通知されるモニタ情報等をもとに、各スレーブ局で制御する制御機器に対する制御演算を行うと共に、その演算結果に基づいて、位置指令或いは速度指令といった制御情報を同期データとして予め設定した所定周期で生成し、これを送信先のスレーブ局に対応する送信レジスタ62〜65に書き込む。また、各スレーブ局間で同期伝送の同期をとるためのタクト同期用データを生成し、これを送信レジスタ61に書き込む。また、各スレーブ局間で、同期伝送をする必要のないメッセージデータ、つまり例えば、スレーブ局において保持する、トレースデータ及び故障状態データ等のアップロード、或いは、制御定数のダウンロード等を行うためのメッセージデータを、送信レジスタ66〜68に書き込む。このとき、演算処理部41では、例えば制御定数のダウンロード等を行うためにメッセージデータをスレーブ局宛に送信するときには、マスタ局Mから送信すべきメッセージデータのデータ長及び、各スレーブ局から受信すべきメッセージデータ長に応じて、このメッセージデータを、最大3分割にして送信するようになっている。つまり、送信すべきメッセージデータは、送信レジスタ66〜68に分割して書き込み可能な長さに設定される。
【0039】
また、何れかのスレーブ局からメッセージデータを受信するときには、前記スレーブ局宛にメッセージデータの送信要求等からなるメッセージデータを送信した後、この送信したメッセージデータに対する応答としてのメッセージデータを前記スレーブ局がメッセージデータを送信するためのトリガとなるダミーのメッセージデータを、前記スレーブ局宛に送信するようになっている。なお、このダミーのメッセージデータの送信データとしては、意味のないデータ又は空データを送信するようになっている。また、スレーブ局からトレースデータ等、前記スレーブ局の送信レジスタ32に一度に格納しきれないデータを受信する場合、つまり、複数に分割されてデータが送信される場合には、所定のデータを全て受信するまで、ダミーのメッセージデータを送信するようになっている。
【0040】
そして、前記送信レジスタ66〜68の容量は、送信レジスタ単位で、この送信レジスタ66〜68に格納されたメッセージデータからなる伝送フレームを生成した場合に、一つの送信レジスタに格納されたメッセージ送信データを、1送信周期期間内の空き時間に送信した場合に、1送信周期期間内で十分伝送フレームの授受を行うことの可能な容量に設定される。
【0041】
また、演算処理部41では、このようにして、各送信レジスタ61〜68にデータの書き込みを行ったならば、送信データ書き込みの終了を、前記タイミング発生回路77に通知すると共に、同期伝送を行うスレーブ局の総数(この場合、S1〜S4の4つ)を通知する。また、メッセージデータの書き込みを行った場合には、メッセージデータの書き込みの終了を前記タイミング発生回路77に通知すると共に、メッセージデータの送信先のスレーブ局、さらに、メッセージデータをいくつに分割して、送信レジスタに書き込んだかを表すメッセージデータの分割数を、タイミング発生回路77に通知する。
【0042】
次に、上記第1の実施の形態の動作を説明する。
マスタ局Mでは、予め設定した周期で各スレーブ局SL1〜SL4に対し、位置指令、或いは、速度指令等の制御情報等の同期データからなる伝送フレームを送信し、各スレーブ局SL1〜SL4では、同期データを受信するとこれをトリガとして、マスタ局Mからの制御情報に基づいて、自局が制御する各種機器の位置情報或いは速度情報等といったモニタ情報等の同期データからなる伝送フレームをマスタ局Mに送信する。そして、マスタ局Mでは、受信したモニタ情報に基づいて各スレーブ局SL1〜SL4の制御状況を認識しこれに基づいて制御演算を行い、前記制御情報の生成を行う。
【0043】
なお、前記マスタ局からの伝送フレーム及びスレーブ局からの伝送フレームの伝送データは必ずしも毎周期毎に更新或いは設定されている必要はなく、例えば、伝送データm4、s4が設定されていなくてもよい。つまり、例えば、マスタ局Mにおいて、各種機器の制御演算周期に比較して、より短い周期で、各種制御機器のモニタ情報を収集する必要がある場合には、マスタ局Mから、伝送データを設定せずに、形式的に伝送フレームを送信するようにしてもよい。
【0044】
そして、マスタ局Mでは、所定の送信周期に応じて、タクト同期用データ、各スレーブ局宛の同期データを生成すると共に、必要に応じて、スレーブ局宛のメッセージデータを生成し、図8に示すデータ書き込み処理を所定の周期で実行して、タクト同期用データ、各スレーブ局宛の同期データをタクト同期用送信レジスタ61及び同期データ伝送用送信レジスタ62〜65にそれぞれ書き込むと共に、メッセージデータを送信レジスタ66〜68に書き込む。
【0045】
具体的には、まず、ステップS1でタクト同期用データ及びスレーブ局宛の同期データをそれぞれタクト同期用送信レジスタ61及び同期データ伝送用送信レジスタ62〜65に書き込む。次いで、ステップS2に移行し、書き込み可能フラグFwがFw=0であるかどうかを判定し、Fw=0でないときには、ステップS3に移行して、タイミング発生回路77からメッセージデータの送信終了が通知されたかどうかを判定し、終了通知がなされているときには、ステップS4に移行し、書き込み可能フラグFwを“0”に設定した後、ステップS5に移行し、ステップS3で、終了通知がなされていないときにはそのまま後述のステップS7に移行する。
【0046】
前記ステップS5では、送信すべきメッセージデータがあるかどうかを判定し、送信すべきメッセージデータがないときにはそのまま後述のステップS7に移行する。一方、送信すべきメッセージデータがあるときには、ステップS6に移行し、送信すべきメッセージデータを、例えば、送信レジスタ66に書き込む。これにより、送信すべきメッセージデータが送信レジスタ66に書き込みきれない場合には、順次、送信レジスタ67、68の順に書き込みが行われ、結果的に最大3分割されることになる。また、この書き込みの結果、いくつの送信レジスタに分割して書き込みが行われたかをメッセージデータの先頭に付加する。そして、メッセージデータの書き込み終わったならば書き込み可能フラグをFw=1に設定した後、ステップS7に移行する。
【0047】
このステップS7では、各送信レジスタへの送信データの書き込みが終了したことをタイミング発生回路77に通知すると共に、メッセージデータを新たに書き込んだ場合には、メッセージデータ有りとして、メッセージデータの有無をタイミング発生回路77に通知し、さらに、メッセージデータ有りの場合には、このメッセージデータの送信先、また、メッセージデータをいくつの送信レジスタに分割して格納したかを表す分割数を通知する。そして、データ書き込み処理を終了する。
【0048】
なお、前記メッセージデータの分割数は、例えば送信すべきメッセージデータのデータ長と、各記送信レジスタ66〜68の容量とに基づいて検出する。
また、予め起動時等に、前記タイミング発生回路77に対し、マスタ局Mと伝送フレームの授受を行うスレーブ局数を、最大スレーブ局数として通知するようになっている。
【0049】
一方、タイミング発生回路77では、演算処理部41から通知された最大スレーブ局数に基づいてスレーブ局の最大数を認識し、この最大スレーブ局数に応じて、送信レジスタを切り替える。つまり、最大スレーブ局数が“4”として通知された場合には、例えば、各スレーブ局への同期データを書き込むための、送信レジスタを4つ使用し、例えば送信レジスタ62から順に、送信レジスタ65まで切り替えを行うものと認識する。また、例えば“2”として通知された場合には、送信レジスタ64及び65への切り替えは行わず、送信レジスタ62及び63を切り替えることになる。なお、ここでは、送信レジスタ62から順に、63、64、65の順で切り替えを行うようにしているが、これに限るものではなく、任意の順で切り替えを行うことができる。
【0050】
そして、タイミング発生回路77では、図9のフローチャートに示すように、送信データの書き込み終了通知を演算処理部41から受信すると、ステップS11からステップS12に移行し、このとき、演算処理部41からメッセージデータ有りとして通知された場合には、ステップS13に移行し、メッセージフラグFmをFm=1に設定した後、ステップS14に移行する。一方、メッセージデータ無しとして通知されたときには、そのままステップS14に移行する。
【0051】
このステップS14では、タクト同期用データの送信処理を実行する。具体的には、切り替え回路69を制御して、送信レジスタ71とタクト同期用の送信レジスタ61とを連通させる。また、アドレス挿入部73及びコマンド付加部70に対し、タクト同期用の送信レジスタ61を選択したことを通知する。
これによって、送信レジスタ61のタクト同期用データは、第1送信レジスタ71に書き込まれ、この送信データに対し、コマンド付加部70によって、制御コマンドm3として、送信レジスタ61に対応するタクト同期用データであることが付加され、さらに、アドレス挿入部73によって、ブロードキャスト伝送用のアドレスが付加される。
【0052】
さらに、FCS計算部74によりフレーム検査シーケンス演算が行われ、送信データに、マスタ局Mのアドレス、フレーム検査シーケンス演算の結果が付加されてフレーム情報として、第2送信レジスタ72に格納される。
そして、タイミング発生回路77では、予め設定された送信周期にしたがって、次の送信周期が開始するタイミングで、起動指令を送信回路75に出力し、送信回路75では、第2送信レジスタ72に格納されたフレーム情報を読み出し、フラグ挿入部76によって、その先頭及び末尾にフラグデータm1及びm6が付加されたフレーム情報を、伝送フレームとして、バスL1に出力する。これによって、このタクト同期用データは、ブロードキャスト伝送によって、各スレーブ局SL1〜SL4に伝送されることになる。
【0053】
そして、タイミング発生回路77では、前記タクト同期用データの送信が終了したならば、ステップS16に移行し、同期データの送信処理を行う。すなわち、まず、切り替え回路69を操作して第1送信レジスタ71及び送信レジスタ62を連通し、送信レジスタ62の送信データを第1送信レジスタ71に転送し、この第1送信レジスタ71の送信データに対し、アドレス挿入部73によって、送信レジスタ62に対応するスレーブ局、つまりスレーブ局SL1のアドレスを付加し、また、コマンド付加部70によって、送信レジスタ62に対応する制御コマンド、つまり、同期データであること、を付加し、さらに、フレーム情報、フラグ情報等を付加する。そして、タイミング発生回路77が、予め設定された同期データの送信タイミングにしたがって所定のタイミングで送信回路75に起動指令を通知し、これをうけて、スレーブ局SL1宛の同期データからなる伝送フレームを送信回路75がバスL1に送信することによって、送信レジスタ62に書き込まれたスレーブ局SL1宛の同期データが、スレーブ局SL1宛に送信されることになる。
【0054】
そして、タイミング発生回路77では、次に、送信レジスタ63と、第1送信レジスタ71とを連通するよう切り替え回路69を切り替え、送信レジスタ63を選択したことをアドレス挿入部73及びコマンド付加部70に通知し、以後、上記と同様にして、今度は、送信レジスタ63に書き込まれたスレーブ局SL2宛の伝送フレームが生成され、これがバスL1に送信されて、送信レジスタ63に書き込まれたスレーブ局SL2宛の同期データが、スレーブ局SL2宛に送信されることになる。
【0055】
この処理を繰り返し行って、切り替え回路69によって、第1送信レジスタ71の接続先を送信レジスタ64、65に順次切り替えることによって、スレーブ局SL3宛、SL4宛に順次同期データを送信する。
そして、最大スレーブ数として指定された数のスレーブ局宛に伝送フレームを送信したとき、同期データの送信処理を終了し、ステップS24に移行する。
【0056】
このステップS24では、メッセージフラグがFm=1であるかどうか、つまり、送信すべきメッセージデータがあるかどうかを判断する。このとき、Fm=0であるときには、送信すべきメッセージデータはないものと判断し、一回の送信周期における、データの送信は終了したものと判定し、処理を終了する。
一方、メッセージフラグがFm=1であり、送信すべきメッセージデータがあると判定される場合には、ステップS26に移行し、メッセージカウンタCmを“1”だけインクリメントとする。そして、このメッセージカウンタCmのカウント値に応じた送信レジスタを選択するよう、切り替え回路69を制御する。
【0057】
前記メッセージカウンタCmは、送信レジスタ66〜68のうちの何れを選択するかを決定するためのカウンタであって、メッセージカウンタCmが“1”のとき送信レジスタ66、“2”のとき送信レジスタ67、“3”のとき送信レジスタ68を選択するものとする。したがって、この場合、メッセージカウンタCmは“1”であるから、メッセージデータ用の送信レジスタ66と、第1送信レジスタ71とを接続するよう指示を行う。また、メッセージカウンタCmを“1”だけインクリメントし、さらに、アドレス挿入部73に対して、送信先のスレーブ局例えば、スレーブ局SL1を通知し、また、送信レジスタ66を選択したことを通知する。
【0058】
これによって、今度は第1送信レジスタ71と送信レジスタ66とが接続され、送信レジスタ66のメッセージデータが、第1送信レジスタ71に取り込まれ、送信先として通知されたスレーブ局SL1のアドレスがアドレス挿入部73によって付加され、また、送信レジスタ66に対応する制御コマンド、つまりメッセージデータであることが付加される。
【0059】
そして、タイミング発生回路77では、予め設定されたメッセージデータを送信するタイミングとなった時点で、送信回路75に対して起動指令を通知し(ステップS28)、これによって、送信回路75からスレーブ局SL1宛のメッセージデータが送信されることになる。
そして、タイミング発生回路77では、メッセージカウンタCmが、演算処理部41から通知されたメッセージデータの分割数と一致するかを判定し(ステップS30)、例えば、このとき、メッセージデータの分割数として“3”が通知された場合には、一致しないから、そのまま処理を終了する。
【0060】
以上の処理によって、第1の送信周期におけるマスタ局Mの送信部45の処理が終了する。
したがって、この第1の送信周期においては、図3に示すように、まず、タクト同期用データDBが、各スレーブ局SL1〜SL4宛にブロードキャスト伝送で送信され、続いて、同期データDM1〜DM4がそれぞれスレーブ局SL1宛、スレーブ局SL2宛、スレーブ局SL3宛、スレーブ局SL4宛に順次送信された後、さらに、スレーブ局SL1宛のメッセージデータM−DMが送信される。このとき、送信されるメッセージデータは、送信すべきメッセージデータを3分割にしたうちの、第1のブロックが送信されることになる。
【0061】
そして、次の第2の送信周期では、演算処理部41では、上記と同様にして、送信すべき送信データを生成し、これを送信レジスタに書き込む。このとき、送信すべきメッセージデータがあったとしても、先の第1の送信周期で、メッセージデータの送信を行っており、書き込み可能フラグFwがFw=1に設定されているから、ステップS1からステップS2に移行し、第1の送信周期で、メッセージデータを3分割した3ブロックのうち、まだ1ブロックしか送信していないから、この時点では、タイミング発生回路77から、メッセージデータの送信終了通知が行われていない。したがって、ステップS2からそのまま処理を終了し、新たなメッセージデータの書き込みは行わない。したがって、送信レジスタ66〜68に格納されている、まだ送信されていない送信すべきメッセージデータが削除されることはない。
【0062】
そして、タイミング発生回路77では、上記と同様にしてタクト用同期データ及び同期データの書き込みが終了したことを通知されると、これをうけて、図9に示すように、ステップS11からステップS12に移行し、このとき、メッセージデータの書き込み通知は行われないから、ステップS14に移行し、切り替え回路69を制御して、まず、タクト同期用データの送信処理を行い、続いて、送信レジスタ62〜65を順次切り替え、各スレーブ局宛の同期データの送信処理を行う(ステップS16)。
【0063】
そして、このとき、メッセージフラグはFm=1に設定されていることから、ステップS24からステップS26に移行し、メッセージカウンタCmを“1”だけインクリメントした後、このカウンタ値“2”に相当する送信レジスタ、この場合送信レジスタ67を第1送信レジスタ71の接続先として切り替え、所定のタイミングで起動通知を送信回路75に通知する(ステップS26、S28)。
【0064】
これによって、上記と同様にして、送信レジスタ67のメッセージデータに対して、指定されたスレーブ局SL1のアドレス及び制御コマンドはメッセージデータが付加され、これらから伝送フレームが生成されて所定のタイミングでバスL1に送信される。
そして、メッセージデータが3分割されている場合には、メッセージカウンタCmの値は、メッセージデータと一致しないから、そのまま処理を終了する。
【0065】
以上の処理によって、第2の送信周期が終了したことになる。この場合も、図3に示すように、第2の送信周期のうちに、タクト同期用データ、各スレーブ局宛の同期送信データ、スレーブ局SL1宛のメッセージデータが送信されるが、この第2の送信周期で送信されるメッセージデータは、本来送信すべきメッセージデータを3分割にした、2ブロック目のデータである。
【0066】
そして、第3の送信周期においては、演算処理部41では、第2の送信周期と同様にして、タクト同期用データ、同期データを書き込み、送信データの書き込みをタイミング発生回路77に通知する。
そして、タイミング発生回路77では、第2の送信周期と同様に、タクト同期用データ、同期データを送信した後、ステップS24からステップS26に移行し、メッセージカウンタCmを“1”だけインクリメントし、メッセージカウンタCmが“3”となることから、切り替え回路69によって送信レジスタ68に切り替え、送信レジスタ68のメッセージデータを送信する。そして、ステップS30に移行し、このとき、メッセージカウンタCmは、“3”であり、分割数(=3)と一致するからステップS30からステップS32に移行し、メッセージカウンタCm、メッセージフラグFmを零にリセットすると共に、演算処理部41に対して、メッセージデータの送信が終了したことを通知する。
【0067】
以上の処理によって、第3の送信周期が終了したことになる。この場合も、図3に示すように、第3の送信周期のうちに、タクト同期用データ、各スレーブ局宛の同期送信データ、スレーブ局SL1宛のメッセージデータが送信されるが、この第3の送信周期で送信されるメッセージデータは、本来送信すべきメッセージデータを3分割にした、3ブロック目のデータである。
【0068】
したがって、送信すべきメッセージデータは、第1から第3の送信周期にわけて、スレーブ局SL1に送信されることになる。
そして、次に、メッセージデータを送信する場合には、メッセージデータを3分割した3ブロック目の送信が終了したときに、メッセージデータの終了通知がタイミング発生回路77から演算処理部41に対して行われるから、図8のステップS1からステップS2、S3を経てステップS4に移行し、書き込み可能フラグがFw=0にリセットされる。したがって、ステップS4からステップS5に移行し、新たなメッセージデータの、送信レジスタ66〜68への書き込みが可能となる。そして、以後、上記と同様の処理が行われることになる。
【0069】
一方、スレーブ局SL1〜SL4では、その受信部13では、図5に示すように、バスL1から伝送フレームを受信すると、第1受信レジスタ部21にこれを取り込み、フラグ検出部22においてフラグデータm1を検出すると、送信先アドレスm2からフラグデータm6までを第2受信レジスタ部23に書き込む。また、FCS計算・比較部24では、伝送フレームに対し、フレーム検査シーケンス演算を行い、その結果が正常でなければこれを演算処理部11に通知し、演算処理部11では、マスタ局からの伝送フレームを正常に受信することができなかったとして、所定の対処を行う。
【0070】
また、アドレス検出部26では、第2受信レジスタ部23に格納された伝送フレーム中の送信先アドレスm2を参照し、これが自局を特定するアドレスであることを認識したとき、送信部14の送信回路35に対し、起動指令を通知する。また、第2受信レジスタ部23の伝送フレーム中の制御コマンドm3をもとに、制御コマンド検出部27において、受信した伝送フレームが、同期データであるか、メッセージデータであるかが判定され、同期データであると判定されたときには、切り替え回路28により、第3受信レジスタ部25と第4受信レジスタ部29とが接続されて、伝送データm4が第4受信レジスタ部29に書き込まれ、メッセージデータであると判定されたときには、切り替え回路28により、第3受信レジスタ25と第5受信レジスタ部30とが接続されて、第5受信レジスタ部30に書き込まれる。
【0071】
そして、演算処理部11では、第4受信レジスタ部29及び第5受信レジスタ部30に書き込まれた伝送データm4を、所定のタイミングで参照し、第4受信レジスタ部29に書き込まれた同期データをもとに、所定の制御処理を行うと共に、第5受信レジスタ部30にメッセージデータが書き込まれている場合には、このメッセージデータに付加されている分割数に応じて、このメッセージデータが何分割されて送信されるかを判定する。
【0072】
この場合、上述のようにメッセージデータが3分割して送信されるから、最初のメッセージデータに付加されている分割数情報に基づいて、このメッセージデータは3分割して送信されることを認識し、3送信周期が経過して、3分割したメッセージデータを全て受信したとき、これら3送信周期分のメッセージデータを組み合わせて分割して送信されたメッセージデータを一つのメッセージデータに復元する(復元手段)。これによって、スレーブ局では、マスタ局が送信したメッセージデータ全体を認識することができる。そして、このメッセージデータに基づいて所定の処理を行う。
【0073】
また、各スレーブ局SL1〜SL4では、演算処理部11において、マスタ局Mから自局宛の伝送フレームを受信するタイミングに応じて、マスタ局Mに送信すべき同期データを生成し、同期データ伝送用の送信レジスタ31に書き込んでいる。
そして、同期データからなる伝送フレームを受信すると、これに応じて切り替え回路33が動作して送信レジスタ31と第1送信レジスタ34を接続し、これによって、送信レジスタ31の同期データが第1送信レジスタ34に伝達され、制御コマンド付加部35が受信部13から通知された制御コマンドつまり同期データを制御コマンドとしてこれに付加し、この送信レジスタ34に書き込まれた送信データ及び制御データに対し、アドレス挿入部36によって、自局を特定するアドレスが付加され、これが第2送信レジスタ37に書き込まれる。また、送信レジスタ37に書き込まれたフレーム情報に対し、FCS計算部38によってフレーム検査シーケンス演算が行われ、その演算結果が第2送信レジスタ37のフレーム情報に付加される。
【0074】
そして、送信回路39は第2送信レジスタ37に格納されている、この受信した伝送フレームと同じデータ種である、フレーム情報を読み出し、フラグ挿入部40によって、フラグデータs1及びs6を付加し、これを伝送フレームとして送信する。
これによって、マスタ局Mからの同期データに対する応答として、各スレーブ局SL1〜SL4では、同期データからなる伝送フレームを送信することになる。
【0075】
なお、ここでは、スレーブ局では、マスタ局Mから同期データを受信したとき、この時点で既に送信レジスタ31に格納されている同期データを送信するようになっている。つまり、スレーブ局では、マスタ局Mからの同期データに対し、送信周期が一つ遅れたタイミングで同期データを送信するようになっている。
一方、同期データと共にメッセージデータを受信したスレーブ局SL1では、制御コマンド検出部27において、切り替え回路28を切り替えてメッセージデータを第5受信レジスタ部30に伝達すると共に、切り替え回路33を切り替えて送信レジスタ32と第1送信レジスタ34とを接続し、送信レジスタ32のメッセージデータを第1送信レジスタ34に伝達する。つまり、送信部15では、メッセージデータからなる伝送フレームを受信する以前に既に、送信レジスタ32に格納されていたメッセージデータを第1送信レジスタ34に伝達する。なお、演算処理部11では、マスタ局Mから何れのメッセージデータを送信するかを指示されていない状態では、意味のない、ダミーの送信データを書き込む。したがって、マスタ局Mから3分割したメッセージデータの第1ブロックを受信した時点では、ダミーのメッセージデータが送信されることになる。
【0076】
続いて、メッセージデータの第2ブロックを受信した時点でも、スレーブ局SL1では、送信すべきメッセージデータがないことから、ダミーの送信データを格納し、これが送信される。そして、第3のブロックを受信したときにもダミーの送信データが送信される。
つまり、図3に示すように、マスタ局Mがスレーブ局SL1に対して3分割したメッセージデータM−DMを3周期にわたって送信しているときには、この応答としてスレーブ局SL1では、ダミーのメッセージデータM−DSを送信することになる。
【0077】
そして、マスタ局Mの受信部43では、図6に示すように、バスL2から、各スレーブ局SL1〜SL4からの伝送フレームを受信するとこれを第1受信レジスタ部51に取り込み、フラグ検出部52でフラグデータs1を検出したならば、送信元アドレスs2〜フラグデータs6までを第2受信レジスタ部53に格納する。また、FCS計算・比較部54では、この受信データに対し、フレーム検査シーケンス演算を行い、この演算結果と、伝送フレーム中のチェック用データs5とを比較し、これらが一致しないときには、演算処理部41に対しFCSエラーであることを通知する。演算処理部41では、FCSエラー通知が行われたときには、この伝送データは無効であることを認識し所定の対処を行う。
【0078】
一方、フレーム検査シーケンス演算の結果がチェック用データs5と一致した場合には、伝送が正常に行われたものと認識し、アドレス検出部56において、送信元アドレスs2をもとに、この伝送フレームの送信元のスレーブ局を認識し、制御コマンドs3及び伝送データs4を、送信元アドレスs2で特定したスレーブ局からの伝送データとして、第3受信レジスタ部55に書き込む。この第3受信レジスタ部55の制御コマンドs3を参照し、制御コマンド検出部57において、伝送データが同期データであるか、メッセージデータであるかを判断し、これに応じて、切り替え回路58を切り替え、すなわち、同期データであるときには、第4受信レジスタ59を選択して第3受信レジスタ部55の伝送データを第4受信レジスタ部59に書き込み、逆にメッセージデータであるときには、第3受信レジスタ部55の伝送データを第5受信レジスタ60に書き込む。
【0079】
そして、演算処理部41では、送信周期に応じて、所定のタイミングで、第4受信レジスタ59及び第5受信レジスタ60を参照し、第4受信レジスタ59の同期データをもとに所定の処理を行う。また、スレーブ局SL1から送信されたメッセージデータは、第5受信レジスタ60に伝達されるが、このメッセージデータはダミーであるから、演算処理部41では処理を行わない。
【0080】
以上が、マスタ局Mからスレーブ局SL1に、3分割したメッセージデータを伝送する際のマスタ局M及びスレーブ局SL1〜SL4の動作である。
この状態から、例えば、マスタ局Mが、スレーブ局SL1のトレースデータをロードアップする場合には、マスタ局Mでは、トレースデータ等をアップロードするための送信要求を行うためのメッセージデータを生成して、上記と同様にしてスレーブ局SL1宛に送信する。そして、次の送信周期で、スレーブ局SL1がアップロード情報からなるメッセージデータを送信するためのトリガとなるダミーのメッセージデータを送信する。そして、例えば、スレーブ局SL1から、アップロード情報の送信終了が通知されるまで、ダミーのメッセージデータを送信周期毎に送信する。
【0081】
一方、スレーブ局SL1では、アップロード情報の送信要求のメッセージデータを受けると、この時点ではまだ指定された送信すべきメッセージデータの送信レジスタ32への書き込みが終了していないから、まず、ダミーのメッセージデータを送信し、受信したメッセージデータを解読し、指定されたアップロード情報からなるメッセージデータを生成し、メッセージデータ伝送用の送信レジスタ32に書き込む。そして、次に、マスタ局Mからダミーのメッセージデータを受信したとき、指定されたアップロード情報からなるメッセージデータを送信する。
【0082】
このとき、トレースデータを一度に送信することができない場合には、複数回に分割して送信レジスタ32に書き込む。そして、以後、マスタ局からダミーのメッセージデータを送信するタイミングで順次アップロード情報をマスタ局Mに送信し、指定されたアップロード情報を全て送信し終えたとき、アップロード情報の送信終了を通知するためのメッセージデータを送信する。
【0083】
これによって、マスタ局Mでは、スレーブ局SL1から全てのメッセージデータを受信したことを認識し、ダミーのメッセージデータの送信を終了する。
以上の処理によって、スレーブ局SL1からマスタ局Mへのアップロード情報の伝送が終了する。
ここで、マスタ局Mは、所定の送信周期で、各スレーブ局宛に同期データを送信しその応答を受信するようにしている。したがって、各スレーブ局から同期データを受信した後は、次の送信周期が始まるまでの間は、バスL1及びL2は空き状態となる。前記マスタ局とスレーブ局との間でのメッセージデータの授受は、前記バスL1及びL2が空き状態となる期間を利用して行うようにしている。このため、本来授受される同期データの高速通信には、何ら影響を与えることなく、メッセージデータを送信することができる。
【0084】
したがって、このように空き時間を利用してバスL1及びL2を利用してメッセージデータを送信することができるから、各スレーブ局におけるモーションコントロールを実行しながら、これと共に、各スレーブ局への制御定数のセットアップや、各スレーブ局で保持する情報の吸い上げ等を行うことができ、効率向上を図ることができると共に、バスL1、L2を有効に活用することができる。
【0085】
また、このとき、バスL1及びL2を介して高速通信を行うことができるから、メッセージデータの授受に要する通信時間の短縮を図ることができる。
また、このとき、比較的長い送信データをメッセージデータとして送信する場合には、メッセージデータを分割して送信するようにし、且つ分割したメッセージデータからなる伝送フレームを送信する際に、同期データの伝送における空き時間内で送信可能な大きさに分割して送信するようにしている。したがって、メッセージデータを送信するに当たり、大容量のメッセージデータを伝送する場合であっても、同期データの伝送に影響を及ぼすことなく伝送することができる。
【0086】
また、このとき、メッセージデータ用の送信レジスタを複数設け、比較的長い送信データであっても複数の送信レジスタにわたって一度に書き込みを行うようにしている。したがって、マスタ局Mの演算処理部41では、複数の送信周期にわたって送信する必要のあるメッセージデータであっても、一度、送信レジスタへの書き込みを行えば、後は、タイミング発生回路77側でメッセージデータを分割送信するから、演算処理部41ではメッセージデータの書き込みを一度行うだけでよい。したがって、その分、演算処理部41での処理を軽減することができ、これに伴って演算処理部41での処理効率を向上させることができる。
【0087】
なお、上記第1の実施の形態においては、スレーブ局SL1から、トレースデータ等をアップロードするときに、マスタ局Mから送信要求からなるメッセージデータをスレーブ局SL1に対して送信した後、スレーブ局SL1に対してダミーのメッセージデータを送信して、送信要求したアップロード情報をスレーブ局SL1から送信させるようにした場合について説明したが、これに限るものではなく、マスタ局Mからの送信要求を受けたスレーブ局SL1側での、送信用データの生成処理に伴う処理時間を考慮し、例えば、送信要求からなるメッセージデータをスレーブ局SL1に対して送信した後、前記処理時間を考慮した所定の送信周期後に、スレーブ局SL1に対してダミーのメッセージデータを送信するようにし、送信要求をうけてスレーブ局SL1側で送信要求に応じた送信データの送信レジスタ32への書き込みが完了したと予測される時点で、再度ダミーのメッセージデータを送信するようにしてもよい。
【0088】
また、このとき、スレーブ局SL1から複数に分割してトレースデータを送信する場合には、スレーブ局SL1側で、ロードアップ情報の送信終了通知を行わず、スレーブ局SL1側で分割した第1ブロックのメッセージデータに分割数を付加して送信し、マスタ局側でこの分割数に応じてダミーのメッセージデータの送信回数を調整するようにしてもよい。また、このとき、通知された分割数に応じて、演算処理部41で、メッセージデータ用の送信レジスタ66〜68にダミーのメッセージデータを設定し、さらに、通知された分割数を、マスタ局側からのメッセージデータの分割数としてタイミング発生回路77に通知することによって、タイミング発生回路77において、順次ダミーのメッセージデータを送信管理を行うようにしてもよい。
【0089】
なお、マスタ局Mとスレーブ局との間のメッセージデータを伝送する際の伝送手順、つまり例えば、マスタ局Mから何れかのスレーブ局に対してダウンロード情報を送信するときにマスタ局Mとスレーブ局との間でやりとりする情報の伝送手順、或いは、マスタ局Mが各スレーブ局からアップロード情報を受信するための伝送手順等は、上記に限らず、任意に設定することができる。
【0090】
また、上記第1の実施の形態においては、マスタ局Mの送信部45において、メッセージデータ伝送用の送信レジスタ66〜68を3つ設けた場合について説明したが、これに限らず、任意数の送信レジスタを設けることが可能であり、また、メッセージデータのデータ長が、同期データの送信の空き時間に一度に送信可能なデータ長である場合には、送信レジスタを1つだけ設けるようにしてもよいことはいうまでもない。
【0091】
また、送信レジスタ66〜68に書き込みきれないメッセージデータを送信する場合には、上述のように、送信レジスタを増やすようにしてもよく、また、演算処理部41側で、メッセージデータを送信レジスタ66〜68を一つの分割単位として、分割して書き込むようにし、送信レジスタ66〜68に格納されたメッセージデータの一部を送信し終えた後、この続きのメッセージデータを送信レジスタ66〜68に書き込み、同様にして送信するようにしてもよい。
【0092】
次に、本発明の第2の実施の形態を説明する。
この第2の実施の形態は、上記第1の実施の形態においては、一回の送信周期間に、メッセージデータを分割したうちの1ブロックを送信するようにした場合について説明したが、この第2の実施の形態は、空き時間がある場合には、複数のブロックを送信するようにしたものである。
【0093】
この第2の実施の形態におけるマスタ局Mの送信部45は、図10に示すように、図7に示す第1の実施の形態におけるマスタ局Mの送信部45において、さらに、伝送時間演算部80が追加されている。なお、上記第1の実施の形態と同一部には、同一符号を付与しその詳細な説明は省略する。
この第2の実施の形態におけるマスタ局Mの演算処理部41は、予め起動時等に前記伝送時間演算部80に対し、同期伝送を行う最大スレーブ局数、同期伝送を行う送信周期の設定時間及び、同期伝送バイト数を通知するようになっている。
【0094】
そして、伝送時間演算部80では、通知された同期伝送を行う最大スレーブ局数、同期伝送を行う送信周期の設定時間及び、同期伝送バイト数に基づいて、一回の送信周期期間において、メッセージデータを送信するために利用することの可能な空き時間を算出する。例えば、タクト同期用データのバイト数と、同期データのバイト数と最大スレーブ局数とを乗算した値とを加算して、送信すべきデータのバイト数の総和を算出し、これに、バスのビット数(例えば8ビット)/伝送速度〔bps〕を乗算して、送信すべきデータを送信し終えるのに要する所要時間を算出し、これを送信周期の設定時間から減算して空き時間Tfreeを算出する。
【0095】
さらに、メッセージデータを送信可能な送信レジスタの数をXとし、この送信レジスタに格納可能なデータの全ビット長とを乗算した値を伝送速度〔bps〕で割り算した、送信レジスタの数Xに相当する伝送データを送信し終えるのに要する所要時間をTall とし、所要時間Tall <空き時間Tfreeを満足する送信レジスタの数Xを算出する。
【0096】
なお、送信レジスタに格納可能なデータのビット長、つまり、分割されたメッセージデータの1ブロックのビット長は固定長とし、また、伝送速度も固定値とする。
例えば、モーションコントロールにおいては、送信周期設定時間は、1〔ms〕以上に設定されることが大きいから、送信周期設定時間を1〔ms〕、伝送速度を16〔Mbps〕、最大スレーブ局数を20局、1伝送ブロック、つまり、各送信レジスタのビット長をそれぞれ50バイトとすると、メッセージ伝送で使用することのできる空き時間Tfreeは、次式(1)で表すことができる。
【0097】
Tfree=1〔ms〕
−(50バイト+50バイト×20局)×8ビット/16〔Mbps〕
=475〔μs〕 ……(1)
したがって、この空き時間がメッセージ伝送に利用することの可能な時間となる。
【0098】
よって、この空き時間を満足し得る、伝送ブロック数Xを算出し、これをタイミング発生回路77に通知する。
これを受けて、タイミング発生回路77では、送信すべきメッセージデータがある場合には、一回の送信周期期間内に、伝送ブロック数Xに相当するメッセージデータを送信する。
【0099】
つまり、図11に示すように、上記第1の実施の形態と同様にして、タクト同期データ、同期データを送信した後、送信すべきメッセージデータがある場合には、ステップS24からステップS26aに移行し、まず、メッセージデータ用の送信レジスタを切り替えた後、アドレス挿入部73、コマンド付加部70にこれを通知し、メッセージカウンタCmを“1”だけインクリメントし、さらに、送信回数カウンタCxを“1”だけインクリメントする。そして、起動指令を通知する(ステップS28)。これにより、メッセージデータの第1のブロックが送信される。続いて、メッセージカウンタCmの値が、分割数と一致しないときには、ステップS30からステップS34に移行して、送信回数カウンタCxが伝送ブロック数Xと一致するかどうかを判定し、これらが一致しないときには、ステップS26aに戻り、メッセージ伝送用の送信レジスタを切り替え、上記と同様にして、メッセージデータの第2のブロックを送信する。再度、送信回数カウンタCxが、伝送ブロック数Xと一致しないときには、同様にして、次の送信レジスタに切り替え、第3のブロックを送信する。
【0100】
したがって、以上の処理により、一つの送信周期期間内で、3ブロックからなるメッセージデータの送信が終了することになる。
そして、全てのメッセージデータの送信が終了し、メッセージカウンタCmが分割数に達すると、ステップS30からステップS32aに移行し、レジスタカウンタCm、メッセージフラグFmを零にリセットすると共に、演算処理部41に対して、メッセージデータの送信が終了したことを通知する。さらに、送信回数カウンタCxを零にリセットした後、処理を終了する。
【0101】
一方、例えば3ブロックからなるメッセージデータのうち、2ブロックを送信した時点で、送信回数カウンタCxが伝送ブロック数Xと一致した場合には、ステップS34からステップS36に移行し、送信回数カウンタCxを零にリセットした後、処理を終了する。そして、次の送信周期では、メッセージフラグFmが“1”に設定されているから、ステップS26aに移行し、メッセージカウンタCmで特定される、次の送信レジスタに切り替えてこれを送信する。つまり、第3ブロックの送信が行われることになる。
【0102】
したがって、図12に示すように、マスタ局から、タクト同期用データDBに続いて、各スレーブ局宛の同期データDM1〜DM4を送信した後、同期データの送信に影響を与えない期間、メッセージデータの分割ブロックM−DMが送信されこの場合、一つの送信周期期間内に3つの分割ブロックM−DMが送信されることになる。したがって、上記第1の実施の形態と同等の作用効果を得ることができると共に、この場合、バスL1、L2の空き時間を最大限活用して、メッセージデータを送信するようにしているから、より伝送効率を向上させることができると共に、バスL1、L2をより有効に活用することができる。
【0103】
また、メッセージデータを送信するブロック数を、タクト同期用データ、各スレーブ局宛の同期データのデータ量に基づいて決定し、同期データの授受に対して確実に影響を与えないブロック数だけ伝送するようにしているから、メッセージデータの複数ブロックを送信することに起因して、同期データの授受に影響を及ぼすことはない。
【0104】
なお、上記各実施の形態において、定期送信データが同期データに対応し、メッセージデータが非定期送信データに対応し、図9及び図11のステップS16の処理が定期送信手段に対応し、図9のステップS26〜S32及び図11のステップS26a〜S36の処理が非定期送信手段に対応し、図5の制御コマンド検出部27がデータ種別判別手段に対応し、制御コマンド検出部27及び切り替え回路33が応答データ送信手段に対応し、図7及び図10の送信レジスタ66〜68が分割手段に対応し、スレーブ局の演算処理部11において、分割して伝送された所定数のメッセージデータの分割ブロックを受信したときにこれを復元する処理が復元手段に対応し、図10の伝送時間演算部80が空き時間予測手段に対応している。
【0105】
【発明の効果】
以上説明したように、本発明に係る通信システムによれば、所定の送信周期で定期送信データの授受を行う際に、その空き時間を利用して、定期送信データを送信するための伝送ラインを利用して非定期送信データを送信するようにしたから、非定期送信データを伝送するための伝送ラインを別途設けることなく、定期送信データと共に非定期送信データを伝送することができると共に、シリアル伝送ラインを有効に活用することができ、伝送効率を向上させることができる。
【0106】
特に、請求項3に係る通信システムによれば、この非定期送信データを、分割手段によって一つの送信周期期間内の空き時間で送信可能なデータ長に分割し、非定期送信データを送信する際には、分割送信手段により分割ブロック単位で複数の送信周期にわたって送信し、スレーブ局側では、分割して送信された複数の分割ブロックを復元するようにしたから、送信すべき非定期送信データが、一つの送信周期期間内で送信しきれないデータ長である場合でも、定期送信データの送信に影響を及ぼすことなく送信することができる。
【0107】
また、請求項4に係る通信システムによれば、空き時間予測手段によって送信周期期間内の空き時間を予測し、予測された空き時間に応じて非定周期送信データを分割するようにしたから、空き時間をより有効に活用することができる。
また、請求項5に係る通信システムによれば、非定周期送信データを予め設定された容量の複数の記憶領域に分割して格納し、一つの送信周期期間内に一つの記憶領域に格納されたデータを送信するようにしたから、前記記憶領域の容量を空き時間に応じて設定することによって、非定周期送信データを、一つの送信周期期間内で送信可能なデータ長に容易に分割することができる。
【0108】
また、請求項6に係る通信システムによれば、非定周期送信データを予め設定された容量の複数の記憶領域に分割して格納し、空き時間予測手段で予測された空き時間内にデータ送信可能な記憶領域の個数を推定し、一の送信周期期間内に、推定した個数分の記憶領域に格納されたデータを送信するようにしたから、非定周期送信データを、空き時間内で送信可能なデータ長に容易に分割することができる。
【図面の簡単な説明】
【図1】本発明を適用した通信システムの一例を示すシステム構成図である。
【図2】第1の実施の形態の動作説明に供するタイミングチャートである。
【図3】第1の実施の形態の動作説明に供するタイミングチャートである。
【図4】マスタ局及びスレーブ局との間で授受される伝送フレームのフォーマットの一例である。
【図5】第1の実施の形態におけるスレーブ局の構成を示すブロック図の一例である。
【図6】第1の実施の形態におけるマスタ局の受信部の構成を示すブロック図の一例である。
【図7】第1の実施の形態におけるマスタ局の送信部の構成を示すブロック図の一例である。
【図8】第1の実施の形態におけるマスタ局の演算処理部のメッセージデータの書き込み処理の一例を示すフローチャートである。
【図9】第1の実施の形態におけるマスタ局のタイミング発生回路におけるデータ送信時の処理の一例を示すフローチャートである。
【図10】第2の実施の形態におけるマスタ局の送信部の構成を示すブロック図の一例である。
【図11】第2の実施の形態におけるマスタ局のタイミング発生回路におけるデータ送信時の処理の一例を示すフローチャートである。
【図12】第2の実施の形態の動作説明に供するタイミングチャートである。
【図13】従来の伝送フレームの伝送手順を説明するためのタイミングチャートである。
【符号の説明】
11、41 演算処理部
13、43 受信部
15、45 送信部
26、56 アドレス検出部
28、33、69 切り替え回路
31、32 送信レジスタ
39、75 送信回路
61 タクト同期用送信レジスタ
62〜65 同期データ伝送用送信レジスタ
66〜68 メッセージデータ伝送用送信レジスタ
35、70 コマンド付加部
77 タイミング発生回路
80 伝送時間演算部
M マスタ局
S1〜S4 スレーブ局[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention connects a plurality of slave stations including a servo amplifier control device or a spindle amplifier control device that performs servo motor control and spindle motor control, and a master station including a numerical control device by a serial transmission line. And a communication system for performing data transmission between the two.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in a communication system including a plurality of slave stations and a master station controlling the slave stations, for example, the slave station and the master station are connected by a bus line for a half-duplex serial transmission. There has been proposed a communication system for performing the above. In this communication system, the slave station that has received the message from the master station switches the bus line from reception to transmission after completion of frame reception, and performs transmission from the slave station.
[0003]
That is, as shown in FIG. 13, when the first slave station SL1 receives a frame from the master station M, the first slave station SL1 switches the bus line from reception to transmission, and transmits the frame to the master station M. Next, when the master station M transmits a frame to the second slave station SL2 and the second slave station SL2 receives the frame, the second slave station SL2 changes the bus line from reception to transmission. Switching and transmitting the frame to the master station M. When each of the slave stations SL1 to SL4 performs this operation, communication between the master station M and the slave stations SL1 to SL4 can be performed without collision between frames.
[0004]
However, when communication is performed by switching the bus line between reception and transmission as described above, a dead time Δt associated with switching between reception and transmission occurs as shown in FIG. In addition, frame reception and transmission cannot be performed simultaneously.
On the other hand, for example, a method has been proposed in which a master station and a slave station are connected by a full-duplex serial transmission line (for example, see Japanese Patent Application Laid-Open No. 11-17712).
In this case, the transmission and reception of the frame can be performed simultaneously, that is, the slave station can transmit the frame to the master station even while the master station is transmitting the frame to the slave station. And transmission time can be shortened.
[0005]
For example, in a numerical control system including a servo motor control, a servo amplifier control device for performing a spindle motor control, a plurality of slave stations including a spindle amplifier control device, and a master station including a numerical control device, By configuring such a communication system, high-speed synchronous communication is enabled, and motion control such as positioning of a servo motor axis can be appropriately performed.
[0006]
[Patent Document 1]
JP-A-11-17712
[0007]
[Problems to be solved by the invention]
However, in the numerical control system as described above, it is necessary to synchronously transmit the data for servo axis positioning control between the master station and the plurality of slave stations at a high speed. For this reason, other than the positioning control data transmission, for example, when taking out maintenance data from the slave station, or when setting up various control constants in the slave station, for example, the servo amplifier and various controls as the slave station are used. A personal computer for data exchange is directly connected to the apparatus separately, and the personal computer and the slave station are connected by, for example, RS232C communication.
[0008]
However, with the recent advancement of functions, the need to perform individual transmission to each slave, that is, message transmission while performing motion control, has been increasing. Communication using a high-speed serial bus for positioning is also used. Was desired. Therefore, the present invention has been made in view of the above-mentioned conventional unresolved problems, and a message is individually transmitted to each slave station using a communication line for synchronous transmission between each slave station and the master station. It is an object of the present invention to provide a communication system capable of performing transmission.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, a communication system according to
[0010]
The communication system according to
[0011]
In the communication system according to
[0012]
Further, in the communication system according to
[0013]
In the communication system according to a fifth aspect, in the communication system according to the third aspect, the divided transmission unit stores the non-periodic transmission data in a plurality of storage areas having a predetermined capacity. Then, data stored in one storage area is transmitted within one transmission cycle period.
In a communication system according to a sixth aspect of the present invention, in the communication system according to the fourth aspect, the divided transmission unit stores the non-periodic transmission data in a plurality of storage areas having a predetermined capacity. Then, based on the free time predicted by the free time prediction means and the capacity of the storage area, the number of the storage areas that can transmit data within the free time is estimated, and within one transmission cycle period, In addition, data stored in the estimated number of storage areas is transmitted.
[0014]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be described.
FIG. 1 is a schematic configuration diagram showing a configuration of a communication system to which the first embodiment of the present invention has been applied.
In FIG. 1, M is a master station composed of, for example, an NC controller, and S1 to S4 are slave stations composed of a servo amplifier controller, a spindle amplifier controller, and the like. The stations SL1 to SL4 are connected in a multidrop manner via full-duplex serial buses L1 and L2.
[0015]
Here, the case where four slave stations SL1 to SL4 are connected is described, but the present invention is not limited to this, and an arbitrary number of slave stations can be connected.
Then, the master station M performs data transmission with each of the slave stations SL1 to SL4 at a predetermined transmission cycle set in advance. As shown in FIG. Tact synchronization data for synchronization is transmitted by broadcast transmission to each slave station in each transmission cycle. The arithmetic processing unit (CPU) of each slave station that has received the tact synchronization data takes in the synchronization data received earlier at the time of receiving the tact synchronization data, and performs processing on the control target based on the synchronization data. It has become. In other words, since the timings at which the slave stations SL1 to SL4 receive the synchronization data from the master station are different, the arithmetic processing units of the slave stations SL1 to SL4 perform processing on the synchronization data with respect to the point in time when the tact synchronization data is received. By performing control, synchronization is achieved between the slave stations SL1 to SL4.
[0016]
Further, the master station M transmits information such as control information for each slave station to control its control target as synchronization data to each slave station in each transmission cycle. Each slave station that has received the synchronization data transmits the control status of the control target of the slave station or its monitor information to the master station M as synchronization data as a response.
[0017]
In other words, as shown in FIG. 2A, the master station M first transmits the tact synchronization data DB by broadcast for each transmission cycle, and then transmits the synchronization data DM1 to the slave station SL1, for example. The synchronization data DS1 is received as a response from the slave station SL1 that has received the synchronization data DM1, the synchronization data DM2 is transmitted to the slave station SL2, and the synchronization data DS2 is transmitted as a response to the synchronization data DM2. Then, the synchronization data DM3 is transmitted to the slave station SL3, and so on, the synchronization data is sequentially transmitted to each slave station, and this response is received.
[0018]
Then, by performing this process for each transmission cycle, control information and the like are transmitted to each slave station for each transmission cycle, as shown in FIG. Control status information and the like of each control target are received.
In this communication system, as shown in FIG. 3, tact synchronization data and synchronization data are further transmitted to each slave station within one transmission cycle period from the start of the transmission cycle to the start of the next transmission cycle. In the idle time after the transmission, the information individually required by each slave station that does not need to be synchronized between the slave stations or the information individually required by the master station as information of each slave station is transmitted to the message data M- DM and M-DS are transmitted and received between the master station M and the slave stations SL1 to SL4. In FIG. 3, M-DM represents message data transmitted from the master station M to any slave station, and M-DS represents message data from the slave station that has received the message data M-DM from the master station M. This represents message data transmitted to the master station M.
[0019]
FIG. 4 shows an example of the format of a transmission frame transmitted between the master station M and the slave stations SL1 to SL4. The transmission frame from the master station M to the slave stations SL1 to SL4 is shown in FIG. As shown in FIG. 4A, flag data m1 indicating the start of a frame, destination address m2 indicating a destination of a frame, control command m3 indicating a data type, transmission data m4, check data m5 for a frame inspection sequence , And flag data m6 indicating the end of the frame. The data type of the control command m3 includes tact synchronization data transmitted to each slave station for synchronization between slave stations, synchronization data synchronously transmitted to each slave station, and individual data. There is message data transmitted to the slave station.
[0020]
As shown in FIG. 4B, a transmission frame from the slave station to the master station has the same transmission as the flag data s1 indicating the start of the frame, the transmission source address s2 indicating the transmission source of the frame, and the control command m3. It is composed of a control command s3 representing the data type of the frame, transmission data s4, check data s5 for the frame inspection sequence, and flag data s6 representing the end of the frame. In the transmission frame, information may not be set for the transmission data m4 and s4.
[0021]
FIG. 5 is a block diagram showing a configuration of the slave station. Since each slave station has the same configuration, the slave station SL1 will be described here.
As shown in FIG. 5, the slave station SL1 receives a transmission frame from one bus line L1 of the full-duplex serial bus, and transmits data information in the transmission frame to the arithmetic processing unit (CPU) 11. The transmission unit 15 includes a
[0022]
The arithmetic processing unit (CPU) 11 controls various devices based on control information such as a position command or a speed command of various devices (not shown) controlled by the own station, which is notified from the master station M. At the same time, monitor information such as position information and speed information of these various devices is collected at a preset cycle to generate transmission data, which is output to the transmission unit 15.
[0023]
As shown in FIG. 5, the receiving
[0024]
The control
[0025]
Then, the
[0026]
On the other hand, the transmission unit 15 includes a
[0027]
The switching
[0028]
Further, when the
[0029]
That is, if the control command of the transmission frame received by the
[0030]
FIG. 6 is a block diagram illustrating a configuration of the receiving unit 43 of the master station M.
Note that, similarly to the slave station, the master station M also generates a transmission frame based on the transmission data set by the reception unit 43 that receives the transmission frame from the slave station and the
[0031]
As shown in FIG. 6, the reception unit 43 includes a first
[0032]
The control
Then, the
[0033]
On the other hand, as shown in FIG. 7, the transmission unit 45 includes, by the
[0034]
When the start command is notified from the timing generation circuit 77, the
[0035]
In addition, the timing generation circuit 77 notifies the end of transmission data writing from the
[0036]
The
[0037]
The
[0038]
The
[0039]
When receiving message data from any of the slave stations, after transmitting message data including a message data transmission request to the slave station, the message data as a response to the transmitted message data is transmitted to the slave station. Transmits dummy message data serving as a trigger for transmitting message data to the slave station. Here, as transmission data of the dummy message data, meaningless data or empty data is transmitted. When receiving data that cannot be stored in the
[0040]
The capacity of the transmission registers 66 to 68 is determined in such a manner that, when a transmission frame including the message data stored in the transmission registers 66 to 68 is generated in units of transmission registers, the message transmission data stored in one transmission register is generated. Is transmitted during an idle time within one transmission cycle period, the capacity is set to a value that allows transmission and reception of transmission frames within one transmission cycle period.
[0041]
When the data has been written to the transmission registers 61 to 68 in this manner, the
[0042]
Next, the operation of the first embodiment will be described.
The master station M transmits a transmission frame including synchronization data such as control information such as a position command or a speed command to each of the slave stations SL1 to SL4 at a preset cycle. When the synchronization data is received, the transmission frame including the synchronization data such as the monitor information such as the position information or the speed information of various devices controlled by the own station is generated based on the control information from the master station M by using this as a trigger. Send to Then, the master station M recognizes the control status of each of the slave stations SL1 to SL4 based on the received monitor information, performs a control calculation based on this, and generates the control information.
[0043]
The transmission data of the transmission frame from the master station and the transmission data of the transmission frame from the slave station do not necessarily need to be updated or set every period. For example, the transmission data m4 and s4 may not be set. . That is, for example, when the master station M needs to collect monitor information of various control devices in a shorter cycle than the control calculation cycle of various devices, the transmission data is set from the master station M. Instead, the transmission frame may be transmitted formally.
[0044]
Then, the master station M generates tact synchronization data and synchronization data destined for each slave station in accordance with a predetermined transmission cycle, and generates message data destined for the slave station as necessary. The data writing process shown in the drawing is executed at a predetermined cycle, and the tact synchronization data and the synchronization data addressed to each slave station are written into the tact
[0045]
Specifically, first, in step S1, the tact synchronization data and the synchronization data addressed to the slave station are written in the tact
[0046]
In step S5, it is determined whether there is message data to be transmitted. If there is no message data to be transmitted, the process directly proceeds to step S7 described below. On the other hand, when there is message data to be transmitted, the process proceeds to step S6, and the message data to be transmitted is written into the
[0047]
In this step S7, the completion of the writing of the transmission data to each transmission register is notified to the timing generation circuit 77, and when the message data is newly written, it is determined that there is message data, and the presence / absence of the message data is determined. The message is notified to the generation circuit 77, and if there is message data, the transmission destination of the message data and the number of divisions indicating the number of transmission registers into which the message data is divided and stored are notified. Then, the data writing process ends.
[0048]
The number of divisions of the message data is detected based on, for example, the data length of the message data to be transmitted and the capacities of the transmission registers 66 to 68.
In addition, at the time of start-up or the like, the timing generation circuit 77 is notified of the number of slave stations that exchange transmission frames with the master station M as the maximum number of slave stations.
[0049]
On the other hand, the timing generation circuit 77 recognizes the maximum number of slave stations based on the maximum number of slave stations notified from the
[0050]
When the timing generation circuit 77 receives the transmission data write completion notification from the
[0051]
In this step S14, a transmission process of the tact synchronization data is executed. Specifically, the switching
As a result, the tact synchronization data of the
[0052]
Further, a frame inspection sequence operation is performed by the
Then, the timing generation circuit 77 outputs a start-up command to the
[0053]
Then, when the transmission of the tact synchronization data is completed, the timing generation circuit 77 proceeds to step S16 to perform a transmission process of the synchronization data. That is, first, the switching
[0054]
Then, the timing generation circuit 77 switches the switching
[0055]
This process is repeated, and the switching
Then, when the transmission frames are transmitted to the number of slave stations designated as the maximum number of slaves, the transmission processing of the synchronization data ends, and the process proceeds to step S24.
[0056]
In this step S24, it is determined whether or not the message flag is Fm = 1, that is, whether or not there is message data to be transmitted. At this time, when Fm = 0, it is determined that there is no message data to be transmitted, it is determined that data transmission in one transmission cycle has been completed, and the process is terminated.
On the other hand, if the message flag is Fm = 1 and it is determined that there is message data to be transmitted, the process proceeds to step S26, and the message counter Cm is incremented by "1". Then, the switching
[0057]
The message counter Cm is a counter for determining which of the transmission registers 66 to 68 is to be selected. When the message counter Cm is “1”, the
[0058]
As a result, the
[0059]
Then, the timing generation circuit 77 notifies the
Then, the timing generation circuit 77 determines whether or not the message counter Cm matches the number of divisions of the message data notified from the arithmetic processing unit 41 (step S30). If "3" is notified, the process does not match and the process ends.
[0060]
With the above processing, the processing of the transmission unit 45 of the master station M in the first transmission cycle ends.
Accordingly, in the first transmission cycle, as shown in FIG. 3, first, the tact synchronization data DB is transmitted by broadcast transmission to each of the slave stations SL1 to SL4, and then the synchronization data DM1 to DM4 is transmitted. After being sequentially transmitted to the slave station SL1, the slave station SL2, the slave station SL3, and the slave station SL4, message data M-DM destined for the slave station SL1 is further transmitted. At this time, as the message data to be transmitted, the first block of the message data to be transmitted divided into three is transmitted.
[0061]
Then, in the next second transmission cycle, the
[0062]
When the timing generation circuit 77 is notified that the writing of the tact synchronization data and the synchronization data has been completed in the same manner as described above, the timing generation circuit 77 receives the notification and proceeds from step S11 to step S12 as shown in FIG. At this time, since the message data write notification is not performed, the process proceeds to step S14 to control the switching
[0063]
At this time, since the message flag is set to Fm = 1, the process proceeds from step S24 to step S26, and after the message counter Cm is incremented by “1”, the transmission corresponding to the counter value “2” is performed. A register, in this case, the
[0064]
As a result, in the same manner as described above, the message data is added to the address and control command of the specified slave station SL1 to the message data of the
If the message data is divided into three parts, the value of the message counter Cm does not match the message data, and thus the process is terminated.
[0065]
With the above processing, the second transmission cycle is completed. Also in this case, as shown in FIG. 3, during the second transmission cycle, data for tact synchronization, synchronous transmission data addressed to each slave station, and message data addressed to the slave station SL1 are transmitted. The message data transmitted in the transmission cycle of is the data of the second block obtained by dividing the message data to be transmitted into three.
[0066]
Then, in the third transmission cycle, the
Then, similarly to the second transmission cycle, the timing generation circuit 77 transmits tact synchronization data and synchronization data, and then proceeds from step S24 to step S26, increments the message counter Cm by "1", and Since the counter Cm becomes "3", the switching
[0067]
With the above processing, the third transmission cycle is completed. Also in this case, as shown in FIG. 3, during the third transmission cycle, data for tact synchronization, synchronous transmission data addressed to each slave station, and message data addressed to the slave station SL1 are transmitted. The message data transmitted in the transmission cycle of is the data of the third block obtained by dividing the message data to be transmitted into three.
[0068]
Therefore, the message data to be transmitted is transmitted to the slave station SL1 in the first to third transmission periods.
Then, when the message data is transmitted, when the transmission of the third block obtained by dividing the message data into three is completed, a notification of the end of the message data is sent from the timing generation circuit 77 to the
[0069]
On the other hand, in the slave stations SL1 to SL4, when the receiving
[0070]
Further, the
[0071]
Then, the
[0072]
In this case, since the message data is divided into three and transmitted as described above, it is recognized that the message data is divided into three and transmitted based on the division number information added to the first message data. When three transmission periods have elapsed and all three divided message data have been received, the message data for the three transmission periods is combined to restore the divided message data to one message data (restoring means) ). As a result, the slave station can recognize the entire message data transmitted by the master station. Then, predetermined processing is performed based on the message data.
[0073]
In each of the slave stations SL1 to SL4, the
When the transmission frame including the synchronization data is received, the switching
[0074]
Then, the
Thereby, as a response to the synchronization data from the master station M, each of the slave stations SL1 to SL4 transmits a transmission frame including the synchronization data.
[0075]
Here, when the slave station receives the synchronization data from the master station M, the slave station transmits the synchronization data already stored in the
On the other hand, in the slave station SL1 that has received the message data together with the synchronization data, the control
[0076]
Subsequently, even when the second block of the message data is received, the slave station SL1 stores dummy transmission data since there is no message data to be transmitted, and the dummy transmission data is transmitted. Then, also when the third block is received, dummy transmission data is transmitted.
That is, as shown in FIG. 3, when the master station M transmits message data M-DM divided into three to the slave station SL1 over three periods, the slave station SL1 responds to the dummy message data M-DM as a response. -DS will be transmitted.
[0077]
When the receiving section 43 of the master station M receives the transmission frame from each of the slave stations SL1 to SL4 from the bus L2 as shown in FIG. If the flag data s1 is detected in step (2), the source address s2 to the flag data s6 are stored in the
[0078]
On the other hand, if the result of the frame check sequence calculation matches the check data s5, it is recognized that the transmission has been normally performed, and the
[0079]
Then, the
[0080]
The above is the operation of the master station M and the slave stations SL1 to SL4 when transmitting the message data divided into three from the master station M to the slave station SL1.
From this state, for example, when the master station M loads the trace data of the slave station SL1, the master station M generates message data for making a transmission request for uploading the trace data and the like. , In the same manner as described above. Then, in the next transmission cycle, the slave station SL1 transmits dummy message data serving as a trigger for transmitting the message data including the upload information. Then, for example, dummy message data is transmitted every transmission cycle until the transmission end of the upload information is notified from the slave station SL1.
[0081]
On the other hand, when the slave station SL1 receives the message data of the upload information transmission request, the writing of the designated message data to be transmitted to the
[0082]
At this time, if the trace data cannot be transmitted at one time, it is divided into a plurality of times and written into the
[0083]
Thereby, the master station M recognizes that all the message data has been received from the slave station SL1, and ends the transmission of the dummy message data.
With the above processing, the transmission of the upload information from the slave station SL1 to the master station M ends.
Here, the master station M transmits synchronization data to each slave station at a predetermined transmission cycle and receives a response. Therefore, after receiving the synchronization data from each slave station, the buses L1 and L2 are idle until the next transmission cycle starts. The exchange of message data between the master station and the slave station is performed using a period in which the buses L1 and L2 are idle. For this reason, the message data can be transmitted without affecting the high-speed communication of the synchronous data originally transmitted and received.
[0084]
Therefore, since the message data can be transmitted using the buses L1 and L2 using the idle time as described above, the motion control in each slave station is executed while the control constant for each slave station is being controlled. , The information held in each slave station can be downloaded, and the efficiency can be improved, and the buses L1 and L2 can be used effectively.
[0085]
At this time, since high-speed communication can be performed via the buses L1 and L2, the communication time required for sending and receiving message data can be reduced.
At this time, when relatively long transmission data is transmitted as message data, the message data is divided and transmitted, and when transmitting a transmission frame including the divided message data, the transmission of synchronous data is performed. Is transmitted in a size that can be transmitted within the free time in the transmission. Therefore, when transmitting message data, even when transmitting a large amount of message data, the transmission can be performed without affecting the transmission of synchronous data.
[0086]
At this time, a plurality of transmission registers for message data are provided, and even relatively long transmission data is written at once over a plurality of transmission registers. Therefore, in the
[0087]
In the first embodiment, when uploading trace data or the like from the slave station SL1, the master station M transmits message data including a transmission request to the slave station SL1, and then uploads the slave station SL1. Has been described, the dummy message data is transmitted to transmit the upload information requested to be transmitted from the slave station SL1. However, the present invention is not limited to this, and the transmission request is received from the master station M. Considering the processing time involved in the transmission data generation processing on the slave station SL1 side, for example, after transmitting message data consisting of a transmission request to the slave station SL1, a predetermined transmission cycle considering the processing time Later, dummy message data is transmitted to the slave station SL1, and a transmission request is received. Te When the writing to the transmit
[0088]
At this time, when the slave station SL1 transmits the trace data divided into a plurality of pieces, the slave station SL1 does not notify the end of the transmission of the load-up information and the first block divided on the slave station SL1 side. May be added to the message data and transmitted, and the master station may adjust the number of times of transmission of the dummy message data according to the number of divisions. At this time, according to the notified division number, the
[0089]
A transmission procedure for transmitting message data between the master station M and the slave station, that is, for example, when transmitting download information from the master station M to any of the slave stations, The transmission procedure of the information exchanged with the master station M or the transmission procedure for the master station M to receive the upload information from each slave station is not limited to the above, and can be arbitrarily set.
[0090]
In the first embodiment, the case where three
[0091]
When transmitting message data that cannot be written to the transmission registers 66 to 68, the number of transmission registers may be increased as described above. To 68 as one division unit and write the divided data. After transmitting part of the message data stored in the transmission registers 66 to 68, the subsequent message data is written to the transmission registers 66 to 68. May be transmitted in the same manner.
[0092]
Next, a second embodiment of the present invention will be described.
In the second embodiment, in the first embodiment, the case where one block of the divided message data is transmitted during one transmission cycle has been described. In the second embodiment, when there is a free time, a plurality of blocks are transmitted.
[0093]
As shown in FIG. 10, the transmission unit 45 of the master station M in the second embodiment is different from the transmission unit 45 of the master station M in the first embodiment shown in FIG. 80 has been added. The same parts as those in the first embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted.
The
[0094]
In the transmission time calculation unit 80, based on the notified maximum number of slave stations performing the synchronous transmission, the set time of the transmission cycle performing the synchronous transmission, and the number of bytes of the synchronous transmission, the message data is transmitted in one transmission cycle period. Calculate the free time that can be used to transmit the. For example, the sum of the number of bytes of tact synchronization data and the value obtained by multiplying the number of bytes of synchronization data by the maximum number of slave stations is calculated to calculate the total number of bytes of data to be transmitted. The number of bits (for example, 8 bits) / the transmission rate [bps] is multiplied to calculate the time required to complete the transmission of the data to be transmitted, and this is subtracted from the set time of the transmission cycle to obtain the free time Tfree. calculate.
[0095]
Further, the number of transmission registers capable of transmitting message data is represented by X, and a value obtained by multiplying the total bit length of data that can be stored in the transmission registers by a transmission speed [bps] is equivalent to the number X of transmission registers. The required time required to complete the transmission of the transmission data to be transmitted is defined as Tall, and the number X of the transmission registers that satisfies the required time Tall <the free time Tfree is calculated.
[0096]
The bit length of the data that can be stored in the transmission register, that is, the bit length of one block of the divided message data is a fixed length, and the transmission speed is also a fixed value.
For example, in motion control, the transmission cycle setting time is often set to 1 [ms] or more. Therefore, the transmission cycle setting time is 1 [ms], the transmission speed is 16 [Mbps], and the maximum number of slave stations is Assuming that 20 stations, 1 transmission block, that is, the bit length of each transmission register is 50 bytes, the free time Tfree that can be used for message transmission can be expressed by the following equation (1).
[0097]
Tfree = 1 [ms]
-(50 bytes + 50 bytes x 20 stations) x 8 bits / 16 [Mbps]
= 475 [μs] (1)
Therefore, this idle time becomes a time that can be used for message transmission.
[0098]
Therefore, the number of transmission blocks X that can satisfy the idle time is calculated, and this is notified to the timing generation circuit 77.
In response to this, when there is message data to be transmitted, the timing generation circuit 77 transmits message data corresponding to the number X of transmission blocks within one transmission cycle period.
[0099]
That is, as shown in FIG. 11, after transmitting the tact synchronization data and the synchronization data in the same manner as in the first embodiment, if there is message data to be transmitted, the process proceeds from step S24 to step S26a. First, after switching the transmission register for the message data, this is notified to the
[0100]
Therefore, by the above processing, transmission of the message data composed of three blocks is completed within one transmission cycle period.
When transmission of all message data is completed and the message counter Cm reaches the number of divisions, the process proceeds from step S30 to step S32a, where the register counter Cm and the message flag Fm are reset to zero, and the
[0101]
On the other hand, for example, when the transmission number counter Cx matches the transmission block number X at the time of transmitting two blocks of the message data composed of three blocks, the processing shifts from step S34 to step S36, and the transmission number counter Cx is set. After resetting to zero, the process ends. Then, in the next transmission cycle, since the message flag Fm is set to "1", the process shifts to step S26a to switch to the next transmission register specified by the message counter Cm and transmit this. That is, the transmission of the third block is performed.
[0102]
Therefore, as shown in FIG. 12, after the master station transmits the synchronization data DM1 to DM4 destined for each slave station following the tact synchronization data DB, the message data is transmitted for a period that does not affect the transmission of the synchronization data. Are transmitted, and in this case, three divided blocks M-DM are transmitted within one transmission cycle period. Therefore, the same operation and effect as those of the first embodiment can be obtained, and in this case, the message data is transmitted by making the best use of the idle time of the buses L1 and L2. The transmission efficiency can be improved, and the buses L1 and L2 can be used more effectively.
[0103]
Also, the number of blocks for transmitting the message data is determined based on the data amount of the tact synchronization data and the synchronization data destined for each slave station, and the number of blocks that does not reliably affect the transmission and reception of the synchronization data is transmitted. Thus, the transmission and reception of the synchronous data is not affected by transmitting a plurality of blocks of the message data.
[0104]
In the above embodiments, the periodic transmission data corresponds to the synchronous data, the message data corresponds to the irregular transmission data, and the processing in step S16 in FIGS. 9 and 11 corresponds to the periodic transmission means. 11 correspond to the non-periodic transmission means, the control
[0105]
【The invention's effect】
As described above, according to the communication system of the present invention, when sending and receiving periodic transmission data at a predetermined transmission cycle, the transmission line for transmitting the periodic transmission data is utilized by using the idle time. Since the non-periodic transmission data is transmitted by using the data, the non-periodic transmission data can be transmitted together with the periodic transmission data without separately providing a transmission line for transmitting the non-periodic transmission data. Lines can be used effectively, and transmission efficiency can be improved.
[0106]
In particular, according to the communication system of the third aspect, when the irregular transmission data is divided by the dividing means into data lengths that can be transmitted in a free time within one transmission cycle period, and the irregular transmission data is transmitted. In the above, the transmission is performed over a plurality of transmission periods in divided block units by the divided transmission means, and the slave station side restores the plurality of divided blocks transmitted in a divided manner. Even if the data length cannot be transmitted within one transmission period, the transmission can be performed without affecting the transmission of the periodic transmission data.
[0107]
Further, according to the communication system of the fourth aspect, the free time prediction means predicts the free time in the transmission cycle period, and divides the non-fixed-cycle transmission data according to the predicted free time. Free time can be more effectively utilized.
According to the communication system of the fifth aspect, the non-periodic transmission data is divided and stored in a plurality of storage areas of a predetermined capacity, and is stored in one storage area within one transmission cycle period. The non-fixed-cycle transmission data is easily divided into data lengths that can be transmitted within one transmission cycle period by setting the capacity of the storage area according to the idle time since the data is transmitted. be able to.
[0108]
Further, according to the communication system of the sixth aspect, the non-periodic transmission data is divided and stored in a plurality of storage areas having a predetermined capacity, and the data transmission is performed within the free time predicted by the free time predicting means. Since the number of possible storage areas is estimated and the data stored in the estimated number of storage areas are transmitted within one transmission cycle period, non-fixed-cycle transmission data is transmitted within free time. It can be easily divided into possible data lengths.
[Brief description of the drawings]
FIG. 1 is a system configuration diagram showing an example of a communication system to which the present invention has been applied.
FIG. 2 is a timing chart for explaining the operation of the first embodiment;
FIG. 3 is a timing chart for explaining the operation of the first embodiment;
FIG. 4 is an example of a format of a transmission frame exchanged between a master station and a slave station.
FIG. 5 is an example of a block diagram illustrating a configuration of a slave station according to the first embodiment.
FIG. 6 is an example of a block diagram illustrating a configuration of a receiving unit of the master station according to the first embodiment.
FIG. 7 is an example of a block diagram illustrating a configuration of a transmission unit of a master station according to the first embodiment.
FIG. 8 is a flowchart illustrating an example of message data write processing of the arithmetic processing unit of the master station according to the first embodiment.
FIG. 9 is a flowchart illustrating an example of a process at the time of data transmission in the timing generation circuit of the master station according to the first embodiment.
FIG. 10 is an example of a block diagram illustrating a configuration of a transmission unit of a master station according to the second embodiment.
FIG. 11 is a flowchart illustrating an example of a process at the time of data transmission in the timing generation circuit of the master station according to the second embodiment.
FIG. 12 is a timing chart for explaining the operation of the second embodiment;
FIG. 13 is a timing chart for explaining a conventional transmission frame transmission procedure.
[Explanation of symbols]
11, 41 arithmetic processing unit
13, 43 Receiver
15, 45 transmitter
26, 56 address detector
28, 33, 69 switching circuit
31, 32 transmission register
39, 75 transmission circuit
61 Tact synchronization transmission register
62-65 Synchronous data transmission transmission register
66-68 Message data transmission transmission register
35, 70 Command addition part
77 Timing Generator
80 Transmission time calculator
M master station
S1 to S4 slave station
Claims (6)
前記マスタ局は、前記定期送信データを、前記送信周期で前記スレーブ局宛に送信する定期送信手段と、前記送信周期で特定される送信周期期間内の前記定期送信データの授受が行われない空き時間に、前記シリアル伝送ラインを利用して定期送信する必要のない非定期送信データを前記スレーブ局に送信する非定期送信手段と、を備え、
前記スレーブ局は、前記マスタ局から受信したデータのデータ種が前記定期送信データであるか非定期送信データであるかを判別するデータ種判別手段と、前記マスタ局からデータを受信したとき、前記マスタ局宛に送信すべき前記定期送信データ及び前記非定期送信データのうち、前記データ種判別手段で特定されるデータ種と同一種のデータを、前記マスタ局宛に送信する応答データ送信手段と、を備えることを特徴とする通信システム。A master station and a slave station connected to the master station by a full-duplex serial transmission line, wherein the slave station transmits data addressed to the master station when receiving data addressed to the own station from the master station. In a communication system adapted to transmit,
The master station transmits the periodic transmission data to the slave station at the transmission cycle, and a vacant space where the transmission and reception of the periodic transmission data is not performed within a transmission cycle period specified by the transmission cycle. Non-periodic transmission means for transmitting to the slave station non-periodic transmission data that does not need to be transmitted at regular intervals using the serial transmission line,
The slave station is a data type determining unit that determines whether the data type of the data received from the master station is the periodic transmission data or the non-periodic transmission data, and when receiving data from the master station, Response data transmitting means for transmitting, to the master station, data of the same type as the data type specified by the data type determining means, of the periodic transmission data and the irregular transmission data to be transmitted to the master station; A communication system comprising:
前記スレーブ局は、複数の送信周期にわたって送信された複数の前記分割ブロックから元の非定期送信データを復元する復元手段、を備えることを特徴とする請求項2記載の通信システム。The non-periodic transmission unit of the master station includes a dividing unit that divides the non-periodic transmission data to be transmitted into a data length that can be transmitted within the idle time, and a divided block of the non-periodic transmission data divided by the division unit. A divided transmission unit that transmits the divided block unit over a plurality of transmission periods,
3. The communication system according to claim 2, wherein the slave station includes a restoration unit that restores original irregular transmission data from the plurality of divided blocks transmitted over a plurality of transmission periods.
前記分割送信手段は、前記空き時間予測手段で予測された空き時間に応じて前記非定周期送信データを分割するようになっていることを特徴とする請求項3記載の通信システム。The non-periodic transmission means of the master station includes a free time prediction means for predicting the free time,
4. The communication system according to claim 3, wherein the divided transmission unit divides the non-fixed-period transmission data according to the free time predicted by the free time prediction unit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003028702A JP2004242031A (en) | 2003-02-05 | 2003-02-05 | Communications system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003028702A JP2004242031A (en) | 2003-02-05 | 2003-02-05 | Communications system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2004242031A true JP2004242031A (en) | 2004-08-26 |
Family
ID=32956093
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003028702A Pending JP2004242031A (en) | 2003-02-05 | 2003-02-05 | Communications system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2004242031A (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006295710A (en) * | 2005-04-13 | 2006-10-26 | Patoraito:Kk | Information communication system and master unit |
| WO2009063565A1 (en) * | 2007-11-16 | 2009-05-22 | Fujitsu Limited | Control system, control method, master device, and controller |
| CN113051204A (en) * | 2019-12-27 | 2021-06-29 | 中车大连电力牵引研发中心有限公司 | Serial backplane bus communication method and system |
| EP3869744A1 (en) | 2020-02-19 | 2021-08-25 | Kabushiki Kaisha Yaskawa Denki | Production system, communication method, and program |
| EP3869745A1 (en) | 2020-02-19 | 2021-08-25 | Kabushiki Kaisha Yaskawa Denki | Production system, communication method, and program |
| JP7479173B2 (en) | 2020-03-24 | 2024-05-08 | ミネベアミツミ株式会社 | COMMUNICATION SYSTEM, ACTUATOR USED AS SLAVE DEVICE OF COMMUNICATION SYSTEM, AND COMMUNICATION METHOD |
-
2003
- 2003-02-05 JP JP2003028702A patent/JP2004242031A/en active Pending
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006295710A (en) * | 2005-04-13 | 2006-10-26 | Patoraito:Kk | Information communication system and master unit |
| WO2009063565A1 (en) * | 2007-11-16 | 2009-05-22 | Fujitsu Limited | Control system, control method, master device, and controller |
| US8295949B2 (en) | 2007-11-16 | 2012-10-23 | Fujitsu Limited | Control system, control method, master device, and control device |
| CN113051204A (en) * | 2019-12-27 | 2021-06-29 | 中车大连电力牵引研发中心有限公司 | Serial backplane bus communication method and system |
| EP3869744A1 (en) | 2020-02-19 | 2021-08-25 | Kabushiki Kaisha Yaskawa Denki | Production system, communication method, and program |
| EP3869745A1 (en) | 2020-02-19 | 2021-08-25 | Kabushiki Kaisha Yaskawa Denki | Production system, communication method, and program |
| US11703832B2 (en) | 2020-02-19 | 2023-07-18 | Kabushiki Kaisha Yaskawa Denki | Production system, communication method, and information storage medium |
| JP7479173B2 (en) | 2020-03-24 | 2024-05-08 | ミネベアミツミ株式会社 | COMMUNICATION SYSTEM, ACTUATOR USED AS SLAVE DEVICE OF COMMUNICATION SYSTEM, AND COMMUNICATION METHOD |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113508560B (en) | Control system, device and control method | |
| US11467566B2 (en) | Communication device, communication terminal, communication device and method for operating a communication system for transmitting time-critical data | |
| US8792518B2 (en) | Automation system | |
| JP4691601B2 (en) | Method, communication network, and control apparatus for cyclic transmission of data | |
| KR20070039120A (en) | Method and apparatus for accessing data in message memory of communication components | |
| CN103914007A (en) | Method and system for reprogramming | |
| JP2004242031A (en) | Communications system | |
| JP5372699B2 (en) | In-vehicle network device | |
| CN114868371A (en) | Data collection management device and data collection system | |
| CN1559126B (en) | Method for operating isochronous periodic communication system | |
| JP2004280304A (en) | Fieldbus system and communication method, and master and slave | |
| EP3869745B1 (en) | Production system, communication method, and program | |
| CN102195805B (en) | Communication apparatus and communication method | |
| US20040198325A1 (en) | Subscriber device for a high-performance communication system | |
| JP2005229322A (en) | Master-slave synchronous communication system | |
| JP4075554B2 (en) | Communications system | |
| CN110663230B (en) | Local bus master and method for operating a local bus | |
| CN107548018B (en) | Method and equipment for processing abnormity of wireless access point of wireless sensor network Internet of things | |
| JP7453061B2 (en) | Communication control system and communication control method | |
| JP4814882B2 (en) | Communication system and communication apparatus | |
| EP4092994B1 (en) | Base wireless device and wireless communication method | |
| JPH10233792A (en) | Polling system/method | |
| JP2009141473A (en) | Monitoring device and monitoring method in cyclic communication | |
| JP2019114935A (en) | Contour monitoring system and monitoring terminal | |
| JPH09319411A (en) | Communication method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051114 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20071120 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071127 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080128 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20080729 |