JPH10228330A - Time correction system for computer - Google Patents

Time correction system for computer

Info

Publication number
JPH10228330A
JPH10228330A JP9033399A JP3339997A JPH10228330A JP H10228330 A JPH10228330 A JP H10228330A JP 9033399 A JP9033399 A JP 9033399A JP 3339997 A JP3339997 A JP 3339997A JP H10228330 A JPH10228330 A JP H10228330A
Authority
JP
Japan
Prior art keywords
time
computer
internal clock
time information
correction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9033399A
Other languages
Japanese (ja)
Inventor
Yasushi Tateishi
靖 立石
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP9033399A priority Critical patent/JPH10228330A/en
Publication of JPH10228330A publication Critical patent/JPH10228330A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a time correction system capable of preventing the generation of an error in time correction due to delay in time notification. SOLUTION: In order to recognize a time inquiry delay from time for a time information request and time for a time response and add the recognized delay to time correction judgement, a computer previously records (S1) the time A of its internal clock at the time of transmitting the time information request, records (S3) current time information B received from a master computer and the time C of the internal clock at the time of receiving the information B, and when time (C-A) from the transmission of the time information request up to its reception is included within fixed time (S2) and the time C does not satisfy the relation of B<(A-α) or B>(C+α) (provided that α is allowable error time), time correction is not executed (S4). The relation of the inequality is satisfied, the time of the internal clock is corrected to B+(C-A)/2) (S5).

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータの内
部時計の時刻をネットワーク上の標準時計から得る時刻
情報で修正する時刻修正方式に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a time correction method for correcting the time of an internal clock of a computer with time information obtained from a standard clock on a network.

【0002】[0002]

【従来の技術】電力系統の監視制御システムなど、コン
ピュータ同士をネットワーク結合したシステムにおい
て、各コンピュータに搭載する各種の機能は時刻に従っ
たスケジュール処理をすることが多く、各コンピュータ
の内部時計が互いに一致していることがシステム運用上
で重要となる。このため、各コンピュータは、その内部
時計をホストコンピュータ等のマスタコンピュータが持
つ標準時計に一致させておく時刻修正機構が設けられ
る。
2. Description of the Related Art In a system in which computers are connected to each other in a network, such as a power system monitoring and control system, various functions mounted on each computer often perform schedule processing according to time, and the internal clocks of the computers are mutually synchronized. Matching is important in system operation. For this reason, each computer is provided with a time correction mechanism for keeping its internal clock in line with the standard clock of a master computer such as a host computer.

【0003】この時刻修正機構は、標準時計を持つマス
タコンピュータからスレーブ側になる各コンピュータに
一斉同報で送信する方式と、各コンピュータがマスタコ
ンピュータに時刻情報の送信を要求したときにマスタコ
ンピュータが現在時刻情報を当該コンピュータに送信す
る方式がある。
[0003] This time correction mechanism is a method of transmitting a broadcast from a master computer having a standard clock to each computer on the slave side simultaneously, and a method in which the master computer transmits the time information to the master computer when the master computer requests the master computer to transmit the time information. There is a method of transmitting current time information to the computer.

【0004】[0004]

【発明が解決しようとする課題】従来の時刻修正方式の
うち、一斉同報方式では、時刻情報を受信した各コンピ
ュータが別のスケジュール処理を実行中である場合が多
く、時刻修正処理と別のスケジュール処理との競合が生
じる。
Among the conventional time correction methods, in the broadcast method, each computer receiving the time information is often executing a different schedule process, so that a different schedule process is performed. Conflict with schedule processing occurs.

【0005】この点、各コンピュータが個別に時刻を問
い合わせる方式は、スケジュール処理との競合を簡単に
回避できる。しかしながら、マスタコンピュータと各コ
ンピュータとの間の時刻情報要求の送信とこれに対する
応答のやり取りになるため、ネットワークの伝送負荷に
よる時刻通知の遅れ、及びマスタコンピュータ側の負荷
による時刻通知の遅れが生じ、各コンピュータの内部時
計に時刻ずれが生じてしまう。
[0005] In this respect, the method in which each computer inquires the time individually can easily avoid the conflict with the schedule processing. However, transmission of a time information request between the master computer and each computer and exchange of a response to the time information request cause a delay in time notification due to a network transmission load, and a delay in time notification due to a load on the master computer side. Time lag occurs in the internal clock of each computer.

【0006】本発明の目的は、時刻通知の遅れによる時
刻修正の誤りを防止した時刻修正方式を提供することに
ある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a time adjustment method for preventing an error in time adjustment due to a delay in time notification.

【0007】[0007]

【課題を解決するための手段】本発明は、時刻情報要求
時の時刻と、時刻応答時の時刻から時刻問い合わせの遅
れを認識し、これを時刻修正の判断に加えることで時刻
ずれを防止するものであり、以下の方式を特徴とする。
SUMMARY OF THE INVENTION The present invention recognizes a delay in a time inquiry from the time when a time information request is made and the time when a time response is made, and prevents the time lag by adding this to the determination of time correction. And is characterized by the following method.

【0008】標準時計を持つネットワーク上のマスタコ
ンピュータに対してコンピュータが時刻情報の送信を要
求し、この要求で前記マスタコンピュータが現在時刻情
報を当該コンピュータに送信し、この時刻情報を受信し
たコンピュータがその内部時計の時刻を修正する時刻修
正方式において、前記コンピュータは、時刻情報要求の
送信時にその内部時計の時刻Aを記録しておき、前記マ
スタコンピュータから受信した現在時刻情報Bを記録及
び該時刻情報Bを受信したときの内部時計の時刻Cを記
録し、時刻情報要求の送信から受信までの時間(C−
A)が一定時間内になりかつこれら時刻A,B,Cが次
式、
[0008] The computer requests the master computer on the network having a standard clock to transmit time information. In response to the request, the master computer transmits the current time information to the computer, and the computer receiving the time information transmits the time information to the computer. In the time correction method for correcting the time of the internal clock, the computer records the time A of the internal clock when transmitting the time information request, records the current time information B received from the master computer, and The time C of the internal clock at the time of receiving the information B is recorded, and the time from transmission to reception of the time information request (C-
A) is within a certain period of time, and these times A, B, and C are

【0009】[0009]

【数2】B<(A−α) 又は B>(C+α) 但し、αは許容誤差時間の関係にないときには内部時計
の時刻修正を行わず、この関係にあるときに内部時計を
(B+(C−A)/2)に時刻修正する手段を備えたこ
とを特徴とする。
B <(A-α) or B> (C + α) where α is not corrected when the internal clock is not in the relation of the allowable error time, and the internal clock is changed to (B + ( CA) / 2) is provided with means for adjusting the time.

【0010】[0010]

【発明の実施の形態】図1は、本発明の実施形態を示す
時刻修正処理フローである。以下、各処理手順を詳細に
説明する。なお、標準時計を持つコンピュータをマスタ
コンピュータと呼ぶ。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a time correction processing flow showing an embodiment of the present invention. Hereinafter, each processing procedure will be described in detail. A computer having a standard clock is called a master computer.

【0011】(S1)内部時計の時刻修正のための時刻
情報を得るスレーブ側のコンピュータは、一定周期又は
定められた時刻に時刻修正処理を開始し、標準時計を持
つものとして登録されたマスタコンピュータへ時刻情報
の要求を送信すると共に、送信時の内部時計の時刻Aを
記録しておく。
(S1) The slave computer that obtains time information for time correction of the internal clock starts time correction processing at a fixed period or a predetermined time, and the master computer registered as having a standard clock. And a time A of the internal clock at the time of transmission is recorded.

【0012】この時刻情報要求を受信したマスタコンピ
ュータは、標準時計の現在の時刻Bになる時刻情報を時
刻情報要求コンピュータに送信する。
The master computer which has received the time information request transmits time information which becomes the current time B of the standard clock to the time information requesting computer.

【0013】(S2)時刻情報の要求送信に対してマス
タコンピュータからの時刻情報受信を待ち、タイマに予
め設定しておいた時間内に時刻情報を受信したか否かを
判定する。なお、タイマは、時刻修正処理開始時に計時
を開始しておく。また、タイマのタイムアウト回数をカ
ウントする受信タイムアウトカウンタを用意しておく。
(S2) In response to the transmission of the request for the time information, the reception of the time information from the master computer is waited, and it is determined whether or not the time information has been received within the time set in advance in the timer. The timer starts counting when the time adjustment process starts. Also, a reception timeout counter for counting the number of timeouts of the timer is prepared.

【0014】(S3)タイマの時間内にマスタコンピュ
ータから時刻情報を受信した場合、内部時計の時刻Cを
記録する。また、受信時刻情報(データ)の時刻Bを記
録する。さらに、受信タイムアウトカウンタをクリアす
る。
(S3) When the time information is received from the master computer within the time of the timer, the time C of the internal clock is recorded. Also, the time B of the reception time information (data) is recorded. Further, the reception timeout counter is cleared.

【0015】(S4)記録時刻A,B,Cが次式の関係
になるか否かを判定し、この関係が成立しないときは内
部時計の時刻修正をすることなく、今回の時刻修正処理
を終了する。
(S4) It is determined whether or not the recording times A, B, and C satisfy the following relationship. If this relationship does not hold, the current time adjustment process is performed without adjusting the time of the internal clock. finish.

【0016】[0016]

【数3】 B<(A−α) 又は B>(C+α) …(1) 但し、αは不感帯(許容誤差範囲)としての時間。## EQU00003 ## B <(A-.alpha.) Or B> (C + .alpha.) (1) where .alpha. Is a time as a dead zone (allowable error range).

【0017】上記(1)式の意味は、図2に示す時間関
係に基づいている。同図の(a)において、コンピュー
タXが内部時計の時刻A=12時00分00秒に時刻情
報の送信要求をし、これをマスタコンピュータが伝送時
間T1だけ遅れて受信してその標準時計の現在時刻B=
12時00分03秒をコンピュータXに送信し、この時
刻情報BをコンピュータXが伝送時間T2だけ遅れて受
信し、このときの内部時計の時刻C=12時00分05
秒であった場合、伝送時間T1の遅れは時刻Bに反映さ
れるが、伝送時間T2の遅れは時刻Bに反映されない。
The meaning of the above equation (1) is based on the time relationship shown in FIG. In the figure (a), the standard clock computer X is a transmission request for the time information to the time A = 12: 00: 00 of the internal clock, receives this delayed master computer only transmission time T 1 Current time B =
Sends 00 minutes 03 seconds at 12 to the computer X, the time information B computer X received with a delay of transmission time T 2, the time C = 12 00 05 of the internal clock of the time
In the case of seconds, the delay of the transmission time T 1 is reflected at the time B, but the delay of the transmission time T 2 is not reflected at the time B.

【0018】したがって、コンピュータXは、内部時計
を時刻Bに時刻修正すると伝送時間T2だけ遅れてしま
う。この伝送時間T2はそのときの負荷状態やマスタコ
ンピュータの状況により変化するが、許容誤差範囲αの
範囲内にあるか否かを判定する。
Therefore, if the time of the internal clock is adjusted to the time B, the computer X is delayed by the transmission time T 2 . The transmission time T 2 are changed by the status of the load state and the master computer at that time but determines whether within tolerance range alpha.

【0019】そこで、コンピュータXは、時刻Bの受信
時の時刻Cが上記(1)式の関係にないときは、標準時
計と自己の内部時計との時刻のずれがないとして時刻修
正を行わない。図2の(a)の例では、不感帯時間αが
1秒とすれば、時刻B=12時00分03秒は、時刻
(A−α)=11時59分59秒より遅れ、時刻(C+
α)=12時00分06秒よりも進み、誤差範囲内にあ
るとしてその修正を行わない。
Therefore, when the time C at the time of receiving the time B is not in the relation of the above equation (1), the computer X determines that there is no time difference between the standard clock and its own internal clock and does not perform the time correction. . In the example of FIG. 2A, assuming that the dead zone time α is 1 second, the time B = 12: 00: 03 seconds is later than the time (A−α) = 11: 59: 59 seconds, and the time (C +
α) = 12: 00: 06, and the correction is not performed because it is within the error range.

【0020】(S5)図1における処理S4の判定で受
信時の時刻Cが上記(1)式の関係が成立する場合、コ
ンピュータは内部時計の時刻を次式に従って修正する。
(S5) If it is determined in step S4 in FIG. 1 that the time C at the time of reception satisfies the above equation (1), the computer corrects the time of the internal clock according to the following equation.

【0021】[0021]

【数4】修正時刻=B+(C−A)/2 …(2) この(2)式の意味は、図2の(b)にコンピュータY
が時刻修正する場合で示すように、時刻情報B=11時
59分50秒がコンピュータYが送信要求した時刻A=
12時00分00秒より進んでいた場合、(C−A)/
2の時間誤差があると予測してその修正を行う。
## EQU4 ## Correction time = B + (CA) / 2 (2) The meaning of the expression (2) is as follows.
, The time information B = 11: 59: 50 corresponds to the time A =
If the time has passed since 12:00:00, (CA) /
The correction is performed by predicting that there is a time error of 2.

【0022】逆に、時刻Bが時刻C=12時00分08
秒より遅れた12時00分10秒である場合も(C−
A)/2の時間誤差があると予測してその修正を行う。
Conversely, time B is time C = 12: 00: 08
If the time is 12:00:10 seconds later than the second (C-
A) It is predicted that there is a time error of / 2 and the correction is made.

【0023】これら時刻修正を繰り返すことにより、伝
送時間の存在にも、マスタコンピュータの標準時計の時
刻にスレーブ側のコンピュータの内部時計の時刻を近づ
けていく。
By repeating the time correction, the time of the internal clock of the slave computer is brought closer to the time of the standard clock of the master computer even if the transmission time exists.

【0024】(S6)判定処理S2において、タイマの
時限内に受信できないとき、受信タイムアウトとして受
信タイムアウトカウンタをインクリメント(+1)し、
このカウンタがエラー設定値を越えるときにエラー処理
を行う。
(S6) In the determination process S2, when reception is not possible within the time limit of the timer, the reception timeout counter is incremented (+1) as a reception timeout,
When this counter exceeds an error set value, error processing is performed.

【0025】(S7)カウンタの値がエラー設定値以下
の場合に、一定時間待って処理S1に戻り、再度の時刻
修正処理を開始する。
(S7) When the value of the counter is equal to or smaller than the error set value, the process returns to the process S1 after waiting for a predetermined time, and the time correction process is started again.

【0026】これら処理S6,S7は、マスタコンピュ
ータがビジー又は通信不能の場合に伝送時間が大きくな
り過ぎて時刻修正を誤るのを防止するためのものであ
り、次の時刻修正を待つことなく、受信タイムアウトカ
ウンタの設定回数だけ再度の時刻修正を行う。
These processes S6 and S7 are for preventing the transmission time from becoming too long and erroneously correcting the time when the master computer is busy or incapable of communication, without waiting for the next time correction. The time is adjusted again by the number of times set in the reception timeout counter.

【0027】[0027]

【発明の効果】以上のとおり、本発明によれば、時刻情
報要求時の時刻と、時刻応答時の時刻から時刻問い合わ
せの遅れを認識し、これを時刻修正の判断に加えるよう
にしたため、ネットワーク負荷あるいはマスタコンピュ
ータ負荷による時刻通知の遅れを補償した時刻修正がで
きる。
As described above, according to the present invention, the delay of the time inquiry is recognized from the time at the time information request and the time at the time response, and this is added to the determination of the time correction. The time can be adjusted to compensate for the time notification delay caused by the load or the master computer load.

【0028】また、時刻要求の送信から受信までの遅れ
が大きくなる場合には時刻修正を行わないことで修正時
刻の精度低下を防止できる。
In the case where the delay from transmission to reception of the time request becomes large, the time is not corrected, so that the accuracy of the corrected time can be prevented from lowering.

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

【図1】本発明の実施形態を示す時刻修正処理フロー。FIG. 1 is a time correction processing flow showing an embodiment of the present invention.

【図2】実施形態における時刻修正例。FIG. 2 is an example of time correction in the embodiment.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 標準時計を持つネットワーク上のマスタ
コンピュータに対してコンピュータが時刻情報の送信を
要求し、この要求で前記マスタコンピュータが現在時刻
情報を当該コンピュータに送信し、この時刻情報を受信
したコンピュータがその内部時計の時刻を修正する時刻
修正方式において、 前記コンピュータは、時刻情報要求の送信時にその内部
時計の時刻Aを記録しておき、前記マスタコンピュータ
から受信した現在時刻情報Bを記録及び該時刻情報Bを
受信したときの内部時計の時刻Cを記録し、時刻情報要
求の送信から受信までの時間(C−A)が一定時間内に
なりかつ時刻A,B,Cが次式、 【数1】B<(A−α) 又は B>(C+α) 但し、αは許容誤差時間の関係にないときには内部時計
の時刻修正を行わず、この関係にあるときに内部時計を
(B+(C−A)/2)に時刻修正する手段を備えたこ
とを特徴とするコンピュータの時刻修正方式。
1. A computer requests transmission of time information from a master computer on a network having a standard clock. In response to the request, the master computer transmits current time information to the computer and receives the time information. In the time correction method in which the computer corrects the time of the internal clock, the computer records the time A of the internal clock when transmitting the time information request, and records and records the current time information B received from the master computer. The time C of the internal clock when the time information B is received is recorded, the time (CA) from the transmission of the time information request to the reception thereof is within a predetermined time, and the times A, B, and C are represented by the following equations: B <(A−α) or B> (C + α) where α is not in the relation of the allowable error time, the time of the internal clock is not corrected, and this relation Time correction method of a computer, characterized in that it comprises means for time correction of the internal clock to the (B + (C-A) / 2) in a certain time.
JP9033399A 1997-02-18 1997-02-18 Time correction system for computer Pending JPH10228330A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9033399A JPH10228330A (en) 1997-02-18 1997-02-18 Time correction system for computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9033399A JPH10228330A (en) 1997-02-18 1997-02-18 Time correction system for computer

Publications (1)

Publication Number Publication Date
JPH10228330A true JPH10228330A (en) 1998-08-25

Family

ID=12385530

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9033399A Pending JPH10228330A (en) 1997-02-18 1997-02-18 Time correction system for computer

Country Status (1)

Country Link
JP (1) JPH10228330A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007226389A (en) * 2006-02-22 2007-09-06 Yokogawa Electric Corp Time synchronization abnormality detecting device and time synchronization abnormality detecting method
US8307120B2 (en) 2006-03-07 2012-11-06 Nec Corporation Resource information managing device, system, method, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007226389A (en) * 2006-02-22 2007-09-06 Yokogawa Electric Corp Time synchronization abnormality detecting device and time synchronization abnormality detecting method
US7990880B2 (en) 2006-02-22 2011-08-02 Yokogawa Electric Corporation Detector and method for detecting abnormality in time synchronization
US8307120B2 (en) 2006-03-07 2012-11-06 Nec Corporation Resource information managing device, system, method, and program
JP5093099B2 (en) * 2006-03-07 2012-12-05 日本電気株式会社 Resource information management apparatus, system, method, and program

Similar Documents

Publication Publication Date Title
US20200201798A1 (en) Time and event based message transmission
US5408506A (en) Distributed time synchronization system and method
US6959017B2 (en) Synchronizing system using IEEE 1394 serial bus standard
US5253252A (en) Token device for distributed time scheduling in a data processing system
EP1782559A1 (en) Method and apparatus for the synchronization of a system time of a communications network with a clock reference
Alves et al. Real-time communications over hybrid wired/wireless PROFIBUS-based networks
US20150242346A1 (en) Semiconductor data processing device, time-triggered communication system, and communication system
US7428608B2 (en) Communication system, communication circuit and communication method
US7304968B2 (en) Ad-hoc established device network
JPH10228330A (en) Time correction system for computer
US6434705B1 (en) Method and apparatus for interfacing isochronous communication systems
JP2003333048A (en) Mounted vehicle communication control system
JPH05189385A (en) Timer synchronization system in distributed processing environment system
JP2000224766A (en) Time synchronizing method in distributed power monitoring control system
JPH0160853B2 (en)
JPH10164666A (en) Time synchronizing method
JP3021588B2 (en) Information exchange system
Facchinetti et al. Wireless real-time communication protocol for cooperating mobile units
JP3623460B2 (en) Data transmission method using Ethernet between compact control stations
JPH07129523A (en) Network computer
JP2621779B2 (en) Connection test method for distributed system
JPH06348660A (en) Distributed processing network
JPH04936A (en) Local area network
JPH07131544A (en) Remote monitoring system
JPH0365702B2 (en)

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20050106

Free format text: JAPANESE INTERMEDIATE CODE: A621

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061227

A131 Notification of reasons for refusal

Effective date: 20070109

Free format text: JAPANESE INTERMEDIATE CODE: A131

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070508