JP4032646B2 - Network time adjustment method and control system - Google Patents
Network time adjustment method and control system Download PDFInfo
- Publication number
- JP4032646B2 JP4032646B2 JP2000394943A JP2000394943A JP4032646B2 JP 4032646 B2 JP4032646 B2 JP 4032646B2 JP 2000394943 A JP2000394943 A JP 2000394943A JP 2000394943 A JP2000394943 A JP 2000394943A JP 4032646 B2 JP4032646 B2 JP 4032646B2
- Authority
- JP
- Japan
- Prior art keywords
- remote
- station
- master station
- clock information
- controller
- 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
Links
Images
Landscapes
- Electric Clocks (AREA)
- Computer And Data Communications (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、時刻同期方法に係わり、特にコンピュータ、プログラマブルコントローラ間通信などに使用するリモートI/Oシステムで、各局の時刻を同期させるためのリモートI/Oネットワーク(マスタ−リモートネットワーク)の時刻合わせ方法に関する。
【0002】
【従来の技術】
システムの形態には様々あり、ネットワークを使わずコントローラ1台ですべての制御を行うスタンドアロン方式、ネットワークで接続されてコントローラを複数分散配置し、各コントローラは自律的に制御しながらも全体としては協調し、1つの制御システムを構成するマスタ−ローカル方式、コントローラは1台のみで、その手足となる入出力機器をネットワーク接続し、分散配置を可能にしたマスタ−リモート方式の3方式に分類される。
【0003】
従来より、プログラマブルコントローラ(以下、PCと称す)を用いて制御を行う標準的な制御システムとしては、図8に示される如くマスタ−リモート方式が活用されている。
図8は、マスタ−リモート方式であるリモートI/Oネットワークを採用したPCの制御システムの構成を示したシステム構成図である。
リモートI/Oネットワークは、リモートマスタ局と複数のリモートI/O局からなり、便宜上、リモートマスタ局側のユニット構成をマスタシステム、リモートI/O局側のユニット構成をサブシステムと称して説明する。
図において、101はマスタシステム、102はサブシステム、103は各システムを接続するための伝送ケーブル、104は伝送ケーブル103が同軸バスシステムの場合必須となる終端抵抗である。
【0004】
マスタシステム101は、リモートI/Oネットワークで構成されたシステムを制御するコントローラ111、マスタシステムに電力を供給する電源ユニット112、接続される外部とのデジタル情報(ON/OFF)やアナログ情報(電流/電圧/温度/圧力等)の入出力を行う非インテリジェントユニット113、外部機器とのシリアル通信サービス、ネットワーク機能サービス、位置決め処理、BASIC演算等を行うインテリジェントユニット114、リモートI/Oネットワークを制御するリモートマスタ局115から構成されている。
サブシステム102も同様に電源ユニット122、非インテリジェントユニット123、リモートI/O局125から構成されている。
【0005】
次に、リモートI/Oネットワークを採用した制御システムの概略動作について説明する。
マスタ−リモート方式の場合、各種機器が分散配置されているとはいえコントローラは1台である。
そのため各リモートI/O局125のシステムとリモートマスタ局115のシステムは、分散しつつ協調した制御が必要である。
よって、システムはマスタシステム+Σサブシステムで成り立つという意味を込めてマスタシステムとサブシステムという用語を便宜的に定義している。
本標準的制御システムでは、1つのマスタシステムと3つのサブシステムで1つの制御システムを構成しているものとし、3つのサブシステムはリモートI/O局に局番(ここでは1,2,3)を与えることで一意に識別され、マスタシステムはひとつしかないので局番0を与える。
【0006】
リモートマスタ局115は、リモートI/Oネットワークの通信制御を行い、マスタシステムで発生した制御情報を各サブシステムに送信したり、リモートI/O局125から送信されてくるサブシステムで発生した制御情報を受信する。さらに、最も重要な役割としてリモートマスタ局自身と各リモートI/O局の送信タイミングの制御を行う。
一方、リモートI/O局125は、自局のサブシステムを統括し、サブシステム内で発生した制御情報をマスタシステムに送信したり、リモートマスタ局から送信されてくるマスタシステムにて発生した制御情報を受信する。
【0007】
図9は、リモートマスタ局115とリモートI/O局125が送受信する際に使用する伝送フレームを示している。
マスタシステムとサブシステムは1本の伝送ケーブル103でネットワーク接続されているため、共通の伝送フレームのフォーマットが必要であり、該伝送フレームには、伝送の対象となる対象局番、送信元を示す送信元局番、伝送の内容を示すコマンド、伝送するデータを格納するフィールドがある。
【0008】
図10は、リモートマスタ局115とリモートI/O局125間の制御情報交換タイミングを示したものである。
マスタシステムとサブシステムは1本の伝送ケーブルでネットワーク接続されているため、各局が勝手気ままに送信すると、送信データが衝突してしまい、伝送が正しく行われない。
そのためリモートマスタ局115が送信の順番を制御する。
図10では、まずリモートマスタ局115が送信し、次にリモートI/O局125が局番順で送信するイメージを示している。
各局が1回づつ送信し終わると通信の1サイクル(1リンクスキャンと定義する)が終了し、1リンクスキャンに要する時間を1リンクスキャンタイムと定義する。
【0009】
【発明が解決しようとする課題】
リモ−トI/O局125のサブシステムは、その役割上、あくまでシステムの手足であることから、元々リモ−トI/O局側には非インテリジェントユニットのみが装着されていた。
しかし、近年では分散制御の設計思想が流行し、マスタシステム側にはコントローラとリモートマスタ局のみ配置し、サブシステム側にインテリジェントユニットと非インテリジェントユニットを装着するシステム形態が主流となりつつあり、システム形態の変更に伴い、位置決めユニット、BASIC演算ユニット、シリアル通信サービスユニット等のインテリユニットを、リモートI/O局に接続する機会が増大してきた。
ここで、位置決めユニット(位置決め開始時刻やエラー発生時の時刻を記録する)、BASIC演算ユニット(BASICプログラムファイルに時刻(タイムスタンプ)を付与する)、シリアル通信サービスユニット(システムに重大な異常が発生した場合に、シリアル通信回線を経由し、システム管理者にシステム異常の発生内容と発生時刻を通知する)等インテリユニットの全ての機能を発揮するためには、時計情報が必要となるが、上述したように、リモートI/O局側には、その性格上、時計回路を有しておらず、また、リモートI/Oネットワークにもリモ−トI/O局側に時計情報を伝送する手段が無かった。
なお、元々リモ−トI/O局側には非インテリジェントユニット123のみが装着されていたため、時計情報をリモートI/O局側に送信する必要も無かった。
すなわち、これまでのリモートI/Oネットワークでは、時計情報がリモートI/O局側にもたらされていなかったため、時計情報を用いた時計情報サービス機能をリモートI/Oシステムでは実現することができなかった。
【0010】
本発明は、時計情報サービス機能をリモートI/Oシステムでも実現可能にすることを目的とする。
また、時計情報サービス機能をローカル局に送信し、制御システム内の時計情報を一意に設定することを目的とする。
【0011】
【課題を解決するための手段】
本発明は、上記の目的を達成するために、リフレッシュ方式を採用したコントローラにシステムバスを介して接続されたリモートマスタ局と、このリモートマスタ局にネットワークを介して接続され該リモートマスタ局により制御されるリモートI/O局とを備えた制御システムにおけるネットワークの時刻合わせ方法であって、上記リモートマスタ局が、上記コントローラより受け取った時計情報を、該コントローラのENDタイミングに同期して上記リモートI/O局に対して送信する工程と、上記リモートI/O局が、上記時計情報を受信した際に、リンクスキャンタイム分の伝送遅れを補正し、リモートI/O局とシステムバスを介して接続されているユニットに対して補正された時計情報を提供する工程と、を含むものである。
【0015】
また、マスタ局とローカル局とがネットワークを介して接続された制御システムにおいて、マスタ局は、接続されるシステムバスを介してコントローラより受け取った時計情報を、ローカル局に対して送信する工程と、ローカル局は、時計情報を受信した際に、マスタ局より受信した時計情報に対してリンクスキャンタイム分の伝送遅れを補正し、ローカル局自身の時計情報を修正する工程と、を備えたものである。
【0017】
【発明の実施の形態】
実施の形態1.
以下に本発明の実施例を図1〜図7を参照しながら説明する。
図1は、本発明の実施例のリモートI/Oネットワークを採用したPCの制御システム構成例であり、分散制御の設計思想に基づき、マスタシステムを形成するリモートマスタ局側にはコントローラのみ配置し、複数のサブシステムを形成するリモートI/O局側には非インテリジェントユニットとインテリジェントユニットとを装着するシステム形態を構成している。
図において、1はマスタシステム、2はサブシステム、3は各システムを接続するための伝送ケーブル、4は伝送ケーブル3が同軸バスシステムの場合必須となる終端抵抗である。
【0018】
マスタシステム1は、リモートI/Oネットワークで構成されたシステムを制御するコントローラ11、マスタシステムに電力を供給する電源ユニット12、リモートI/Oネットワークを制御するリモートマスタ局15から構成されている。
サブシステム2は、サブシステムに電力を供給する電源ユニット22、非インテリジェントユニット23、外部機器とのシリアル通信サービス、ネットワーク機能サービス、位置決め処理、BASIC演算等を行うインテリジェントユニット24、リモートI/O局25から構成されている。
【0019】
図2は、本発明におけるリモートマスタ局と各リモートI/O局が送受信時に使用する伝送フレームを示している。
なお、伝送フレーム本体は従来例と変更はないが、フレームのコマンドフィールドに“1:時計情報”を定義し、データフィールドに該時計情報に対応する時計情報を追加している。
ここで、時計情報は西暦,月,日,時,分,秒,1/10秒,1/100秒,1/1000秒,曜日までの情報を格納可能としている。
【0020】
図3は、本発明におけるリモートマスタ局とリモートI/O局間の制御情報を交換タイミングを示したものである。
図において、従来例で示した図10と異なる点は、リンクスキャンの終了にてリモートマスタ局が時計情報を全局に送信し、同時に各リモートI/O局がその時計情報を受け取るようにした点である。
【0021】
通常、コントローラ11は外部との入出力動作(以下、入出力リフレッシュと称する)に関して、コントローラ11自身の制御周期(制御プログラムの演算周期)に対し、制御周期の終了タイミング(以下、ENDタイミングと称する)で外部との入出力リフレッシュを一括して行う方式であるリフレッシュ方式と、ユーザのプログラムで記述されたタイミングで入出力リフレッシュを行う方式であるダイレクト方式の2つの方式を実装している。
リフレッシュ方式は、ENDタイミングで出力→入力を行い、次の制御周期を開始する。そのため、入出力リフレッシュを一括して行うので、制御周期が短くなり、システムのスループットが向上できる。ただし、入出力リフレッシュのタイミングとユーザのプログラムで記述された外部機器の情報を操作するタイミングとの間に時間的ずれ(ENDタイミングで一括して入出力リフレッシュするため)がある。
一方、ダイレクト方式は、リフレッシュ方式と異なり、入出力リフレッシュのタイミングとユーザのプログラムで記述された外部機器の情報を操作するタイミングとの間に時間的ずれはないが、制御周期の最中に頻繁に外部機器の情報を参照することになるため、システムのスループットが低下する可能性がある。
【0022】
本発明の実施の形態においてリンクスキャンの終了にてリモートマスタ局が時計情報全局に送信し、同時に各リモートI/O局がその時計情報を受け取るようにした理由は、上記コントローラの入出力リフレッシュタイミングと関係がある。
すなわち、近年制御システムに求められる要素の一つに「高いスループット」があげられ、その実現のためにコントローラの制御周期の短縮化が要求され、必然的に上記のリフレッシュ方式を採用するようになりつつある。
そして、リフレッシュ方式の採用により、外部とのデータ交換はENDタイミングで行われるようになり、その結果、システムはENDタイミングに同期して稼動するようになる。
【0023】
リモートI/Oネットワークの場合、コントローラのENDタイミングに相当する事象は「リンクスキャンの終了タイミング」であり、またコントローラとリモートI/Oネットワークは同期して稼動することが望ましい。
コントローラは「プログラムの演算完了→リモートI/Oネットワークへの出力→リモートI/Oネットワークからの入力→プログラムの演算開始」という動作を繰り返すため、リモートI/OネットワークがコントローラのENDタイミングに同期することによって、システム全体がENDタイミングに同期できるようになる。
【0024】
さらに「リンクスキャンの終了タイミング」をトリガにして、次のリンクスキャンが始まるのであるから、「リンクスキャンの終了タイミング」=「リンクスキャンの開始タイミング」と考えても差し支えはない。
よって、本実施の形態では、コントローラのENDタイミングに相当するこのタイミングで時計情報を配信するようにした。
【0025】
図4は、本発明におけるリモートI/Oネットワークの時刻合わせ方法を示すものである。
図におけるマスタシステム側において、10はコントローラ11とリモートマスタ局15間またはリモートマスタ局25とのデータのやり取りを行うためのシステムバス、31はシステムバス10とのデータのやりとりを行うバスI/F、32はコントローラ11が有している時計回路であり、時計情報を持っている。時計回路32は、通常はコントローラ専用のプログラミングツールがあり、ユーザがそのツールにて時計情報を時計記憶エリア32Aに格納し、計時回路32Bにて時計情報が更新されていく。
41はシステムバス10とのデータのやりとりを行うバスI/F、42はシステムバス10を介して、リモートマスタ局15に転送される時計情報を格納するための時計記憶エリア、43は送信バッファ43A、受信バッファ43Bを有し、伝送処理を行うための伝送I/Fである。
【0026】
図におけるサブシステム側において、20はリモートI/O局25とインテリジェントユニット23、非インテリジェントユニット24間とのデータのやり取りを行うためのシステムバス、51はシステムバス20とのデータのやりとりを行うバスI/F、52はリンクスキャンタイムを監視するためのリンクスキャン計測回路、53は送信バッファ53A、受信バッファ53Bを有すると共に、マスタ局から送信された伝送フレーム上のコマンドを解釈するコマンドデコード部53Cを備え、伝送処理を行うための伝送I/Fである。
61はインテリジェントユニット23において、システムバス20とのデータのやり取りを行うバスI/F、71は非インテリジェントユニット24において、システムバス20とのデータのやり取りを行うバスI/Fである。
【0027】
コントローラ11は、ユーザの作成した制御プログラムを連続実行してシステムを制御しており、そのプログラムの実行に要する時間(演算時間)すなわち制御周期を持っている。
その制御周期毎(正確にはENDタイミング)に時計記憶エリア32Aからシステムバス10を介してリモートマスタ局15の時計記憶エリア42に時計情報を書きこむ。
その際、コントローラ11のバスI/F31→システムバス10→リモートマスタ局15のバスI/F41→リモートマスタ局15の時計記憶エリア42という順番で時計情報が転送される。
ここで、リモートマスタ局15はあくまで通信I/Fが仕事のユニットであり、制御を行うユニットではないため、リモートマスタ局15はコントローラ11から時計情報を入手するだけで自身に計時回路は持っていない。
【0028】
図5は、リモートマスタ局の時計情報の送信処理を示したフローチャートである。
図3に本発明におけるリモートマスタ局15とリモートI/O局25間での制御情報の交換タイミングを示したとおり、最後のリモートI/O局が送信したタイミングを利も−tpマスタ局15が検出したら(ステップS1)、自身に内蔵されている時計記憶エリア42から時計情報を読み出し(ステップS2)、時計情報を送信(ステップS3)し、その後、リモートマスタ局15の制御情報を送信(ステップS4)する。
【0029】
図6は、リモートI/O局側の制御情報受信時のリモートI/O局側の処理を示したフローチャートである。
ステップS11で受信したデータがリモートマスタ局15からのものであるか受信した伝送フレーム(図2参照)の送信元局番を用いて確認する。
リモートマスタ局15からのものである場合は、ステップS12にて、リモートマスタ局15から初めての制御データ受信か確認し、初めての受信であった場合は、ステップS13でリンクスキャンタイム計測タイマを起動する。
このとき各リモートI/O局25にはグローバルコマンドにより一斉同報されるので、図4における各リモートI/O局25に内蔵されているリンクスキャン計測回路52を起動する。
【0030】
ステップS12で「リモートマスタ局からのはじめての制御データ受信か?」と確認する理由は、リモートマスタ局15とリモートI/O局25の起動順番を考慮したものである。
図3に示した通り、リンクスキャンの定義はリモートマスタ局のデータ送信と、次回のリモートマスタ局のデータ送信の時間間隔である。
よって各リモートI/O局は、各々にとっての最初のリモートマスタ局のデータ送信を認識する必要があり、ステップS12で「リモートマスタ局からのはじめての制御データ受信か?」を判別した上でステップS13でリンクスキャン計測回路52を起動する。
【0031】
マスタ局からの制御情報受信間隔がリンクスキャンタイムと一意であり、マスタ局から受信した時計情報はリンクスキャンタイム分の伝送遅れが発生する。
本タイマを起動することによって得られた計測値をリンクスキャンタイムとして、時計情報補正に使用する。
一方、ステップS12でリモートマスタ局からのはじめてのデータ受信ではないと判断した場合は、ステップS14にて、リンクスキャンタイム計測タイマからタイマ値を読み出し、補正用の値を獲得する。
次に、ステップS15でリンクスキャンタイム計測をタイマプリセットし、次の補正に備える。
【0032】
図7は、リモートI/O局側の時計情報受信時の処理を示したフローチャートである。
ステップS21でリモートマスタ局から時計情報受信か否かを伝送フレームにおける送信元局番とコマンド内容から判別(図2、図4参照)する。
各リモートI/O局の伝送I/F53にはコマンドデコーダ53Cを内蔵しており、それによって伝送フレームの種別が判断される。
伝送フレームが時計情報であり、リンクスキャンタイムの計測ができ、伝送フレームの時計情報にリンクスキャンタイムを加算することで時計情報の補正が完了する。
【0033】
これら動作により、上述した処理が全リモートI/O局で行われるため、システム全体の時計が一意に確定できる。
【0034】
本発明によれば、上述した処理が全リモートI/O局で行われるため、従来と同一の通信フレームを用いて、時計情報を送信するので、従来機種との互換性を確保しつつ、システム全体の時計が一意に確定できる。
リモートI/Oネットワークシステム中には時計回路は一つしか必要なく、各局で使用者が時計合わせを行う必要がなくなる。さらにリンクスキャンのタイミングでリモートマスタ局の時計情報がリモートI/O局側の時計情報に補正されたうえでプリセットされる。そのためリモートマスタ局のコントローラの時計情報を正確に合わせておけば自動的にシステムの時計が一致される。
なお、リンクスキャンのタイミングで時計情報の伝送遅れに対する補正を行っているため、伝送遅れの程度によらず、時計情報送信局と時計情報を受信局の間で伝送遅れ時間分の誤差が発生しない。
【0035】
また、上述した実施の形態では、リモートマスタ局とリモートI/O局とで構成されるリモートI/Oシステムにおいて説明したが、上記リモートマスタ局を親局として、CPUユニットを有する他の子局をローカル局とで構成するシステムにおいても、同様に、マスタ局より送られた時計情報を、ローカル局が受信し、リンクスキャンタイムの時間分の補正をかけ、システム全体で一意の時計情報を有することができる。
なお、マスタ局とローカル局との時計情報の一致に関しては、ユーザによるアプリケーションの構築をすることなく(ユーザがマスタ局とローカル局の時間調節を意識することなく)、システムとして時計情報を一致させ、さらに送られた時計情報に対する補正も行われるので、確実性と信頼性に優れた時刻合わせを行うことができ、システム内での時計が一意に確定できる。
【0036】
【発明の効果】
本発明は制御システムにおいてマスタ局に隣接したコントローラの時計情報でシステムの時刻合わせを行うにあたり、各局のリモートI/O局で時計情報の送受信、伝送遅れ時間の補正を行うものであるから、確実性と信頼性に優れた時刻合わせを行うことができ、システム内での時計が一意に確定できる。
また、マスタ局とローカル局との間でも、確実性と信頼性に優れた時刻合わせを行うことができ、システム内での時計が一意に確定できる。
【図面の簡単な説明】
【図1】 本発明のリモートI/Oネットワークを採用したPCの制御システム構成図である。
【図2】 本発明のリモートマスタ局とリモートI/O局が送受信時に使用する伝送フレームを示した図である。
【図3】 本発明のリモートマスタ局とリモートI/O局間の制御情報を交換タイミングを示した図である。
【図4】 本発明におけるリモートI/Oネットワークの時刻合わせ方法を示す図である。
【図5】 本発明のリモートマスタ局の時計情報の送信処理を示すフローチャートである。
【図6】 本発明のリモートI/O局側制御情報受信時処理を示すフローチャートである。
【図7】 本発明のリモートI/O局側時計情報受信処理を示すフローチャートである。
【図8】 従来のリモートI/Oネットワークを採用したPCの標準的な制御システム構成図である。
【図9】 従来のリモートマスタ局とリモートI/O局が送受信時に使用する伝送フレームを示した図である。
【図10】 従来のリモートマスタ局とリモートI/O局間の制御情報を交換タイミングを示した図である。
【符号の説明】
1 マスタシステム、2 サブシステム、3 伝送ケーブル、4 終端抵抗、10 システムバス、11 コントローラ、15 リモートマスタ局、20 システムバス、25 リモートI/O局、32 時計回路、42 時計記憶エリア、52 リンクスキャン計測回路。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a time synchronization method, and in particular, a remote I / O network (master-remote network) for synchronizing the time of each station in a remote I / O system used for communication between computers and programmable controllers. Regarding the method.
[0002]
[Prior art]
There are various types of systems, a stand-alone method in which all the controls are performed by a single controller without using a network, and multiple controllers are distributed and connected via a network. The master-local system that constitutes one control system has only one controller, and the input / output devices that are the limbs are connected to the network, and the system is classified into the master-remote system that enables distributed arrangement. .
[0003]
Conventionally, as a standard control system that performs control using a programmable controller (hereinafter referred to as a PC), a master-remote system is utilized as shown in FIG.
FIG. 8 is a system configuration diagram showing a configuration of a PC control system employing a remote I / O network that is a master-remote system.
The remote I / O network includes a remote master station and a plurality of remote I / O stations. For convenience, the unit configuration on the remote master station side is referred to as a master system, and the unit configuration on the remote I / O station side is referred to as a subsystem. To do.
In the figure, 101 is a master system, 102 is a subsystem, 103 is a transmission cable for connecting each system, and 104 is a termination resistor that is essential when the
[0004]
The
Similarly, the subsystem 102 includes a
[0005]
Next, a schematic operation of a control system that employs a remote I / O network will be described.
In the case of the master-remote system, there is only one controller although various devices are distributed.
For this reason, the remote I /
Therefore, the terms “master system” and “subsystem” are defined for the sake of convenience in the sense that the system is composed of a master system + Σsubsystem.
In this standard control system, one master system and three sub-systems constitute one control system, and the three sub-systems have station numbers (1, 2, 3 in this case) assigned to remote I / O stations. Is uniquely identified, and since there is only one master system,
[0006]
The
On the other hand, the remote I /
[0007]
FIG. 9 shows a transmission frame used when the
Since the master system and the subsystem are connected to each other by a
[0008]
FIG. 10 shows the control information exchange timing between the
Since the master system and the subsystem are connected to each other by a single transmission cable, if each station transmits without permission, the transmission data collides and transmission is not performed correctly.
Therefore, the
FIG. 10 shows an image in which the
When each station finishes transmitting once, one cycle of communication (defined as one link scan) ends, and the time required for one link scan is defined as one link scan time.
[0009]
[Problems to be solved by the invention]
Since the subsystem of the remote I /
However, in recent years, the design philosophy of distributed control has become popular, and a system configuration in which only a controller and a remote master station are arranged on the master system side and an intelligent unit and a non-intelligent unit are installed on the subsystem side is becoming mainstream. As a result of this change, the opportunity to connect intelligent units such as positioning units, BASIC operation units, and serial communication service units to remote I / O stations has increased.
Here, the positioning unit (records the positioning start time and the time when the error occurred), the BASIC operation unit (adds the time (time stamp) to the BASIC program file), the serial communication service unit (a serious abnormality occurs in the system) In order to perform all the functions of the intelligent unit, such as notifying the system administrator of the content and time of occurrence of the system abnormality via a serial communication line, the clock information is necessary. As described above, the remote I / O station side does not have a clock circuit due to its nature, and means for transmitting clock information to the remote I / O station side also in the remote I / O network. There was no.
Since only the
In other words, in the conventional remote I / O network, the clock information is not provided to the remote I / O station side, so that the clock information service function using the clock information can be realized in the remote I / O system. There wasn't.
[0010]
An object of the present invention is to make it possible to realize a clock information service function even in a remote I / O system.
Another object of the present invention is to transmit a clock information service function to a local station and set clock information in a control system uniquely.
[0011]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides a remote master station connected to a controller adopting a refresh method via a system bus, and connected to the remote master station via a network and controlled by the remote master station. a Contact Keru time setting method of a network control system that includes a remote I / O station which is, above the remote master station, the clock information received from the controller, in synchronization with the END timing of the controller described above and transmitting to the remote I / O station, the remote I / O station, upon receiving the clock information, to correct the transmission delay of the link scan time content, the remote I / O station and the system bus , providing a corrected clock information to the units connected via is intended to include.
[0015]
Further, in the control system in which the master station and the local station are connected via a network, the master station transmits the clock information received from the controller via the connected system bus to the local station; When the local station receives the clock information, the local station includes a step of correcting the transmission delay corresponding to the link scan time with respect to the clock information received from the master station and correcting the clock information of the local station itself. is there.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to FIGS.
FIG. 1 is an example of a control system configuration of a PC adopting a remote I / O network according to an embodiment of the present invention. Based on the design concept of distributed control, only the controller is arranged on the remote master station side forming the master system. A system configuration in which a non-intelligent unit and an intelligent unit are mounted on the remote I / O station side forming a plurality of subsystems is configured.
In the figure, 1 is a master system, 2 is a sub-system, 3 is a transmission cable for connecting each system, and 4 is a termination resistor that is essential when the
[0018]
The
The
[0019]
FIG. 2 shows a transmission frame used at the time of transmission / reception by the remote master station and each remote I / O station in the present invention.
Although the transmission frame body is not changed from the conventional example, “1: clock information” is defined in the command field of the frame, and clock information corresponding to the clock information is added to the data field.
Here, the clock information can store information up to the year, month, day, hour, minute, second, 1/10 second, 1/100 second, 1/1000 second, day of the week.
[0020]
FIG. 3 shows the exchange timing of control information between the remote master station and the remote I / O station in the present invention.
In the figure, the difference from FIG. 10 shown in the conventional example is that the remote master station transmits clock information to all stations at the end of the link scan, and each remote I / O station receives the clock information at the same time. It is.
[0021]
Usually, the
In the refresh method, output → input is performed at the END timing, and the next control cycle is started. Therefore, since the input / output refresh is performed collectively, the control cycle is shortened and the system throughput can be improved. However, there is a time lag between the timing of the input / output refresh and the timing of operating the information of the external device described in the user program (because the input / output refresh is performed collectively at the END timing).
On the other hand, the direct method is different from the refresh method in that there is no time lag between the timing of the input / output refresh and the timing of manipulating the information of the external device described in the user program, but it frequently occurs during the control cycle. Therefore, the system throughput may be reduced.
[0022]
In the embodiment of the present invention, the reason why the remote master station transmits to all clock information stations at the end of the link scan and each remote I / O station receives the clock information at the same time is the input / output refresh timing of the controller. Is related.
In other words, “high throughput” is one of the elements required for control systems in recent years, and shortening of the control cycle of the controller is required to realize this, and the above refresh method is inevitably adopted. It's getting on.
By adopting the refresh method, data exchange with the outside is performed at the END timing, and as a result, the system operates in synchronization with the END timing.
[0023]
In the case of a remote I / O network, the event corresponding to the END timing of the controller is “link scan end timing”, and it is desirable that the controller and the remote I / O network operate synchronously.
Since the controller repeats the operation of “program operation completion → output to remote I / O network → input from remote I / O network → program operation start”, the remote I / O network is synchronized with the END timing of the controller. As a result, the entire system can be synchronized with the END timing.
[0024]
Furthermore, since the next link scan starts with “link scan end timing” as a trigger, it can be considered that “link scan end timing” = “link scan start timing”.
Therefore, in this embodiment, the clock information is distributed at this timing corresponding to the END timing of the controller.
[0025]
FIG. 4 shows a time adjustment method for a remote I / O network according to the present invention.
On the master system side in the figure, 10 is a system bus for exchanging data between the
41 is a bus I / F for exchanging data with the
[0026]
On the subsystem side in the figure, 20 is a system bus for exchanging data between the remote I /
61 is a bus I / F that exchanges data with the
[0027]
The
Clock information is written from the
At that time, the clock information is transferred in the order of the bus I /
Here, since the
[0028]
FIG. 5 is a flowchart showing the clock information transmission process of the remote master station.
As shown in FIG. 3, the control information exchange timing between the
[0029]
FIG. 6 is a flowchart showing processing on the remote I / O station side when receiving control information on the remote I / O station side.
Whether the data received in step S11 is from the
If it is from the
At this time, since each remote I /
[0030]
The reason for confirming in step S12 that “the first control data is received from the remote master station?” Is that the startup order of the
As shown in FIG. 3, the link scan definition is a time interval between data transmission of the remote master station and data transmission of the next remote master station.
Therefore, each remote I / O station needs to recognize the data transmission of the first remote master station for each, and in step S12 it is determined whether or not “first control data reception from remote master station?” In step S13, the link
[0031]
The control information reception interval from the master station is unique with the link scan time, and the clock information received from the master station has a transmission delay corresponding to the link scan time.
The measured value obtained by starting this timer is used for the clock information correction as the link scan time.
On the other hand, if it is determined in step S12 that it is not the first data reception from the remote master station, in step S14, the timer value is read from the link scan time measurement timer to obtain a correction value.
Next, in step S15, link scan time measurement is timer preset to prepare for the next correction.
[0032]
FIG. 7 is a flowchart showing processing at the time of receiving clock information on the remote I / O station side.
In step S21, whether or not clock information is received from the remote master station is determined from the transmission source station number and the command content in the transmission frame (see FIGS. 2 and 4).
The transmission I /
The transmission frame is clock information, the link scan time can be measured, and the correction of the clock information is completed by adding the link scan time to the clock information of the transmission frame.
[0033]
By these operations, the above-described processing is performed in all remote I / O stations, so that the clock of the entire system can be uniquely determined.
[0034]
According to the present invention, since the above-described processing is performed in all remote I / O stations, the clock information is transmitted using the same communication frame as the conventional one, so that the system is compatible with the conventional model while ensuring compatibility. The entire clock can be determined uniquely.
In the remote I / O network system, only one clock circuit is required, and the user does not need to adjust the clock at each station. Furthermore, the clock information of the remote master station is corrected to the clock information of the remote I / O station side at the link scan timing and preset. Therefore, if the clock information of the controller of the remote master station is accurately set, the system clock is automatically matched.
In addition, because the correction of the clock information transmission delay is performed at the link scan timing, no error corresponding to the transmission delay time occurs between the clock information transmitting station and the clock information receiving station regardless of the degree of the transmission delay. .
[0035]
In the above-described embodiment, the remote I / O system including the remote master station and the remote I / O station has been described. However, the remote master station serves as a master station, and other slave stations having a CPU unit. Similarly, even in a system configured with a local station, the clock information sent from the master station is received by the local station, corrected for the time of the link scan time, and has unique clock information throughout the system. be able to.
As for the matching of clock information between the master station and the local station, the clock information can be matched as a system without building an application by the user (without the user being aware of the time adjustment of the master station and the local station). Further, since correction of the sent clock information is also performed, time adjustment with excellent reliability and reliability can be performed, and a clock in the system can be uniquely determined.
[0036]
【The invention's effect】
In the present invention, when the system time is adjusted with the clock information of the controller adjacent to the master station in the control system, the remote I / O station of each station performs transmission / reception of clock information and correction of the transmission delay time. Time with excellent reliability and reliability, and a clock in the system can be uniquely determined.
In addition, time adjustment with excellent reliability and reliability can be performed between the master station and the local station, and a clock in the system can be uniquely determined.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a control system of a PC adopting a remote I / O network of the present invention.
FIG. 2 is a diagram showing a transmission frame used at the time of transmission / reception by the remote master station and the remote I / O station of the present invention.
FIG. 3 is a diagram showing timing for exchanging control information between a remote master station and a remote I / O station of the present invention.
FIG. 4 is a diagram showing a time adjustment method for a remote I / O network according to the present invention.
FIG. 5 is a flowchart showing clock information transmission processing of the remote master station of the present invention.
FIG. 6 is a flowchart showing a remote I / O station side control information reception process according to the present invention.
FIG. 7 is a flowchart showing clock information reception processing on the remote I / O station side of the present invention.
FIG. 8 is a standard control system configuration diagram of a PC adopting a conventional remote I / O network.
FIG. 9 is a diagram showing a transmission frame used at the time of transmission / reception between a conventional remote master station and a remote I / O station.
FIG. 10 is a diagram showing a timing for exchanging control information between a conventional remote master station and a remote I / O station.
[Explanation of symbols]
1 master system, 2 subsystem, 3 transmission cable, 4 termination resistor, 10 system bus, 11 controller, 15 remote master station, 20 system bus, 25 remote I / O station, 32 clock circuit, 42 clock storage area, 52 link Scan measurement circuit.
Claims (6)
上記リモートマスタ局が、上記コントローラより受け取った時計情報を、該コントローラのENDタイミングに同期して上記リモートI/O局に対して送信する工程と、
上記リモートI/O局が、上記時計情報を受信した際に、リンクスキャンタイム分の伝送遅れを補正し、リモートI/O局とシステムバスを介して接続されているユニットに対して補正された時計情報を提供する工程と、
を含むネットワークの時刻合わせ方法。Control system comprising a remote master station connected via a system bus to a controller that employs a refresh method, a remote I / O station which is controlled by the connected said remote master station through the network to the remote master station Contact Keru a time alignment method of network,
The remote master station, and transmitting the clock information received from the controller, with respect to the remote I / O station in synchronization with the END timing of the controller,
The remote I / O station, upon receiving the clock information, to correct the transmission delay of the link scan time content is corrected with respect to the unit are connected via a system bus and remote I / O station Providing the clock information,
Network time adjustment method including
上記マスタ局が、上記コントローラより受け取った時計情報を、該コントローラのENDタイミングに同期して上記ローカル局に対して送信する工程と、
上記ローカル局が、上記時計情報を受信した際に、リンクスキャンタイム分の伝送遅れを補正し、ローカル局自身の時計情報を修正する工程と、
を含むネットワークの時刻合わせ方法。A master station connected via a system bus to a controller that employs a refresh method, a time synchronization method in our Keru network control system comprising a local station that is connected via a network to the master station,
Said master station, the clock information received from the controller, and transmitting to said local station in synchronism with the END timing of the controller,
Said local station, upon receiving the clock information, to correct the transmission delay of the link scan time component, the step of modifying the clock information of the local station itself,
Network time adjustment method including
上記リモートマスタ局は、上記コントローラより受け取った時計情報を、該コントローラのENDタイミングに同期して上記リモートI/O局に対して送信し、The remote master station transmits the clock information received from the controller to the remote I / O station in synchronization with the END timing of the controller,
上記リモートI/O局は、上記時計情報を受信した際に、リンクスキャンタイム分の伝送遅れを補正し、リモートI/O局とシステムバスを介して接続されているユニットに対して補正された時計情報を提供する、When the remote I / O station receives the clock information, it corrects the transmission delay for the link scan time and corrects the unit connected to the remote I / O station via the system bus. Provide clock information,
ことを特徴とする制御システム。A control system characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000394943A JP4032646B2 (en) | 2000-12-26 | 2000-12-26 | Network time adjustment method and control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2000394943A JP4032646B2 (en) | 2000-12-26 | 2000-12-26 | Network time adjustment method and control system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2002196991A JP2002196991A (en) | 2002-07-12 |
JP4032646B2 true JP4032646B2 (en) | 2008-01-16 |
Family
ID=18860490
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000394943A Expired - Fee Related JP4032646B2 (en) | 2000-12-26 | 2000-12-26 | Network time adjustment method and control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4032646B2 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4267967B2 (en) * | 2003-05-14 | 2009-05-27 | 株式会社リコー | Time setting method and time setting device |
JP4302584B2 (en) * | 2004-07-16 | 2009-07-29 | セイコープレシジョン株式会社 | Wireless communication system, timing device, and computer program |
JP4302583B2 (en) * | 2004-07-16 | 2009-07-29 | セイコープレシジョン株式会社 | Wireless communication system and wireless communication apparatus having timekeeping function |
JP4854598B2 (en) * | 2007-05-31 | 2012-01-18 | 三菱電機株式会社 | Data transfer control device |
JP6191480B2 (en) * | 2014-01-30 | 2017-09-06 | 横河電機株式会社 | Data collection system |
JP6914680B2 (en) * | 2017-03-15 | 2021-08-04 | 株式会社東芝 | Monitoring and control system and time adjustment method |
JP6481726B2 (en) * | 2017-08-09 | 2019-03-13 | 横河電機株式会社 | Data collection system |
-
2000
- 2000-12-26 JP JP2000394943A patent/JP4032646B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2002196991A (en) | 2002-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3076251B1 (en) | Information processing apparatus, information processing program, and information processing method | |
US10284692B2 (en) | Control device and communication device | |
US8321612B2 (en) | Method and device for synchronizing two bus systems by transmission of a time associated trigger signal from one system to another | |
CN112445127A (en) | Redundancy control method of master controller | |
JPH0251715A (en) | Maintaining of right time for dispersion processing system | |
JP4032646B2 (en) | Network time adjustment method and control system | |
US20130238826A1 (en) | Device and method for global time information in event-controlled bus communication | |
WO2015182505A1 (en) | Timing synchronization method and air conditioning system to which timing synchronization method is applied | |
CN113711511A (en) | Industrial equipment supporting multi-time synchronization protocol | |
JPH0715421A (en) | Clock synchronizer in communication network | |
CN113630203B (en) | Multi-device triggering synchronization method | |
US7054399B1 (en) | Low overhead synchronized activation of functional modules | |
TWI735401B (en) | Communication device, communication system, communication method and program | |
CN116157786A (en) | Synchronous data processing method and equipment | |
CN113708879B (en) | Time setting system of distributed system | |
CN114600416B (en) | Control system, communication control method for control system, and control device | |
JP4497317B2 (en) | Control device clock synchronization | |
JP2008102713A (en) | Method for synchronizing time in control terminal | |
JPH0946325A (en) | Time synchronizing system | |
JPH0424861A (en) | Time synchronization method for data transmission system | |
JP5342124B2 (en) | Communication device and communication control program | |
JPH11355256A (en) | Synchronous operation system | |
TWM518437U (en) | Clock synchronization system of power management | |
EP3814868B1 (en) | Precision timing between systems | |
JPH02156758A (en) | Time synchronizing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20040630 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041129 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070403 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070524 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070717 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070907 |
|
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: 20071002 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20071015 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101102 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101102 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111102 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121102 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121102 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131102 Year of fee payment: 6 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |