[go: up one dir, main page]

JP4230808B2 - Time synchronization method and communication system - Google Patents

Time synchronization method and communication system Download PDF

Info

Publication number
JP4230808B2
JP4230808B2 JP2003110526A JP2003110526A JP4230808B2 JP 4230808 B2 JP4230808 B2 JP 4230808B2 JP 2003110526 A JP2003110526 A JP 2003110526A JP 2003110526 A JP2003110526 A JP 2003110526A JP 4230808 B2 JP4230808 B2 JP 4230808B2
Authority
JP
Japan
Prior art keywords
time
time data
master station
clock
counter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003110526A
Other languages
Japanese (ja)
Other versions
JP2004320350A (en
Inventor
直樹 中山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hioki EE Corp
Original Assignee
Hioki EE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hioki EE Corp filed Critical Hioki EE Corp
Priority to JP2003110526A priority Critical patent/JP4230808B2/en
Publication of JP2004320350A publication Critical patent/JP2004320350A/en
Application granted granted Critical
Publication of JP4230808B2 publication Critical patent/JP4230808B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)
  • Electric Clocks (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、発振器によって生成される内部クロックをカウントして基準クロックを生成するカウンタおよび基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路をそれぞれ備えた複数の時計部の各時刻を同期させる時刻同期方法、およびこの時刻同期方法によって子局および親局の各時刻データを同期させる通信システムに関するものである。
【0002】
【従来の技術】
この種の時刻同期方法として、特開平5−161181号公報に開示された時刻同期方法が知られている。この時刻同期方法では、まず、親局(a)が、信号送出時間(ts)と信号受信時間(tr)とに基づいて子局(b)との間の遅延時間(td)を算出する。次いで、親局(a)は、算出した遅延時間(td)を補正値として自らの第1の時計(2)によって生成される時刻(T)に加算して補正時刻(T+td)とし、この補正時刻(T+td)を子局(b)に送出する。一方、子局(b)では、親局(a)から補正時刻(T+td)を受信した時点で、この補正時刻(T+td)を自らの第2の時計(6)にセットする。このようにして、親局(a)の第1の時計(2)と子局(b)の第2の時計(6)とが同期される。
【0003】
【特許文献1】
特開平5−161181号公報(第5頁、第2図)
【0004】
【発明が解決しようとする課題】
ところが、従来の時刻同期方法には、以下のような解決すべき課題がある。すなわち、通常、親局(a)の第1の時計(2)や子局(b)の第2の時計(6)のような時計回路は、発振器(水晶発振器等)によって生成される内部クロックを分周して得られた基準クロックに基づいて時刻(時刻データ)を生成している。この場合、通常、発振器の発振周波数がクロック精度の範囲内でばらつくため、この水晶発振器のクロック精度を例えば±100ppmとし、かつ親局(a)から子局(b)への補正時刻(T+td)の送信間隔を20秒とした場合、水晶発振器のクロック精度に起因して、子局(b)が次の補正時刻(T+td)を親局(a)から受信するまでの間に、±2ミリ秒のずれが生じる。したがって、例えば、2時7分20秒という時刻データを子局(b)が受信した場合、子局(b)の第2の時計(6)によって生成される時刻が2時7分19秒998ミリ秒〜2時7分20秒002ミリ秒の範囲内でばらつくため、2時7分19秒998ミリ秒〜2時7分19秒999ミリ秒の範囲内の時刻は、進むように修正されて2時7分20秒000ミリ秒にセットされる。一方、2時7分20秒000ミリ秒〜2時7分20秒002ミリ秒の範囲内の時刻は、遅れるように修正されて2時7分20秒000ミリ秒にセットされる。ところが、予め設定されたスケジュールに基づいてこのスケジュールに規定された計測時刻(○時△分□秒000ms)に達した時点で計測対象についてのパラメータを計測して計測データを取得する子局では、その時刻が進むように修正されるときには問題が生じないが、遅れるように修正されたときには、スケジュールに規定された計測時刻が続けて2回発生するという不具合が生じる。具体的には、例えば、上記の例では、2時7分20秒000ミリ秒〜2時7分20秒002ミリ秒の範囲内の時刻が2時7分20秒000ミリ秒に修正されるために、2時7分20秒000ミリ秒の時刻が2回発生することとなる。このため、この点を解決するのが好ましい。
【0005】
本発明は、かかる課題を解決するためになされたものであり、複数の時計部の時刻を同期させる際に、子局としての時計部において同じ時刻が2回発生する事態を回避し得る時刻同期方法を提供することを主目的とする。また、複数の子局の時計部の時刻を親局の時計部の時刻に同期させる際に、子局の時計部において同じ時刻が2回発生する事態を回避し得る通信システムを提供することを主目的とする。
【0006】
【課題を解決するための手段】
上記目的を達成すべく請求項1記載の時刻同期方法は、発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路をそれぞれ備えた複数の時計部の当該各時刻を同期させる時刻同期方法であって、前記複数の時計部の内の任意の一の時計部を親局とし、かつ他の前記時計部を子局として、当該子局における前記発振器の精度を±Appm、および当該親局と当該子局との間の通信遅延時間をTdとしたときに、所定時間Ta毎に、当該親局の前記カウンタによる前記基準クロックの生成終了時点から時間Tc(=Ta×A+Td)の経過時点を起点として当該カウンタによる次の前記基準クロックの生成終了時点に対して時間Tcを遡った時点を終点とする所定期間内の所定のタイミングにおいて基準時刻を示す基準時刻データとしての前記時刻データを当該親局から当該子局に向けて送信させ、前記子局に対して、前記親局によって送信された前記基準時刻データを受信する都度、前記時刻データ生成回路によって生成される前記時刻データが当該基準時刻データと相違するときに当該時刻データを当該基準時刻データに修正させると共に前記親局における前記カウンタのカウント値が前記所定期間内の予め規定された特定カウント値をカウントするタイミングで当該子局における前記カウンタのカウント値を当該特定カウント値に修正させることにより、当該子局における前記時計部の前記時刻を前記親局の前記時刻に同期させる。
【0007】
請求項2記載の時刻同期方法は、発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路をそれぞれ備えた複数の時計部の当該各時刻を同期させる時刻同期方法であって、前記複数の時計部の内の任意の一の時計部を親局とし、かつ他の前記時計部を子局として、当該子局における前記発振器の精度を±Appm、当該親局および当該子局の前記各時刻データ相互間の初期時間差をTb、並びに当該親局と当該子局との間の通信遅延時間をTdとしたときに、所定時間Ta毎に、当該親局の前記カウンタによる前記基準クロックの生成終了時点から時間Tc(=Ta×A+Tb+Td:Tcは正の時間とする)の経過時点を起点として当該カウンタによる次の前記基準クロックの生成終了時点に対して時間Tcを遡った時点を終点とする所定期間内の所定のタイミングにおいて基準時刻を示す基準時刻データとしての前記時刻データを当該親局から当該子局に向けて送信させ、前記子局に対して、前記親局によって送信された前記基準時刻データを受信する都度、前記時刻データ生成回路によって生成される前記時刻データが当該基準時刻データと相違するときに当該時刻データを当該基準時刻データに修正させると共に前記親局における前記カウンタのカウント値が前記所定期間内の予め規定された特定カウント値をカウントするタイミングで当該子局における前記カウンタのカウント値を前記初期時間差Tbに対応する前記内部クロックの数を当該特定カウント値に加算したカウント値に修正させることにより、当該子局における前記時計部の前記時刻を前記親局の前記時刻に同期させる。
【0008】
請求項3記載の通信システムは、発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路を含む時計部を備えた子局と、当該子局と伝送路を介して接続されると共に発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路を含む時計部を備えた親局とを有し、前記子局と前記親局との間でデータ通信可能に構成された通信システムであって、前記親局は、前記子局における前記発振器の精度を±Appm、および当該親局と当該子局との間の通信遅延時間をTdとしたときに、所定時間Ta毎に、当該親局の前記カウンタによる前記基準クロックの生成終了時点から時間Tc(=Ta×A+Td)の経過時点を起点として当該カウンタによる次の前記基準クロックの生成終了時点に対して時間Tcを遡った時点を終点とする所定期間内の所定のタイミングにおいて基準時刻を示す基準時刻データとしての前記時刻データを当該子局に向けて送信可能に構成され、前記子局は、前記親局によって送信された前記基準時刻データを受信する都度、前記時刻データ生成回路によって生成される前記時刻データが当該基準時刻データと相違するときに当該時刻データを当該基準時刻データに修正すると共に前記親局における前記カウンタのカウント値が前記所定期間内の予め規定された特定カウント値をカウントするタイミングで当該子局における前記カウンタのカウント値を当該特定カウント値に修正する。
【0009】
請求項4記載の通信システムは、発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路を含む時計部を備えた子局と、当該子局と伝送路を介して接続されると共に発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路を含む時計部を備えた親局とを有し、前記子局と前記親局との間でデータ通信可能に構成された通信システムであって、前記親局は、前記子局における前記発振器の精度を±Appm、当該親局および当該子局の前記各時刻データ相互間の初期時間差をTb、並びに当該親局と当該子局との間の通信遅延時間をTdとしたときに、所定時間Ta毎に、当該親局の前記カウンタによる前記基準クロックの生成終了時点から時間Tc(=Ta×A+Tb+Td:Tcは正の時間とする)の経過時点を起点として当該カウンタによる次の前記基準クロックの生成終了時点に対して時間Tcを遡った時点を終点とする所定期間内の所定のタイミングにおいて基準時刻を示す基準時刻データとしての前記時刻データを当該子局に向けて送信可能に構成され、前記子局は、前記親局によって送信された前記基準時刻データを受信する都度、前記時刻データ生成回路によって生成される前記時刻データが当該基準時刻データと相違するときに当該時刻データを当該基準時刻データに修正すると共に前記親局における前記カウンタのカウント値が前記所定期間内の予め規定された特定カウント値をカウントするタイミングで当該子局における前記カウンタのカウント値を前記初期時間差Tbに対応する前記内部クロックの数を当該特定カウント値に加算したカウント値に修正する。
【0010】
請求項5記載の通信システムは、請求項3または4記載の通信システムにおいて、前記子局は、計測対象についてのパラメータを計測して計測データを取得する計測部と、前記計測データを入力すると共に当該計測データを通信部を経由して通信対象機器に送信する制御部とを備え、前記制御部は、前記時計部によって生成される前記時刻データに基づいて前記計測データの計測時刻を特定すると共に、当該計測データを当該特定された計測時刻を示す時刻データと共に前記親局に前記伝送路を介して送信する。
【0011】
【発明の実施の形態】
以下、添付図面を参照して、本発明に係る時刻同期方法および通信システムの好適な実施の形態について説明する。なお、以下では、一例として、この時刻同期方法を採用した通信システムを構成要素の一部として備えた計測システムについて説明する。
【0012】
(第1の実施の形態)
まず、計測システムMSの構成について、図面を参照して説明する。
【0013】
計測システムMSは、図1に示すように、1または2以上(一例として2つ)の子局としての計測装置1a,1b(特に区別しないときには、「計測装置1」ともいう)、および親局2を備えている。この場合、計測装置1は、計測対象と同数配設される。一例として、本実施の形態では、計測対象として、2つの計測対象機器3a,3b(特に区別しないときには、「計測対象機器3」ともいう)が設けられているため、計測装置1は、各計測対象機器3a,3bに対応させて2つ設けられている。また、各計測装置1a,1bは、親局2と伝送路4(一例としてCANバス)を介して接続されている。一方、親局2は、図外の管理装置と図示しない伝送路を介して接続されている。
【0014】
次に、各計測装置1および親局2の各構成について具体的に説明する。
【0015】
計測装置1は、図1に示すように、計測部11、水晶発振器12、時計部13、通信部14および制御部15を備えている。この場合、計測部11は、制御部15からの指示に基づいて計測対象機器3a(3b)についてのパラメータを定期的に計測して計測データD1a(D1b)を取得すると共に制御部15に出力する。ここで、計測対象機器3についてのパラメータとしては、計測対象機器3の内部温度や内部湿度、計測対象機器3の任意部位における電流や電圧、計測対象機器3の消費電力、および計測対象機器3の内部信号についての特性(周波数、パルス幅および波高値等)などの少なくとも一つで構成される。
【0016】
水晶発振器12は、本発明における発振器に相当し、計測装置1の内部で使用される内部クロックCLK1を生成する。一例として、水晶発振器12は、1kHzの内部クロックCLK1を生成する。この場合、水晶発振器12の精度(クロック精度)は、±100ppmとする。
【0017】
時計部13は、図1に示すように、カウンタ13aおよび時刻データ生成回路13bを含んで構成されている。この場合、カウンタ13aは、一例として、内部クロックCLK1をカウント値0からカウントして(分周して)カウント値999をカウントした時点で(所定値に達したときに)1Hzの基準クロックCLK2を生成して出力する1000分周回路で構成されている。また、カウンタ13aは、内部クロックCLK1に同期して外部からカウント値をロードすることにより、現在のカウント値をロードしたカウント値に修正可能に構成されている。時刻データ生成回路13bは、いわゆるリアルタイムクロックICを用いて構成されて、基準クロックCLK2に基づいて現在の時刻を示す時刻データ(○時△分□秒を示すデータ)Dtmを出力する。また、時刻データ生成回路13bは、現在の時刻データを外部からロードした時刻データに修正可能に構成されている。
【0018】
通信部14は、親局2と伝送路4を介してデータ通信を行うための通信機能を備えている。制御部15は、一例として、CPUおよび内部メモリを含んで構成されている。また、制御部15は、時計部13によって出力される時刻データDtmと内部メモリに予め記憶されたスケジュールに規定されている計測時刻とを比較して、時刻データDtmが計測時刻に達したときに、計測部11を制御することにより、計測対象機器3a(3b)のパラメータを計測させてその計測データD1a(D1b)を入力する。また、制御部15は、入力した計測データD1a(D1b)を時計部13から入力した時刻データDtmと共に内部メモリに記憶する。この場合、時刻データDtmは、計測データD1a(D1b)が計測された時刻を示すタイムスタンプとして使用される。
【0019】
さらに、制御部15は、通信部14を介して親局2と定期的に通信を行うことにより、各計測対象機器3a(3b)についての計測データD1a(D1b)および計測データD1a(D1b)に対応する時刻データDtmを親局2に送信する。また、制御部15は、親局2から基準時刻データDtrを受信したときには、その都度、基準時刻データDtrと時刻データ生成回路13bによって生成されている時刻データDtmとを比較して、両者が相違するときには、基準時刻データDtrを時刻データ生成回路13bに設定することにより、時刻データ生成回路13bによって生成される時刻データDtmを基準時刻データDtrに一致させる(修正する)。また、制御部15は、時刻データ生成回路13bの時刻データDtmに対する修正と併せて、親局2における後述するカウンタ13aのカウント値が後述する所定期間Te内において予め規定された特定カウント値(第2特定カウント値)Dcn2をカウントするタイミングで、特定カウント値Dcn2をカウント値Dcntとしてカウンタ13aにロードすることにより、時刻データ生成回路13bのカウント値を特定カウント値Dcn2に修正する。
【0020】
次いで、親局2の構成について具体的に説明する。なお、計測装置(子局)1と同一の構成要素については同一の符号を付して、重複する説明を省略する。
【0021】
親局2は、図1に示すように、水晶発振器12、時計部13、通信部14および制御部25を備えている。この場合、制御部25は、一例として、CPUおよび内部メモリ(図示せず)を含んで構成されている。また、制御部25は、通信部14を介して計測装置1と定期的に通信を行うことにより、計測装置1によって送信された各計測対象機器3a,3bについての計測データD1a,D1bおよび各計測データD1a,D1bについての時刻データDtmを受信して内部メモリ内における各計測装置1a,1b用の記憶領域に記憶する。また、制御部25は、定期的に、または管理装置からの要求に応じて、内部メモリに記憶している各計測対象機器3の計測データD1a,D1bおよび各計測データD1a,D1bについての時刻データDtmを管理装置に送信する。
【0022】
また、制御部25は、所定時間Ta毎(例えば、20秒毎)に、時計部13の時刻データ生成回路13bから時刻データDtmを入力すると共にこの時刻データDtmを基準時刻データDtrとして各計測装置1に伝送路4を介して送信する。この場合、制御部25は、計測装置1における水晶発振器12の精度(クロック精度)を±Appm、親局2と計測装置1との間の通信遅延時間をTdとしたときに、図2に示すように、カウンタ13aによる基準クロックCLK2の生成終了時点から時間Tc(=Ta×A+Td)を経過した時点を起点とし、かつカウンタ13aによる次の基準クロックCLK2の生成終了時点から時間Tcを遡った時点を終点とする所定期間Te内であってカウンタ13aのカウント値が特定カウント値Dcn1(第1特定カウント値)をカウントするタイミングで基準時刻データDtrを送信する。本実施の形態では、時間Tcとしては、一例として、水晶発振器12の精度を±100ppm、所定時間Taを20秒、および通信遅延時間Tdを1ミリ秒としたことにより、水晶発振器12の精度に起因する時間のズレの最大値である2ミリ秒に通信遅延時間Tdの1ミリ秒を加算した3ミリ秒となる。また、カウンタ13aの動作クロックである内部クロックCLK1の1周期が1ミリ秒のため、所定期間Teは、図2に示すように、カウンタ13aのカウント値が003から996となるまでの期間となる。したがって、特定カウント値Dcn1,Dcn2は、003から996までのいずれかの所定値となる。
【0023】
次に、計測システムMSにおける時刻同期方法について、一例として、特定カウント値Dcn1を005とし、特定カウント値Dcn2を009として、図2を参照して説明する。
【0024】
この計測システムMSでは、親局2が、所定時間Ta毎(20秒毎)に、時計部13の時刻データ生成回路13bから時刻データDtmを入力して、この時刻データDtmを基準時刻データDtrとして各計測装置1に伝送路4を介して送信する。一例として、図2に示すように、親局2の時計部13によって生成される時刻データDtmが所定時間Taに達した5時26分20秒を刻んだときに、親局2の制御部25が、時刻データ生成回路13bから取得した時刻データDtmを基準時刻データDtrとして、カウンタ13aのカウント値が特定カウント値Dcn1(005)となるタイミングに合わせて基準時刻データDtrを各計測装置1に送信する。
【0025】
一方、各計測装置1では、制御部15が、親局2の送信から通信遅延時間Td(1ミリ秒)経過後に、伝送路4および通信部14を介して基準時刻データDtrを受信する。この場合、最初の基準時刻データDtrを受信したときは、通常、計測装置1側の時計部13によって生成される時刻データDtmは基準時刻データDtrと相違している。このため、制御部15は、受信した基準時刻データDtrと時計部13によって生成される時刻データDtmとを比較した後、基準時刻データDtrを時刻データ生成回路13bに設定することにより、時刻データ生成回路13bによって生成される時刻データDtmを基準時刻データDtrに一致させる(修正する)。一方、2回目以降の基準時刻データDtrを受信したときは、計測装置1側の時計部13によって生成される時刻データDtmと基準時刻データDtrとのずれ量は、水晶発振器12のクロック精度に起因するズレの最大値である2ミリ秒以内に止まっている。したがって、通常時には、基準時刻データDtrを受信した際の時刻データDtmと基準時刻データDtrとが一致するため、この際には、制御部15は、時刻データ生成回路13bに対する基準時刻データDtrの設定は行わない。
【0026】
次いで、制御部15は、親局2におけるカウンタ13aが特定カウント値Dcn1よりも大きい値の特定カウント値Dcn2(009)をカウントするタイミングに合わせて、カウント値Dcnt(009)を自らの時刻データ生成回路13bにロードすることにより、カウンタ13aのカウント値をカウント値Dcnt(009)に修正する。これにより、各計測装置1と親局2との間の時刻データDtmの時刻同期が完了する。この場合、この計測装置1では、制御部15が、基準時刻データDtrを受信したタイミングにおけるカウンタ13aのカウント値を基準として、特定カウント値Dcn1(005)と特定カウント値Dcn2(009)との差分カウント値(4カウント)から通信遅延時間Td分のカウント値(1カウント)を減算したカウント値(3カウント)だけカウンタ13aのカウント値が増加した時点において、自らの時刻データ生成回路13bに対してカウント値Dcnt(009)を設定する(ロードする)。これにより、時刻データ生成回路13bへのカウント値Dcnt(009)のロード動作が、親局2におけるカウンタ13aのカウント値が特定カウント値Dcn2(009)をカウントするタイミングで行われることになる。
【0027】
このように、この時刻同期方法および計測システムMSによれば、親局2のカウンタ13aによる基準クロックCLK2の生成終了時点から時間Tcの経過時点を起点としてカウンタ13aによる次の基準クロックCLK2の生成終了時点に対して時間Tcを遡った時点を終点とする所定期間Te内の所定のタイミング(カウンタ13aのカウント値が特定カウント値Dcn1となるタイミング)において基準時刻データDtrを計測装置1に向けて所定時間Ta毎に送信し、計測装置1が、基準時刻データDtrを受信する都度、時刻データ生成回路13bによって生成される時刻データDtmが基準時刻データDtrと相違するときに時刻データDtmを基準時刻データDtrに修正すると共に、親局2におけるカウンタ13aのカウント値が所定期間Te内の予め規定された特定カウント値Dcn2をカウントするタイミングで計測装置1におけるカウンタ13aのカウント値を特定カウント値Dcn2に修正することにより、計測装置1のカウンタ13aのカウント値が、時刻データDtmが切り替わる初期値000に戻されたり、時刻データDtmの切り替わり目を越えて遅らされたり(例えば、001から999にされる)することなく、また、逆に時刻データDtmの切り替わり目を越えて進まされたり(例えば、998から001にされる)することなく、親局2の時刻と計測装置1の時刻を1ミリ秒以内の精度で同期させることができる。つまり、計測装置1の時刻データ生成回路13bにおいて、同じ時刻データDtmの2回の生成を確実に回避しつつ(具体的に図2の場合においては、5時26分20秒000ミリ秒の2回の生成を確実に回避しつつ)、1ミリ秒以内の精度で計測装置1を親局2に時刻同期させることができる。したがって、この計測システムMSによれば、各計測装置1において、同一タイムスタンプの計測データD1が併存するという不具合を確実に回避することができる。
【0028】
(第2の実施の形態)
上記の実施の形態では、親局2と各計測装置1とを1ミリ秒以内の精度で時刻同期させる例について説明したが、計測装置1において同一タイムスタンプの計測データD1が併存するという不具合を確実に回避するとの目的を少なくとも実現するのであれば、親局と各計測装置との間における1ミリ秒を超える初期時間差Tbの発生を許容できることもある。以下、時刻同期に際して、親局と計測装置との間に任意の初期時間差Tbを持たせ得る計測システムMS1について説明する。なお、上記計測システムMSと同一の構成については同一の符号を付して、重複する説明を省略する。
【0029】
計測システムMS1は、計測システムMSと同一の構成要素を備えており、図1に示すように、1または2以上(一例として2つ)の子局としての計測装置31a,31b(以下、区別しないときには「計測装置31」ともいう)、および親局41を備えている。この場合、計測装置31は、親局41と伝送路4を介して接続され、親局41は、管理装置と図示しない伝送路を介して接続されている。
【0030】
次に、各計測装置31および親局41の各構成について、具体的に説明する。
【0031】
計測装置31は、図1に示すように、計測部11、水晶発振器12、時計部13、通信部14および制御部35を備えている。ここで、制御部35は、一部の動作において上記した親局2と相違し、それ以外の点に関しては同一に作動する。具体的には、制御部35は、親局41から基準時刻データDtrを受信したときに、初期時間差Tbに対応する内部クロックCLK1のクロック数(カウント値)を特定カウント値Dcn2に加算してカウント値Dcntを算出し、かつ親局41におけるカウンタ13aのカウント値が所定期間Te内において予め規定された特定カウント値Dcn2をカウントするタイミングにおいてカウント値Dcntをカウンタ13aにロードすることにより、時刻データ生成回路13bのカウント値をカウント値Dcntに修正する点において制御部15と相違する。
【0032】
次いで、親局41の構成について、具体的に説明する。
【0033】
親局41は、図1に示すように、水晶発振器12、時計部13、通信部14および制御部45を備えている。この場合、制御部45は、計測装置31における水晶発振器12の精度(クロック精度)を±Appm、親局41および計測装置31の各時刻データDtm相互間の初期時間差をTb、親局41と計測装置31との間の通信遅延時間をTdとしたときに、図3に示すように、計測装置1における水晶発振器12の精度(クロック精度)を±Appm、親局2と計測装置1との間の通信遅延時間をTdとしたときに、カウンタ13aによる基準クロックCLK2の生成終了時点から時間Tc(=Ta×A+Tb+Td)を経過した時点を起点とし、かつカウンタ13aによる次の基準クロックCLK2の生成終了時点から時間Tcを遡った時点を終点とする所定期間Te内であってカウンタ13aのカウント値が特定カウント値Dcn1をカウントするタイミングで基準時刻データDtrを送信する。本実施の形態では、時間Tcとしては、一例として、水晶発振器12の精度を±100ppm、所定時間Taを20秒、通信遅延時間Tdを1ミリ秒、および親局41の時刻に対して計測装置31の時刻を2ミリ秒遅延させるとして初期時間差Tbを2ミリ秒(なお、逆に進ませるときには初期時間差Tbを−2ミリ秒とするものとする)とすることにより、5ミリ秒となる。したがって、所定期間Teは、図3に示すように、カウンタ13aのカウント値が005から994となるまでの期間となる。したがって、特定カウント値Dcn1,Dcn2は、005から994までのいずれかの所定値となる。
【0034】
次に、計測システムMS1における時刻同期方法について、一例として、特定カウント値Dcn1を006とし、特定カウント値Dcn2を009として、図3を参照して説明する。
【0035】
この計測システムMS1では、親局41が、所定時間Ta毎(20秒毎)に、時計部13の時刻データ生成回路13bから時刻データDtmを入力して、この時刻データDtmを基準時刻データDtrとして各計測装置1に伝送路4を介して送信する。一例として、図3に示すように、親局41の時計部13によって生成される時刻データDtmが所定時間Taに達した5時26分20秒を刻んだときに、親局41の制御部45が、時刻データ生成回路13bから取得した時刻データDtmを基準時刻データDtrとして、カウンタ13aのカウント値が特定カウント値Dcn1(006)となるタイミングに合わせて基準時刻データDtrを各計測装置1に送信する。
【0036】
一方、各計測装置31では、制御部35が、親局41の送信から通信遅延時間Td(1ミリ秒)経過後に、基準時刻データDtrを受信する。この場合、最初の基準時刻データDtrを受信したときは、計測システムMSと同様にして、制御部35は、基準時刻データDtrを時刻データ生成回路13bに設定して、時刻データ生成回路13bによって生成される時刻データDtmを基準時刻データDtrに一致させる(修正する)。一方、2回目以降の基準時刻データDtrを受信した通常時には、基準時刻データDtrを受信した際の時刻データDtmと基準時刻データDtrとが一致するため、この際には、制御部35は、時刻データ生成回路13bに対する基準時刻データDtrの設定は行わない。
【0037】
次いで、制御部35は、初期時間差Tb(2ミリ秒の遅れ)に対応する内部クロックCLK1のクロック数(−2クロック)を特定カウント値Dcn2(009)に加算してカウント値Dcnt(009−002=007)を算出する。次いで、制御部35は、計測システムMSにおける制御部25と同様にして、親局41におけるカウンタ13aが特定カウント値Dcn2(009)をカウントするタイミングに合わせて、カウント値Dcnt(007)を自らの時刻データ生成回路13bにロードすることにより、カウンタ13aのカウント値をカウント値Dcnt(007)に修正する。これにより、各計測装置31と親局41との間の時刻データDtmの時刻同期が完了する。
【0038】
このように、この時刻同期方法および計測システムMS1によれば、時刻同期に際して、親局41の時刻と計測装置31の時刻との間に任意の初期時間差Tbを持たせることができる。したがって、複数の計測装置31間の時刻に時間差を持たせた時刻同期を行うこともできる。なお、初期時間差Tbをゼロとすることにより、計測システムMSと同じように、親局41の時刻と計測装置31の時刻とを1ミリ秒以内の精度で時刻同期させることもできる。
【0039】
なお、本発明は、上記した実施の形態に限定されない。例えば、一例として、水晶発振器12によって生成される内部クロックCLK1は、その周期を1ミリ秒としたが、これに限定されるものではなく、さらに短い周期、またはさらに長い周期に規定することもできる。また、本発明の実施の形態では、制御部15(または35)とは別個独立した時計部13を備えて記録再生装置1(または31)を構成し、制御部25(または45)とは別個独立した時計部13を備えて親局2(または41)を構成した例について説明したが、本発明における時計部の構成(時計部全体の構成、または時計部内の一部の機能についての構成(例えば、カウンタや時刻データ生成回路の構成))に関しては、そのハードウェアに代えて、制御部15(または25,35,45)内のCPUが内部クロックまたは外部クロックを利用したソフトウェアで実現する構成を採用することもできる。
【0040】
【発明の効果】
以上のように、請求項1,3記載の時刻同期方法および通信システムによれば、親局が、子局における発振器の精度を±Appm、および親局と子局との間の通信遅延時間をTdとしたときに、所定時間Ta毎に、親局のカウンタによる基準クロックの生成終了時点から時間Tc(=Ta×A+Td)の経過時点を起点としてカウンタによる次の基準クロックの生成終了時点に対して時間Tcを遡った時点を終点とする所定期間内の所定のタイミングにおいて基準時刻を示す基準時刻データとしての時刻データを子局に向けて送信し、子局が、親局によって送信された基準時刻データを受信する都度、時刻データ生成回路によって生成される時刻データが基準時刻データと相違するときに時刻データを基準時刻データに修正すると共に親局におけるカウンタのカウント値が所定期間内の予め規定された特定カウント値をカウントするタイミングで子局におけるカウンタのカウント値を特定カウント値に修正することにより、子局としての時計部におけるカウンタのカウント値が、時刻データが切り替わる初期値に戻されたり、さらには時刻データの切り替わり目を越えて遅らされたりすることなく、また逆に時刻データの切り替わり目を越えて進まされたりすることなく、親局としての時計部の時刻と子局としての時計部の時刻を内部クロックの1クロック以内の精度で同期させることができる。したがって、子局としての時計部における時刻データ生成回路が、同じ時刻データを時刻同期に起因して2回生成するという誤動作を確実に防止することができる。
【0041】
また、請求項2,4記載の時刻同期方法および通信システムによれば、親局が、子局における発振器の精度を±Appm、親局および子局の各時刻データ相互間の初期時間差をTb、並びに親局と子局との間の通信遅延時間をTdとしたときに、所定時間Ta毎に、親局のカウンタによる基準クロックの生成終了時点から時間Tc(=Ta×A+Tb+Td)の経過時点を起点としてカウンタによる次の基準クロックの生成終了時点に対して時間Tcを遡った時点を終点とする所定期間内の所定のタイミングにおいて基準時刻を示す基準時刻データとしての時刻データを子局に向けて送信し、子局が、親局によって送信された基準時刻データを受信する都度、時刻データ生成回路によって生成される時刻データが基準時刻データと相違するときに時刻データを基準時刻データに修正すると共に親局におけるカウンタのカウント値が所定期間内の予め規定された特定カウント値をカウントするタイミングで子局におけるカウンタのカウント値を初期時間差Tbに対応する内部クロックの数を特定カウント値に加算したカウント値に修正することにより、子局としての時計部におけるカウンタのカウント値が、時刻データが切り替わる初期値に戻されたり、さらには時刻データの切り替わり目を越えて遅らされたりすることなく、また逆に時刻データの切り替わり目を越えて進まされたりすることなく、親局としての時計部の時刻と子局としての時計部の時刻を内部クロックの1クロック以内の精度で同期させることができる。したがって、子局としての時計部における時刻データ生成回路が同じ時刻データを2回生成するという誤動作を確実に防止しつつ、複数の子局間の各時刻に時間差を持たせた時刻同期を行うこともできる。
【0042】
また、請求項5記載の通信システムによれば、時刻同期を行ったとしても、子局としての時計部の時刻データ生成回路が同じ時刻データを2回生成しないため、同一のタイムスタンプの計測データが親局に送信されるという不具合を確実に防止することができる。
【図面の簡単な説明】
【図1】通信システムとしての計測システムMS(MS1)、計測装置1(31)、および親局2(41)の構成を示すブロック図である。
【図2】計測システムMSにおける時刻同期処理を説明するためのタイミングチャートである。
【図3】計測システムMS1における他の時刻同期処理を説明するためのタイミングチャートである。
【符号の説明】
1a,1b,31a,31b 計測装置(子局)
2,41 親局
3a,3b 計測対象機器
4 伝送路
11 計測部
12 水晶発振器
13 時計部
13a カウンタ
13b 時刻データ生成回路
14 通信部
15,25,35,45 制御部
CLK1 内部クロック
CLK2 基準クロック
Dcn1,Dcn2 特定カウント値
Dcnt カウント値
Dtm 時刻データ
Dtr 基準時刻データ
MS,MS1 計測システム
Te 所定期間
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a counter for generating a reference clock by counting an internal clock generated by an oscillator and a time data generating circuit for generating time data indicating a time based on the reference clock. The present invention relates to a time synchronization method that synchronizes clocks, and a communication system that synchronizes each time data of a slave station and a master station by this time synchronization method.
[0002]
[Prior art]
As this type of time synchronization method, a time synchronization method disclosed in Japanese Patent Laid-Open No. Hei 5-161181 is known. In this time synchronization method, first, the master station (a) calculates a delay time (td) between the slave station (b) based on the signal transmission time (ts) and the signal reception time (tr). Next, the master station (a) uses the calculated delay time (td) as a correction value to generate a time (T) generated by its own first clock (2). 2 ) To the correction time (T 2 + Td), and this correction time (T 2 + Td) is sent to the slave station (b). On the other hand, in the slave station (b), the correction time (T 2 + Td), the correction time (T 2 + Td) is set to its second clock (6). In this way, the first clock (2) of the master station (a) and the second clock (6) of the slave station (b) are synchronized.
[0003]
[Patent Document 1]
JP-A-5-161181 (page 5, FIG. 2)
[0004]
[Problems to be solved by the invention]
However, the conventional time synchronization method has the following problems to be solved. That is, normally, a clock circuit such as the first clock (2) of the master station (a) or the second clock (6) of the slave station (b) has an internal clock generated by an oscillator (crystal oscillator or the like). The time (time data) is generated based on the reference clock obtained by dividing the frequency of. In this case, since the oscillation frequency of the oscillator usually varies within the range of the clock accuracy, the clock accuracy of the crystal oscillator is, for example, ± 100 ppm, and the correction time (T) from the master station (a) to the slave station (b) 2 + Td), when the transmission interval is 20 seconds, the slave station (b) causes the next correction time (T) due to the clock accuracy of the crystal oscillator. 2 There is a deviation of ± 2 milliseconds before + td) is received from the master station (a). Therefore, for example, when the slave station (b) receives time data of 2: 7: 20, the time generated by the second clock (6) of the slave station (b) is 2: 7: 19: 998. Times in the range of 2: 7: 19: 998 ms-2: 7: 19: 999 ms have been modified to advance, as they vary within the range of milliseconds to 2: 7: 20: 002 ms. Is set to 2: 7: 20.000 milliseconds. On the other hand, the time within the range of 2: 7: 20.000 milliseconds to 2: 7: 20.002 milliseconds is corrected to be delayed and set to 2: 7: 20.000 milliseconds. However, in the slave station that acquires the measurement data by measuring the parameter about the measurement object when the measurement time (○ hour Δminute □ second 000 ms) defined in this schedule has been reached based on a preset schedule, There is no problem when the time is corrected to advance, but there is a problem that the measurement time defined in the schedule occurs twice in succession when it is corrected to be delayed. Specifically, for example, in the above example, the time within the range of 2: 7: 20.000 milliseconds to 2: 7: 20.002 milliseconds is corrected to 2: 7: 20.000 milliseconds. Therefore, the time of 2: 7: 20.000 milliseconds is generated twice. For this reason, it is preferable to solve this point.
[0005]
The present invention has been made in order to solve such a problem. When synchronizing the times of a plurality of clock units, the time synchronization can avoid the situation where the same time occurs twice in the clock unit as a slave station. The main purpose is to provide a method. Further, it is intended to provide a communication system capable of avoiding a situation in which the same time occurs twice in the clock unit of the slave station when synchronizing the time of the clock unit of the plurality of slave stations with the time of the clock unit of the master station. Main purpose.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, a time synchronization method according to claim 1, wherein an internal clock generated by an oscillator is counted and a reference clock is output when a predetermined value is reached, and the time is indicated based on the reference clock. A time synchronization method that synchronizes each time of a plurality of clock units each including a time data generation circuit that generates time data, wherein any one of the plurality of clock units is a master station, And when the other clock unit is a slave station, the accuracy of the oscillator in the slave station is ± Appm, and the communication delay time between the master station and the slave station is Td, every predetermined time Ta The next generation of the reference clock by the counter starts from the time Tc (= Ta × A + Td) elapsed from the end of the generation of the reference clock by the counter of the master station. Transmitting the time data as reference time data indicating the reference time at a predetermined timing within a predetermined period with a time point traced back from the time Tc with respect to the completion point to the child station from the parent station; Whenever the slave station receives the reference time data transmitted by the master station, the time data generated by the time data generation circuit is different from the reference time data. The count value of the counter in the master station is corrected to the specific count value at the timing when the count value of the counter in the master station counts a specific count value defined in advance within the predetermined period. As a result, the time of the clock unit in the slave station is synchronized with the time of the master station.
[0007]
3. The time synchronization method according to claim 2, wherein the internal clock generated by the oscillator is counted and a reference clock is output when a predetermined value is reached, and time data indicating the time is generated based on the reference clock. A time synchronization method for synchronizing each time of a plurality of clock units each provided with a data generation circuit, wherein any one of the plurality of clock units is a master station, and the other clock units Is the slave station, the accuracy of the oscillator in the slave station is ± Appm, the initial time difference between the time data of the master station and the slave station is Tb, and communication between the master station and the slave station When the delay time is Td, the time Tc (= Ta × A + Tb + Td: Tc is positive from the end of the generation of the reference clock by the counter of the master station every predetermined time Ta. The reference time data indicating the reference time at a predetermined timing within a predetermined period starting from the time point when the time Tc is traced back to the end point of generation of the next reference clock by the counter. The time data is generated by the time data generation circuit each time the base station transmits the reference time data transmitted from the parent station to the child station and receives the reference time data transmitted by the parent station. When the time data differs from the reference time data, the time data is corrected to the reference time data, and the count value of the counter in the master station counts a predetermined specific count value within the predetermined period. The count value of the counter at the slave station at the timing of the internal clock corresponding to the initial time difference Tb. Number by that to fix the count value obtained by adding said specified count value, synchronizing the time of the clock unit in the child station to the time of the master station.
[0008]
4. The communication system according to claim 3, wherein a counter that outputs a reference clock when the internal clock generated by the oscillator reaches a predetermined value and time data that indicates time based on the reference clock is generated. A slave station having a clock unit including a generation circuit, and a counter that is connected to the slave station via a transmission line and outputs a reference clock when the internal clock generated by the oscillator is counted and reaches a predetermined value And a master station including a clock unit including a time data generation circuit that generates time data indicating time based on the reference clock, and configured to allow data communication between the slave station and the master station. In the communication system, the master station has an accuracy of the oscillator in the slave station of ± Appm, and a communication delay between the master station and the slave station. Is the next reference clock by the counter starting from the time Tc (= Ta × A + Td) elapsed from the end of the generation of the reference clock by the counter of the master station every predetermined time Ta. The time data as the reference time data indicating the reference time at a predetermined timing within a predetermined period whose end point is a time point that is traced back to the generation end point of the generation is configured to be transmitted toward the child station, Each time the slave station receives the reference time data transmitted by the master station, the time data generated by the time data generation circuit differs from the reference time data when the time data is generated. In addition to correcting the data, the count value of the counter in the master station is changed to a predetermined specific count value within the predetermined period. The count value of the counter in the child station at the timing when the count is corrected to the specific count value.
[0009]
5. The communication system according to claim 4, wherein a counter that outputs a reference clock when an internal clock generated by an oscillator is counted and reaches a predetermined value, and time data that indicates time based on the reference clock are generated. A slave station having a clock unit including a generation circuit, and a counter that is connected to the slave station via a transmission line and outputs a reference clock when the internal clock generated by the oscillator is counted and reaches a predetermined value And a master station including a clock unit including a time data generation circuit that generates time data indicating time based on the reference clock, and configured to allow data communication between the slave station and the master station. The master station has an accuracy of the oscillator in the slave station of ± Appm, and the time data phase of the master station and the slave station When the initial time difference between them is Tb, and the communication delay time between the master station and the slave station is Td, from the end of the generation of the reference clock by the counter of the master station every predetermined time Ta Within a predetermined period starting from a time Tc (= Ta × A + Tb + Td: Tc is a positive time) as a starting point and a time point going back from the time Tc to the end of generation of the next reference clock by the counter The time data as reference time data indicating a reference time at a predetermined timing is configured to be transmitted to the slave station, and the slave station receives the reference time data transmitted by the master station each time. When the time data generated by the time data generation circuit is different from the reference time data, the time data is corrected to the reference time data. The number of internal clocks corresponding to the initial time difference Tb is the count value of the counter in the slave station at the timing when the count value of the counter in the master station counts a predetermined specific count value within the predetermined period. Is corrected to the count value added to the specific count value.
[0010]
The communication system according to claim 5 is the communication system according to claim 3 or 4, wherein the slave station inputs a measurement unit that measures a parameter of a measurement target and acquires measurement data, and inputs the measurement data. A control unit that transmits the measurement data to a communication target device via a communication unit, and the control unit specifies a measurement time of the measurement data based on the time data generated by the clock unit. The measurement data is transmitted to the master station along with the time data indicating the specified measurement time via the transmission path.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF EMBODIMENTS Hereinafter, preferred embodiments of a time synchronization method and a communication system according to the present invention will be described with reference to the accompanying drawings. In the following, as an example, a measurement system including a communication system that employs this time synchronization method as a part of a component will be described.
[0012]
(First embodiment)
First, the configuration of the measurement system MS will be described with reference to the drawings.
[0013]
As shown in FIG. 1, the measurement system MS includes one or two or more (two by way of example) measuring devices 1a and 1b (also referred to as “measuring device 1” unless otherwise distinguished), and a master station. 2 is provided. In this case, the same number of measuring devices 1 as the measurement objects are arranged. As an example, in the present embodiment, two measurement target devices 3a and 3b (also referred to as “measurement target device 3” unless otherwise distinguished) are provided as measurement targets. Two are provided corresponding to the target devices 3a and 3b. Each measuring device 1a, 1b is connected to the master station 2 via a transmission path 4 (a CAN bus as an example). On the other hand, the master station 2 is connected to a management device (not shown) via a transmission path (not shown).
[0014]
Next, each structure of each measuring device 1 and the master station 2 will be specifically described.
[0015]
As shown in FIG. 1, the measurement device 1 includes a measurement unit 11, a crystal oscillator 12, a clock unit 13, a communication unit 14, and a control unit 15. In this case, the measurement unit 11 periodically measures the parameters of the measurement target device 3a (3b) based on an instruction from the control unit 15, acquires the measurement data D1a (D1b), and outputs the measurement data D1a (D1b) to the control unit 15. . Here, the parameters for the measurement target device 3 include the internal temperature and humidity of the measurement target device 3, the current and voltage at an arbitrary part of the measurement target device 3, the power consumption of the measurement target device 3, and the measurement target device 3. It consists of at least one of the characteristics (frequency, pulse width, peak value, etc.) of the internal signal.
[0016]
The crystal oscillator 12 corresponds to the oscillator in the present invention, and generates an internal clock CLK1 used inside the measuring apparatus 1. As an example, the crystal oscillator 12 generates an internal clock CLK1 of 1 kHz. In this case, the accuracy (clock accuracy) of the crystal oscillator 12 is ± 100 ppm.
[0017]
As shown in FIG. 1, the clock unit 13 includes a counter 13a and a time data generation circuit 13b. In this case, as an example, the counter 13a counts (divides) the internal clock CLK1 from the count value 0 and counts the count value 999 (when it reaches a predetermined value), the 1 Hz reference clock CLK2 It consists of a 1000 divider circuit that generates and outputs. The counter 13a is configured to be able to correct the current count value to the loaded count value by loading the count value from the outside in synchronization with the internal clock CLK1. The time data generation circuit 13b is configured by using a so-called real-time clock IC, and outputs time data (data indicating ◯ hour Δminute □ second) Dtm indicating the current time based on the reference clock CLK2. The time data generation circuit 13b is configured to be able to correct the current time data to time data loaded from the outside.
[0018]
The communication unit 14 has a communication function for performing data communication with the master station 2 via the transmission path 4. As an example, the control unit 15 includes a CPU and an internal memory. Further, the control unit 15 compares the time data Dtm output by the clock unit 13 with the measurement time defined in the schedule stored in advance in the internal memory, and when the time data Dtm reaches the measurement time. By controlling the measurement unit 11, the parameter of the measurement target device 3a (3b) is measured and the measurement data D1a (D1b) is input. The control unit 15 stores the input measurement data D1a (D1b) in the internal memory together with the time data Dtm input from the clock unit 13. In this case, the time data Dtm is used as a time stamp indicating the time when the measurement data D1a (D1b) is measured.
[0019]
Furthermore, the control unit 15 periodically communicates with the master station 2 via the communication unit 14, so that the measurement data D1a (D1b) and the measurement data D1a (D1b) for each measurement target device 3a (3b). Corresponding time data Dtm is transmitted to the master station 2. Further, each time the control unit 15 receives the reference time data Dtr from the master station 2, the control unit 15 compares the reference time data Dtr with the time data Dtm generated by the time data generation circuit 13b, and the two are different. In this case, by setting the reference time data Dtr in the time data generation circuit 13b, the time data Dtm generated by the time data generation circuit 13b is matched (corrected) with the reference time data Dtr. In addition to the correction to the time data Dtm of the time data generation circuit 13b, the control unit 15 adjusts the count value of the counter 13a (to be described later) in the master station 2 within a predetermined period Te (to be described later). 2) The specific count value Dcn2 is loaded into the counter 13a as the count value Dcnt at the timing of counting Dcn2, thereby correcting the count value of the time data generation circuit 13b to the specific count value Dcn2.
[0020]
Next, the configuration of the master station 2 will be specifically described. Note that the same components as those of the measurement apparatus (slave station) 1 are denoted by the same reference numerals, and redundant description is omitted.
[0021]
As shown in FIG. 1, the master station 2 includes a crystal oscillator 12, a clock unit 13, a communication unit 14, and a control unit 25. In this case, the control unit 25 is configured to include a CPU and an internal memory (not shown) as an example. In addition, the control unit 25 periodically communicates with the measurement device 1 via the communication unit 14, thereby measuring the measurement data D 1 a and D 1 b and the measurement data about the measurement target devices 3 a and 3 b transmitted by the measurement device 1. The time data Dtm for the data D1a and D1b is received and stored in the storage area for each measuring device 1a and 1b in the internal memory. In addition, the control unit 25 periodically or in response to a request from the management device stores measurement data D1a and D1b and measurement data D1a and D1b of the measurement target devices 3 stored in the internal memory. Dtm is transmitted to the management apparatus.
[0022]
Further, the control unit 25 inputs the time data Dtm from the time data generation circuit 13b of the clock unit 13 at every predetermined time Ta (for example, every 20 seconds) and uses the time data Dtm as the reference time data Dtr for each measuring device. 1 through the transmission path 4. In this case, the control unit 25 is shown in FIG. 2 when the accuracy (clock accuracy) of the crystal oscillator 12 in the measuring device 1 is ± Appm and the communication delay time between the master station 2 and the measuring device 1 is Td. As described above, the time Tc (= Ta × A + Td) has elapsed from the end of the generation of the reference clock CLK2 by the counter 13a, and the time Tc is traced back from the end of the generation of the next reference clock CLK2 by the counter 13a. The reference time data Dtr is transmitted at a timing when the count value of the counter 13a counts the specific count value Dcn1 (first specific count value) within a predetermined period Te that ends at. In the present embodiment, as the time Tc, for example, the accuracy of the crystal oscillator 12 is increased by ± 100 ppm, the predetermined time Ta is 20 seconds, and the communication delay time Td is 1 millisecond. The result is 3 milliseconds obtained by adding 1 millisecond of the communication delay time Td to 2 milliseconds which is the maximum value of the resulting time deviation. Further, since one cycle of the internal clock CLK1, which is the operation clock of the counter 13a, is 1 millisecond, the predetermined period Te is a period from when the count value of the counter 13a becomes 003 to 996 as shown in FIG. . Therefore, the specific count values Dcn1 and Dcn2 are any predetermined value from 003 to 996.
[0023]
Next, as an example, a time synchronization method in the measurement system MS will be described with reference to FIG. 2 with the specific count value Dcn1 set to 005 and the specific count value Dcn2 set to 009.
[0024]
In this measurement system MS, the master station 2 inputs time data Dtm from the time data generation circuit 13b of the clock unit 13 every predetermined time Ta (every 20 seconds), and uses the time data Dtm as reference time data Dtr. It transmits to each measuring device 1 via the transmission path 4. As an example, as shown in FIG. 2, when the time data Dtm generated by the clock unit 13 of the master station 2 ticks at 5:26:20 when the predetermined time Ta is reached, the control unit 25 of the master station 2 However, using the time data Dtm acquired from the time data generation circuit 13b as the reference time data Dtr, the reference time data Dtr is transmitted to each measuring device 1 in accordance with the timing when the count value of the counter 13a becomes the specific count value Dcn1 (005). To do.
[0025]
On the other hand, in each measuring device 1, the control unit 15 receives the reference time data Dtr via the transmission path 4 and the communication unit 14 after the communication delay time Td (1 millisecond) has elapsed since the transmission of the master station 2. In this case, when the first reference time data Dtr is received, the time data Dtm generated by the clock unit 13 on the measuring device 1 side is usually different from the reference time data Dtr. For this reason, the control unit 15 compares the received reference time data Dtr with the time data Dtm generated by the clock unit 13, and then sets the reference time data Dtr in the time data generation circuit 13b, thereby generating time data. The time data Dtm generated by the circuit 13b is matched (corrected) with the reference time data Dtr. On the other hand, when the second and subsequent reference time data Dtr is received, the amount of deviation between the time data Dtm generated by the clock unit 13 on the measuring device 1 side and the reference time data Dtr is caused by the clock accuracy of the crystal oscillator 12. It stops within 2 milliseconds, which is the maximum deviation. Accordingly, in normal times, the time data Dtm when the reference time data Dtr is received matches the reference time data Dtr. At this time, the control unit 15 sets the reference time data Dtr to the time data generation circuit 13b. Do not do.
[0026]
Next, the control unit 15 generates its own time data for the count value Dcnt (009) in accordance with the timing at which the counter 13a in the master station 2 counts the specific count value Dcn2 (009) having a value larger than the specific count value Dcn1. By loading the circuit 13b, the count value of the counter 13a is corrected to the count value Dcnt (009). Thereby, the time synchronization of the time data Dtm between each measuring device 1 and the master station 2 is completed. In this case, in the measurement apparatus 1, the control unit 15 uses the count value of the counter 13a at the timing of receiving the reference time data Dtr as a reference, and the difference between the specific count value Dcn1 (005) and the specific count value Dcn2 (009) When the count value of the counter 13a is increased by a count value (3 counts) obtained by subtracting a count value (1 count) corresponding to the communication delay time Td from the count value (4 counts), the time data generation circuit 13b is self-timed. A count value Dcnt (009) is set (loaded). Thereby, the load operation of the count value Dcnt (009) to the time data generation circuit 13b is performed at the timing when the count value of the counter 13a in the master station 2 counts the specific count value Dcn2 (009).
[0027]
Thus, according to the time synchronization method and the measurement system MS, the generation of the next reference clock CLK2 by the counter 13a is started from the time when the time Tc has elapsed from the end of the generation of the reference clock CLK2 by the counter 13a of the master station 2. The reference time data Dtr is given to the measuring device 1 at a predetermined timing within a predetermined period Te (the timing at which the count value of the counter 13a becomes the specific count value Dcn1) whose end point is a time point that is earlier than the time point Tc. The time data Dtm is transmitted every time Ta and the time data Dtm generated by the time data generation circuit 13b is different from the reference time data Dtr every time the measuring device 1 receives the reference time data Dtr. In addition to correcting to Dtr, the counter 13a in the master station 2 is counted By correcting the count value of the counter 13a in the measuring apparatus 1 to the specific count value Dcn2 at a timing when the value counts the predetermined specific count value Dcn2 within a predetermined period Te, the count value of the counter 13a of the measuring apparatus 1 is changed. The time data Dtm is not returned to the initial value 000 at which the time data Dtm is switched, or is not delayed beyond the switching point of the time data Dtm (for example, from 001 to 999), and conversely, the time data Dtm is switched. The time of the master station 2 and the time of the measuring device 1 can be synchronized with an accuracy within 1 millisecond without being advanced beyond the eyes (for example, from 998 to 001). In other words, the time data generation circuit 13b of the measuring device 1 reliably avoids the generation of the same time data Dtm twice (specifically, in the case of FIG. 2, 2 at 5:26:20 seconds 000 milliseconds). The measuring device 1 can be time-synchronized with the master station 2 with an accuracy of 1 millisecond or less (while reliably avoiding the generation of times). Therefore, according to this measurement system MS, it is possible to reliably avoid the problem that the measurement data D1 having the same time stamp coexists in each measurement device 1.
[0028]
(Second Embodiment)
In the above embodiment, the example in which the master station 2 and each measuring device 1 are time-synchronized with an accuracy within 1 millisecond has been described. However, in the measuring device 1, the measurement data D1 having the same time stamp coexists. The generation of an initial time difference Tb exceeding 1 millisecond between the master station and each measuring device may be permitted if at least the purpose of reliably avoiding is realized. Hereinafter, the measurement system MS1 that can have an arbitrary initial time difference Tb between the master station and the measurement device during time synchronization will be described. In addition, about the structure same as the said measurement system MS, the same code | symbol is attached | subjected and the overlapping description is abbreviate | omitted.
[0029]
The measurement system MS1 includes the same components as the measurement system MS. As shown in FIG. 1, the measurement devices 31a and 31b (hereinafter, not distinguished) are used as one or more (two as an example) slave stations. (Sometimes also referred to as “measuring device 31”) and a master station 41. In this case, the measuring device 31 is connected to the master station 41 via the transmission path 4, and the master station 41 is connected to the management apparatus via a transmission path (not shown).
[0030]
Next, each structure of each measuring device 31 and the master station 41 will be specifically described.
[0031]
As shown in FIG. 1, the measurement device 31 includes a measurement unit 11, a crystal oscillator 12, a clock unit 13, a communication unit 14, and a control unit 35. Here, the control unit 35 is different from the above-described master station 2 in some operations, and operates in other respects in the same manner. Specifically, when receiving the reference time data Dtr from the master station 41, the control unit 35 adds the number of clocks (count value) of the internal clock CLK1 corresponding to the initial time difference Tb to the specific count value Dcn2 and counts it. Time data generation is performed by calculating the value Dcnt and loading the count value Dcnt into the counter 13a at the timing when the count value of the counter 13a in the master station 41 counts the specific count value Dcn2 defined in advance within a predetermined period Te. It differs from the control unit 15 in that the count value of the circuit 13b is corrected to the count value Dcnt.
[0032]
Next, the configuration of the master station 41 will be specifically described.
[0033]
As shown in FIG. 1, the master station 41 includes a crystal oscillator 12, a clock unit 13, a communication unit 14, and a control unit 45. In this case, the control unit 45 measures the accuracy (clock accuracy) of the crystal oscillator 12 in the measuring device 31 to ± Appm, the initial time difference between the time data Dtm of the master station 41 and the measuring device 31 to Tb, and measures with the master station 41. When the communication delay time with the device 31 is Td, as shown in FIG. 3, the accuracy (clock accuracy) of the crystal oscillator 12 in the measuring device 1 is ± A ppm, and between the master station 2 and the measuring device 1 , When the time Tc (= Ta × A + Tb + Td) has elapsed from the end of generation of the reference clock CLK2 by the counter 13a, and the end of generation of the next reference clock CLK2 by the counter 13a The count value of the counter 13a counts the specific count value Dcn1 within a predetermined period Te that ends at a time point that is back from the time point Tc. Transmitting a reference time data Dtr at a timing. In the present embodiment, as an example, the time Tc is a measuring device with respect to the accuracy of the crystal oscillator 12 ± 100 ppm, the predetermined time Ta is 20 seconds, the communication delay time Td is 1 millisecond, and the time of the master station 41. When the time 31 is delayed by 2 milliseconds, the initial time difference Tb is set to 2 milliseconds (when the time is advanced, the initial time difference Tb is set to -2 milliseconds), thereby obtaining 5 milliseconds. Therefore, the predetermined period Te is a period until the count value of the counter 13a becomes 005 to 994 as shown in FIG. Therefore, the specific count values Dcn1 and Dcn2 are any predetermined value from 005 to 994.
[0034]
Next, as an example, the time synchronization method in the measurement system MS1 will be described with reference to FIG. 3 with the specific count value Dcn1 set to 006 and the specific count value Dcn2 set to 009.
[0035]
In the measurement system MS1, the master station 41 inputs time data Dtm from the time data generation circuit 13b of the clock unit 13 every predetermined time Ta (every 20 seconds), and uses the time data Dtm as reference time data Dtr. It transmits to each measuring device 1 via the transmission path 4. As an example, as shown in FIG. 3, when the time data Dtm generated by the clock unit 13 of the master station 41 ticks at 5:26:20 when it reaches a predetermined time Ta, the control unit 45 of the master station 41. However, the time data Dtm acquired from the time data generation circuit 13b is set as the reference time data Dtr, and the reference time data Dtr is transmitted to each measuring device 1 in accordance with the timing when the count value of the counter 13a becomes the specific count value Dcn1 (006). To do.
[0036]
On the other hand, in each measuring device 31, the control unit 35 receives the reference time data Dtr after the communication delay time Td (1 millisecond) has elapsed since the transmission of the master station 41. In this case, when the first reference time data Dtr is received, similarly to the measurement system MS, the control unit 35 sets the reference time data Dtr in the time data generation circuit 13b and generates it by the time data generation circuit 13b. Time data Dtm to be matched with the reference time data Dtr (corrected). On the other hand, at the normal time when the second or later reference time data Dtr is received, the time data Dtm when the reference time data Dtr is received matches the reference time data Dtr. The reference time data Dtr is not set for the data generation circuit 13b.
[0037]
Next, the control unit 35 adds the number of clocks (−2 clocks) of the internal clock CLK1 corresponding to the initial time difference Tb (2 millisecond delay) to the specific count value Dcn2 (009), thereby adding the count value Dcnt (009-002). = 007) is calculated. Next, similarly to the control unit 25 in the measurement system MS, the control unit 35 sets the count value Dcnt (007) to its own timing in accordance with the timing at which the counter 13a in the master station 41 counts the specific count value Dcn2 (009). By loading into the time data generation circuit 13b, the count value of the counter 13a is corrected to the count value Dcnt (007). Thereby, the time synchronization of the time data Dtm between each measuring device 31 and the master station 41 is completed.
[0038]
Thus, according to this time synchronization method and measurement system MS1, an arbitrary initial time difference Tb can be provided between the time of the master station 41 and the time of the measurement device 31 during time synchronization. Therefore, it is possible to perform time synchronization with a time difference between the times of the plurality of measuring devices 31. Note that, by setting the initial time difference Tb to zero, the time of the master station 41 and the time of the measuring device 31 can be time-synchronized with an accuracy within 1 millisecond, as in the measurement system MS.
[0039]
The present invention is not limited to the embodiment described above. For example, as an example, the internal clock CLK1 generated by the crystal oscillator 12 has a period of 1 millisecond, but the present invention is not limited to this, and can be defined to have a shorter period or a longer period. . Further, in the embodiment of the present invention, the recording / reproducing apparatus 1 (or 31) is configured by including the clock unit 13 independent of the control unit 15 (or 35), and separately from the control unit 25 (or 45). The example in which the master station 2 (or 41) is configured by including the independent clock unit 13 has been described, but the configuration of the clock unit in the present invention (the configuration of the entire clock unit or the configuration of some functions in the clock unit ( For example, regarding the configuration of the counter and the time data generation circuit)), a configuration in which the CPU in the control unit 15 (or 25, 35, 45) is realized by software using an internal clock or an external clock, instead of the hardware thereof Can also be adopted.
[0040]
【The invention's effect】
As described above, according to the time synchronization method and the communication system according to claims 1 and 3, the master station sets the accuracy of the oscillator in the slave station to ± Appm, and the communication delay time between the master station and the slave station. When Td is set, at every predetermined time Ta, with respect to the end of the generation of the next reference clock by the counter, starting from the time when the time Tc (= Ta × A + Td) has elapsed from the end of the generation of the reference clock by the counter of the master station The time data as the reference time data indicating the reference time is transmitted toward the slave station at a predetermined timing within a predetermined period whose end point is the time point Tc, and the slave station transmits the reference data transmitted by the master station. Whenever time data is received, when the time data generated by the time data generation circuit is different from the reference time data, the time data is corrected to the reference time data and The count value of the counter in the clock unit as the slave station is corrected by correcting the count value of the counter in the slave station to the specific count value at the timing when the count value of the counter counts a predetermined specific count value within a predetermined period. However, the parent data is not restored to the initial value at which the time data is switched, is not delayed beyond the time data switching point, and is not advanced beyond the time data switching point. The time of the clock unit as a station and the time of the clock unit as a slave station can be synchronized with accuracy within one clock of the internal clock. Therefore, it is possible to reliably prevent a malfunction in which the time data generation circuit in the clock unit as a slave station generates the same time data twice due to time synchronization.
[0041]
According to the time synchronization method and the communication system according to claims 2 and 4, the master station sets the accuracy of the oscillator in the slave station to ± Appm, and sets the initial time difference between the time data of the master station and the slave station to Tb, In addition, when the communication delay time between the master station and the slave station is Td, the elapsed time of time Tc (= Ta × A + Tb + Td) from the end of the generation of the reference clock by the counter of the master station is set every predetermined time Ta. Time data as reference time data indicating a reference time at a predetermined timing within a predetermined period whose end point is a time point that is traced back from the time point when the next reference clock is generated by the counter as a starting point is directed to the slave station. When the time data generated by the time data generation circuit is different from the reference time data every time the slave station transmits the reference time data transmitted by the parent station The time data is corrected to the reference time data, and the counter value in the slave station corresponds to the initial time difference Tb at the timing when the count value of the counter in the master station counts a predetermined specific count value within a predetermined period. By correcting the number of clocks to the count value added to the specific count value, the count value of the counter in the clock unit as the slave station is returned to the initial value at which the time data is switched, and further the time data is switched. The time of the clock unit as the master station and the time of the clock unit as the slave station are set to one of the internal clocks without being delayed over, and conversely without being advanced beyond the switching point of the time data. It can be synchronized with accuracy within the clock. Therefore, the time data generation circuit in the clock unit as a slave station reliably prevents the malfunction of generating the same time data twice, and performs time synchronization with a time difference between the plurality of slave stations. You can also.
[0042]
Further, according to the communication system according to claim 5, even when time synchronization is performed, the time data generation circuit of the clock unit as a slave station does not generate the same time data twice, so the measurement data of the same time stamp Can be reliably prevented from being transmitted to the master station.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a measurement system MS (MS1), a measurement device 1 (31), and a master station 2 (41) as a communication system.
FIG. 2 is a timing chart for explaining time synchronization processing in the measurement system MS.
FIG. 3 is a timing chart for explaining another time synchronization process in the measurement system MS1.
[Explanation of symbols]
1a, 1b, 31a, 31b Measuring device (slave station)
2,41 Master station
3a, 3b Measurement target equipment
4 transmission lines
11 Measuring unit
12 Crystal oscillator
13 Clock part
13a counter
13b Time data generation circuit
14 Communication Department
15, 25, 35, 45 Control unit
CLK1 Internal clock
CLK2 reference clock
Dcn1, Dcn2 specific count value
Dcnt count value
Dtm time data
Dtr reference time data
MS, MS1 measurement system
Te predetermined period

Claims (5)

発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路をそれぞれ備えた複数の時計部の当該各時刻を同期させる時刻同期方法であって、
前記複数の時計部の内の任意の一の時計部を親局とし、かつ他の前記時計部を子局として、当該子局における前記発振器の精度を±Appm、および当該親局と当該子局との間の通信遅延時間をTdとしたときに、所定時間Ta毎に、当該親局の前記カウンタによる前記基準クロックの生成終了時点から時間Tc(=Ta×A+Td)の経過時点を起点として当該カウンタによる次の前記基準クロックの生成終了時点に対して時間Tcを遡った時点を終点とする所定期間内の所定のタイミングにおいて基準時刻を示す基準時刻データとしての前記時刻データを当該親局から当該子局に向けて送信させ、
前記子局に対して、前記親局によって送信された前記基準時刻データを受信する都度、前記時刻データ生成回路によって生成される前記時刻データが当該基準時刻データと相違するときに当該時刻データを当該基準時刻データに修正させると共に前記親局における前記カウンタのカウント値が前記所定期間内の予め規定された特定カウント値をカウントするタイミングで当該子局における前記カウンタのカウント値を当該特定カウント値に修正させることにより、当該子局における前記時計部の前記時刻を前記親局の前記時刻に同期させる時刻同期方法。
A plurality of timepieces each provided with a counter that counts the internal clock generated by the oscillator and outputs a reference clock when a predetermined value is reached, and a time data generation circuit that generates time data indicating the time based on the reference clock A time synchronization method for synchronizing the respective times of the parts,
Arbitrary one of the plurality of clock units is a master station, and the other clock unit is a slave station, the accuracy of the oscillator in the slave station is ± Appm, and the master station and the slave station When the communication delay time between the base station and the base station is Td, the time Tc (= Ta × A + Td) has elapsed from the end of the generation of the reference clock by the counter of the master station at every predetermined time Ta. The time data as the reference time data indicating the reference time at a predetermined timing within a predetermined period whose end point is a time point that is traced back from the time point when the next generation of the reference clock by the counter is completed is received from the master station. Send it to the slave station,
Whenever the slave station receives the reference time data transmitted by the master station, the time data generated by the time data generation circuit is different from the reference time data. The count value of the counter in the master station is corrected to the specific count value at the timing when the count value of the counter in the master station counts a specific count value defined in advance within the predetermined period. A time synchronization method for synchronizing the time of the clock unit in the slave station with the time of the master station.
発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路をそれぞれ備えた複数の時計部の当該各時刻を同期させる時刻同期方法であって、
前記複数の時計部の内の任意の一の時計部を親局とし、かつ他の前記時計部を子局として、当該子局における前記発振器の精度を±Appm、当該親局および当該子局の前記各時刻データ相互間の初期時間差をTb、並びに当該親局と当該子局との間の通信遅延時間をTdとしたときに、所定時間Ta毎に、当該親局の前記カウンタによる前記基準クロックの生成終了時点から時間Tc(=Ta×A+Tb+Td:Tcは正の時間とする)の経過時点を起点として当該カウンタによる次の前記基準クロックの生成終了時点に対して時間Tcを遡った時点を終点とする所定期間内の所定のタイミングにおいて基準時刻を示す基準時刻データとしての前記時刻データを当該親局から当該子局に向けて送信させ、
前記子局に対して、前記親局によって送信された前記基準時刻データを受信する都度、前記時刻データ生成回路によって生成される前記時刻データが当該基準時刻データと相違するときに当該時刻データを当該基準時刻データに修正させると共に前記親局における前記カウンタのカウント値が前記所定期間内の予め規定された特定カウント値をカウントするタイミングで当該子局における前記カウンタのカウント値を前記初期時間差Tbに対応する前記内部クロックの数を当該特定カウント値に加算したカウント値に修正させることにより、当該子局における前記時計部の前記時刻を前記親局の前記時刻に同期させる時刻同期方法。
A plurality of timepieces each provided with a counter that counts the internal clock generated by the oscillator and outputs a reference clock when a predetermined value is reached, and a time data generation circuit that generates time data indicating the time based on the reference clock A time synchronization method for synchronizing the respective times of the parts,
Arbitrary one of the plurality of clock units is a master station, and the other clock unit is a slave station, the accuracy of the oscillator in the slave station is ± Appm, the master station and the slave station When the initial time difference between the time data is Tb and the communication delay time between the master station and the slave station is Td, the reference clock by the counter of the master station is set every predetermined time Ta. From the time when the time Tc (= Ta × A + Tb + Td: Tc is a positive time) from the time when the generation of the clock is started, the time when the time Tc is traced back to the time when the generation of the next reference clock by the counter is started The time data as reference time data indicating a reference time at a predetermined timing within a predetermined period is transmitted from the parent station to the child station,
Whenever the slave station receives the reference time data transmitted by the master station, the time data generated by the time data generation circuit is different from the reference time data. Corresponding to the initial time difference Tb, the count value of the counter in the slave station is corrected to the reference time data and the count value of the counter in the master station counts a predetermined specific count value within the predetermined period. A time synchronization method for synchronizing the time of the clock unit in the slave station with the time of the master station by correcting the number of the internal clocks to a count value added to the specific count value.
発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路を含む時計部を備えた子局と、当該子局と伝送路を介して接続されると共に発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路を含む時計部を備えた親局とを有し、前記子局と前記親局との間でデータ通信可能に構成された通信システムであって、
前記親局は、前記子局における前記発振器の精度を±Appm、および当該親局と当該子局との間の通信遅延時間をTdとしたときに、所定時間Ta毎に、当該親局の前記カウンタによる前記基準クロックの生成終了時点から時間Tc(=Ta×A+Td)の経過時点を起点として当該カウンタによる次の前記基準クロックの生成終了時点に対して時間Tcを遡った時点を終点とする所定期間内の所定のタイミングにおいて基準時刻を示す基準時刻データとしての前記時刻データを当該子局に向けて送信可能に構成され、
前記子局は、前記親局によって送信された前記基準時刻データを受信する都度、前記時刻データ生成回路によって生成される前記時刻データが当該基準時刻データと相違するときに当該時刻データを当該基準時刻データに修正すると共に前記親局における前記カウンタのカウント値が前記所定期間内の予め規定された特定カウント値をカウントするタイミングで当該子局における前記カウンタのカウント値を当該特定カウント値に修正する通信システム。
A counter unit that counts an internal clock generated by an oscillator and outputs a reference clock when a predetermined value is reached, and a clock unit including a time data generation circuit that generates time data indicating time based on the reference clock A slave station, a counter connected to the slave station via a transmission line and counting an internal clock generated by an oscillator and outputting a reference clock when a predetermined value is reached, and a time based on the reference clock A communication system configured to be capable of data communication between the slave station and the master station, the master station having a clock unit including a time data generation circuit that generates time data generation circuit,
When the accuracy of the oscillator in the slave station is ± Appm and the communication delay time between the master station and the slave station is Td, the master station has the master station at a predetermined time Ta. Predetermined from the time point when time Tc (= Ta × A + Td) has elapsed from the end point of generation of the reference clock by the counter as the starting point, the point of time Tc going back to the end point of generation of the next reference clock by the counter The time data as the reference time data indicating the reference time at a predetermined timing within the period is configured to be transmitted toward the slave station,
Each time the slave station receives the reference time data transmitted by the master station, the time data generated by the time data generation circuit differs from the reference time data when the time data is generated. Communication that corrects the count value of the counter at the master station to the specific count value at a timing when the count value of the counter at the master station counts a specific count value defined in advance within the predetermined period. system.
発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路を含む時計部を備えた子局と、当該子局と伝送路を介して接続されると共に発振器によって生成される内部クロックをカウントして所定値に達したときに基準クロックを出力するカウンタおよび前記基準クロックに基づいて時刻を示す時刻データを生成する時刻データ生成回路を含む時計部を備えた親局とを有し、前記子局と前記親局との間でデータ通信可能に構成された通信システムであって、
前記親局は、前記子局における前記発振器の精度を±Appm、当該親局および当該子局の前記各時刻データ相互間の初期時間差をTb、並びに当該親局と当該子局との間の通信遅延時間をTdとしたときに、所定時間Ta毎に、当該親局の前記カウンタによる前記基準クロックの生成終了時点から時間Tc(=Ta×A+Tb+Td:Tcは正の時間とする)の経過時点を起点として当該カウンタによる次の前記基準クロックの生成終了時点に対して時間Tcを遡った時点を終点とする所定期間内の所定のタイミングにおいて基準時刻を示す基準時刻データとしての前記時刻データを当該子局に向けて送信可能に構成され、
前記子局は、前記親局によって送信された前記基準時刻データを受信する都度、前記時刻データ生成回路によって生成される前記時刻データが当該基準時刻データと相違するときに当該時刻データを当該基準時刻データに修正すると共に前記親局における前記カウンタのカウント値が前記所定期間内の予め規定された特定カウント値をカウントするタイミングで当該子局における前記カウンタのカウント値を前記初期時間差Tbに対応する前記内部クロックの数を当該特定カウント値に加算したカウント値に修正する通信システム。
A counter unit that counts an internal clock generated by an oscillator and outputs a reference clock when a predetermined value is reached, and a clock unit including a time data generation circuit that generates time data indicating time based on the reference clock A slave station, a counter connected to the slave station via a transmission line and counting an internal clock generated by an oscillator and outputting a reference clock when a predetermined value is reached, and a time based on the reference clock A communication system configured to be capable of data communication between the slave station and the master station, the master station having a clock unit including a time data generation circuit that generates time data generation circuit,
The master station has an accuracy of the oscillator in the slave station of ± A ppm, an initial time difference between the time data of the master station and the slave station, Tb, and communication between the master station and the slave station When the delay time is Td, an elapse point of time Tc (= Ta × A + Tb + Td: Tc is a positive time) from the end point of generation of the reference clock by the counter of the master station every predetermined time Ta. The time data as the reference time data indicating the reference time at a predetermined timing within a predetermined period whose end point is a time point that is earlier than the time point when the next generation of the reference clock by the counter is ended as a starting point is the child Configured to transmit to the station,
Each time the slave station receives the reference time data transmitted by the master station, the time data generated by the time data generation circuit differs from the reference time data when the time data is generated. The count value of the counter in the master station corresponds to the initial time difference Tb at the timing when the count value of the counter in the master station counts a specific count value defined in advance within the predetermined period. A communication system for correcting the number of internal clocks to a count value obtained by adding to the specific count value.
前記子局は、計測対象についてのパラメータを計測して計測データを取得する計測部と、前記計測データを入力すると共に当該計測データを通信部を経由して通信対象機器に送信する制御部とを備え、
前記制御部は、前記時計部によって生成される前記時刻データに基づいて前記計測データの計測時刻を特定すると共に、当該計測データを当該特定された計測時刻を示す時刻データと共に前記親局に前記伝送路を介して送信する請求項3または4記載の通信システム。
The slave station includes a measurement unit that measures parameters of a measurement target and acquires measurement data, and a control unit that inputs the measurement data and transmits the measurement data to a communication target device via a communication unit. Prepared,
The control unit specifies a measurement time of the measurement data based on the time data generated by the clock unit, and transmits the measurement data to the master station together with time data indicating the specified measurement time. The communication system according to claim 3 or 4, wherein the communication is performed via a path.
JP2003110526A 2003-04-15 2003-04-15 Time synchronization method and communication system Expired - Fee Related JP4230808B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003110526A JP4230808B2 (en) 2003-04-15 2003-04-15 Time synchronization method and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003110526A JP4230808B2 (en) 2003-04-15 2003-04-15 Time synchronization method and communication system

Publications (2)

Publication Number Publication Date
JP2004320350A JP2004320350A (en) 2004-11-11
JP4230808B2 true JP4230808B2 (en) 2009-02-25

Family

ID=33471360

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003110526A Expired - Fee Related JP4230808B2 (en) 2003-04-15 2003-04-15 Time synchronization method and communication system

Country Status (1)

Country Link
JP (1) JP4230808B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2224232A1 (en) 2009-02-27 2010-09-01 Hitachi Automotive Systems, Ltd. Measurement element

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8630314B2 (en) * 2010-01-11 2014-01-14 Faro Technologies, Inc. Method and apparatus for synchronizing measurements taken by multiple metrology devices
EP2533022A1 (en) * 2011-06-10 2012-12-12 Hexagon Technology Center GmbH Extremely precise synchronised measuring value recording

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2224232A1 (en) 2009-02-27 2010-09-01 Hitachi Automotive Systems, Ltd. Measurement element

Also Published As

Publication number Publication date
JP2004320350A (en) 2004-11-11

Similar Documents

Publication Publication Date Title
US11177896B2 (en) Time synchronization device and time synchronization method
JP4185926B2 (en) Robot cooperative control method and system
EP3531610B1 (en) Frequency synchronization method and slave clock
US11303376B2 (en) Information processing apparatus and time synchronization method
CN110413042B (en) Clock server, and time keeping frequency compensation method and device
US11310026B2 (en) Communication system, communication device, and program
US11277253B2 (en) Time synchronization system, master device, slave device, and program
WO2022186375A1 (en) Voltage measurement system
JP4261500B2 (en) Control system
CN106576038A (en) Network system, time master station, and time slave station
JP4230808B2 (en) Time synchronization method and communication system
JP2004056464A (en) Frequency correction circuit
US12130653B2 (en) Delay time detection circuit, stamping information generation device, and delay time detection method
JP5407568B2 (en) Sync signal generating apparatus and sync signal generating method
JP4616054B2 (en) Measuring system
CN113359948A (en) Time synchronization device and synchronization method
JPH11305812A (en) Synchronization method for distributed CPU system
JP4016753B2 (en) Time synchronization apparatus for information processing apparatus
JP2015059851A (en) Time correction device, time correction method, and computer program
EP3814868B1 (en) Precision timing between systems
RU2511596C2 (en) Time synchronisation in automated devices
JP6627958B1 (en) Communications system
TWI809564B (en) Synchronization correction method, master device and slave device
JP2766838B2 (en) Time data receiving device
JPH07141307A (en) Synchronization circuit for multiprocessor system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060411

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080612

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: 20081202

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081204

R150 Certificate of patent or registration of utility model

Ref document number: 4230808

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131212

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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