JPH04253212A - Remote time setting system - Google Patents

Remote time setting system

Info

Publication number
JPH04253212A
JPH04253212A JP3009490A JP949091A JPH04253212A JP H04253212 A JPH04253212 A JP H04253212A JP 3009490 A JP3009490 A JP 3009490A JP 949091 A JP949091 A JP 949091A JP H04253212 A JPH04253212 A JP H04253212A
Authority
JP
Japan
Prior art keywords
time
station
data
slave station
master station
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3009490A
Other languages
Japanese (ja)
Inventor
Junko Nozaki
順子 野崎
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP3009490A priority Critical patent/JPH04253212A/en
Publication of JPH04253212A publication Critical patent/JPH04253212A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electric Clocks (AREA)

Abstract

PURPOSE:To make time exactly coincident between clocks of a master and that of a slave station without being affected by the delay of a communication line and the conversion processing time of a data. CONSTITUTION:A master station 10 transmits the data of time Ta to a slave station 20 when the time of a clock 12 is the Ta. This time data Ta is stored in a memory 13. The slave station 20 stores reception time Tb of a clock 22 receiving the data of the time Ta from the master station M10. A program memory 24 returns the time Tb stored in the memory 23 and time Te of the own station to the master station 10 as a data. The master station 10 stores time Tc receiving the returned data and calculates time Td by the arithmetic of Td=(Ta-Tb+Tc-Te)/2, and this is transferred through the communication line to the slave station 20. According to the time difference Td of reception, the slave station 20 resets the time of the timer 22 by processing programs in a CPU 21 and the program memory 24.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は遠隔時刻設定方式に関し
、特に主局と従局とが遅延のある通信回線で接続され、
主局の時計に従局の時計を合わせる遠隔時刻設定方式に
関する。
[Industrial Field of Application] The present invention relates to a remote time setting system, and in particular, in which a master station and a slave station are connected via a communication line with a delay.
This invention relates to a remote time setting method for setting the master station's clock and the slave station's clock.

【0002】0002

【従来の技術】図3は従来の遠隔時刻設定方式の一例の
システムブロック図である。
2. Description of the Related Art FIG. 3 is a system block diagram of an example of a conventional remote time setting method.

【0003】図3に示すように、内部に時計を持つ、主
局Mと、複数の従局S(1〜n)が、通信回線の遅延△
Tnを持つ通信回線で接続されており、従局Sの時計が
示す時刻を、それぞれT1〜TNとし、従局に通信回線
で、主局Mの時計T0の時刻を送ることにより従局の時
計T1〜TNの時刻を設定する。
As shown in FIG. 3, a master station M, which has an internal clock, and a plurality of slave stations S (1 to n) are connected to a communication line delay △.
The clocks of the slave stations S are connected by a communication line with Tn, and the time indicated by the clock of the slave station S is T1 to TN, respectively. By sending the time of the clock T0 of the master station M to the slave station via the communication line, the clocks of the slave station S are set as T1 to TN. Set the time.

【0004】以下に、従来例を図4を用いて説明する。 主局Mは時刻T0において時刻データT0を、遅延△T
nの通信回線を通じ従局Sに送る。従局Sでは、受け取
ったデータ値により、自分の時計の時刻TnをT0に設
定し直す(Tn→T0)。
A conventional example will be explained below using FIG. 4. The master station M transmits the time data T0 at time T0 with a delay △T
It is sent to the slave station S through the communication line of n. The slave station S resets the time Tn of its own clock to T0 based on the received data value (Tn→T0).

【0005】このようにして、各従局Sに対し、主局M
の時刻T0の順次設定していく。ただし、従局Sが時刻
TnをT0に設定し直した時、主局Mの時計では時刻は
、T0+△Tnになっており、△Tnの誤差の範囲で、
主局と同時刻に設定されたことになる。
In this way, for each slave station S, the master station M
The time T0 is sequentially set. However, when the slave station S resets the time Tn to T0, the time on the clock of the master station M is T0 + △Tn, and within the error range of △Tn,
This means that the time is set at the same time as the main station.

【0006】[0006]

【発明が解決しようとする課題】この従来の遠隔時刻設
定方式では、主局Mの時計の時刻T0と従局Sの時計の
時刻Tnが、△Tnの誤差をもって設定されることを考
慮しなければならない。すなわち、各従局Sの時刻T0
は、実際に主局Mの時計ではT0+△Tn時刻となり、
時刻差が△Tn発生する。例えば、各従局Sからデータ
を収集し、データを発生時刻付きで主局に通信回線を用
い送る場合において、従局Sにおいて同一時刻T0にデ
ータが発生したとしても、S(1)の時計ではT0−△
Tn、S(2)の時計ではT0−△Tnに発生したこと
になり、発生時刻の異なるデータとして、処理されると
いう問題点があり、この通信遅延△Tnは、測定時刻の
違いで変化する可能性があり、予め、△Tnを測定して
おき、設定時に考慮する、などの対策はとれないという
問題点があった。
[Problem to be Solved by the Invention] In this conventional remote time setting method, it must be taken into account that the time T0 of the clock of the master station M and the time Tn of the clock of the slave station S are set with an error of ΔTn. It won't happen. That is, the time T0 of each slave station S
is actually T0+△Tn time on the clock of main station M,
A time difference of ΔTn occurs. For example, when data is collected from each slave station S and sent to the master station with the time of occurrence using a communication line, even if the data is generated at the same time T0 at the slave station S, the clock at S(1) is at T0. −△
With the clock Tn, S(2), the occurrence occurs at T0-△Tn, and there is a problem in that it is processed as data with different occurrence times, and this communication delay △Tn changes depending on the difference in measurement time. There is a problem that it is not possible to take countermeasures such as measuring ΔTn in advance and taking it into consideration when making settings.

【0007】[0007]

【課題を解決するための手段】本発明の遠隔時刻設定方
式は、主局と複数の従局とが遅延のある回線で接続され
前記主局の時計に従局の時計を合わせる遠隔時刻設定方
式において、前記主局から時刻Taのデータを送出する
手段と、前記従局で前記回線からのデータが受信された
時刻Tbを記憶する手段と、前記従局の時刻Teと記憶
された時刻Tbとのデータを前記回線で前記主局に返送
する手段と、前記主局で返送されたデータが受信された
時刻Tc及び時刻Te,Thを記憶する手段と、前記時
刻Ta,Tb,Tc及びTeの関係により通信遅延を除
き前記主局と従局間の時刻のずれを補正時間Tdとして
算出する手段と、前記補正時間Tdをもとに前記従局の
時刻を補正する手段とを有する。
[Means for Solving the Problems] The remote time setting method of the present invention is a remote time setting method in which a master station and a plurality of slave stations are connected by a line with a delay, and the clock of the master station is adjusted to the clock of the slave stations. means for transmitting data at time Ta from the master station; means for storing time Tb at which the slave station received data from the line; and means for storing data at time Te at the slave station and the stored time Tb. A means for sending data back to the main station via a line, a means for storing the time Tc and times Te and Th at which the data returned by the main station were received, and a communication delay due to the relationship between the times Ta, Tb, Tc and Te. and means for calculating the time difference between the master station and the slave station as a correction time Td, and means for correcting the time of the slave station based on the correction time Td.

【0008】[0008]

【作用】本発明では、以下のような方法で主局と従局の
時刻のずれを補正し、主局の時刻を従局に設定する。い
ま図3に示すような、従来と同様な構成において、主局
Mの時刻がTaのとき従局Sの時刻Tnは、Tn=Ta
−Tdとする。(ただし、Tdは主局Mと従局Sの時刻
差とする。)このとき、主局Mの時計の時刻を、従局S
の時刻に設定する。図5において、主局Mが時刻Taの
とき、この時刻値Taを従局Sにデータとして送出すれ
ば、主局Mと従局S間を接続する通信回線には、通信遅
延△Tnが存在するから、時刻Taに主局Mを発したデ
ータは、主局Mの時計で時刻Ta+△Tnとして従局S
nに到達する。このデータが到達した時刻Tbは、従局
Sの時計では主局Mの時刻より△Tn後、即ち式(1)
となる。
[Operation] In the present invention, the time difference between the master station and the slave station is corrected by the following method, and the time of the master station is set in the slave station. In a configuration similar to the conventional one as shown in FIG. 3, when the time of the master station M is Ta, the time Tn of the slave station S is Tn=Ta.
−Td. (However, Td is the time difference between the master station M and the slave station S.) At this time, the time on the clock of the master station M is set to the time difference between the master station M and the slave station S.
Set to the time of the day. In FIG. 5, when master station M is at time Ta, if this time value Ta is sent as data to slave station S, there will be a communication delay ΔTn in the communication line connecting master station M and slave station S. , the data issued by the master station M at time Ta is sent to the slave station S as time Ta+△Tn by the clock of the master station M.
Reach n. The time Tb when this data arrives is △Tn later than the time of the master station M in the clock of the slave station S, that is, according to equation (1)
becomes.

【0009】     Tb=Tn+△Tn=Ta−Td+△Tn  
  ……(1)次に、主局Mからデータを受信した従局
Sは、設定されている時刻の時計での受信時刻Tbと受
信した時刻Teとを、主局Mへの返送データとして送信
する。このときの通信回線の遅延を同じく△Tnとする
と、この返送データが主局Mに到達する時刻Tcは、従
局Sでの返送までに要した時間を△Snとすると、 △Sn=Te−Tbであり 主局Mの時計で式(2)となる。
Tb=Tn+ΔTn=Ta−Td+ΔTn
...(1) Next, the slave station S that has received the data from the master station M transmits the reception time Tb on the set clock and the received time Te to the master station M as return data. . If the communication line delay at this time is also △Tn, the time Tc at which this returned data reaches the master station M is the time required for the return data at the slave station S to be △Sn, then △Sn=Te-Tb The clock of the main station M is expressed as equation (2).

【0010】 Tc=Ta+△Tn+△Sn+△Tn  ……(2)こ
の時、計測できる時刻は、前述のように、最初、主局よ
りデータを送った時刻Ta、従局にて、前記データを受
け取った時刻Tbを送出したときの時刻Teと返送デー
タを主局Mで受信した時刻Tdである。このTa,Tb
,Tc,Teの4つの計測値により通信遅延を取り除き
時刻差Tdを求めると式(4),(5),(6)となる
[0010] Tc=Ta+△Tn+△Sn+△Tn...(2) At this time, the measurable times are, as mentioned above, the time Ta when the data is first sent from the master station, and the time when the data is received at the slave station. These are the time Te at which time Tb was sent out, and the time Td at which the main station M received the returned data. This Ta, Tb
, Tc, and Te to remove the communication delay and calculate the time difference Td, formulas (4), (5), and (6) are obtained.

【0011】     Tc−Ta=△Tn+△Sn+△Tn=A  
  ……(4)    Tb−Ta=△Tn−Td=B
      ………………(5)    Te−Tb=
△Sn=C        ……………………(6)式
(4),(5),(6)により式(7),(8)を得る
[0011] Tc-Ta=△Tn+△Sn+△Tn=A
...(4) Tb-Ta=△Tn-Td=B
………………(5) Te−Tb=
ΔSn=C ……………………(6) Formulas (7) and (8) are obtained from formulas (4), (5), and (6).

【0012】 2△Tn+C=A            ………(7
)△Tn−Td=B            ………(
8)また、式(7),(8)によりTd=△Tn−B=
(A−C)/2−B=(Ta−Tb+Tc−Te)/2
を得る。このTdを用いて従局Snの時刻のずれTn=
Ta−Tdの−Tdを0に補正すると従局Sの補正され
た時刻Tnは、主局Mの時刻Taに正しく設定される。
2△Tn+C=A (7
)△Tn-Td=B ………(
8) Also, according to equations (7) and (8), Td=△Tn-B=
(A-C)/2-B=(Ta-Tb+Tc-Te)/2
get. Using this Td, the time difference Tn of slave station Sn=
When -Td of Ta-Td is corrected to 0, the corrected time Tn of the slave station S is correctly set to the time Ta of the master station M.

【0013】[0013]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be explained with reference to the drawings.

【0014】図1は本発明の一実施例のブロック図であ
り、主局10と従局20(1〜n)が、遅延のある回線
で、それぞれ接続されている。
FIG. 1 is a block diagram of an embodiment of the present invention, in which a master station 10 and slave stations 20 (1 to n) are connected to each other via a delay line.

【0015】主局10は、演算処理や制御を行うCPU
11、内部にある時計12、時刻値を記憶させるための
メモリ13、時刻設定処理を行うプログラムの記述され
たプログラムメモリ14及び通信インタフェース15を
有して構成され、CPU11の制御により、プログラム
メモリ14の中に記述されているプログラムによって時
刻設定処理が行われる。
The main station 10 is a CPU that performs arithmetic processing and control.
11, an internal clock 12, a memory 13 for storing time values, a program memory 14 in which a program for time setting processing is written, and a communication interface 15. Under the control of the CPU 11, the program memory 14 The time setting process is performed by the program written in the .

【0016】従局20では、同じくCPU21,時計2
2,メモリ23,プログラムメモリ24及び通信インタ
フェース25を有して構成され、CPU21の制御によ
りプログラムメモリ24の中に記述されているプログラ
ムによって時刻設定処理が行われる。
[0016] Similarly, in the slave station 20, the CPU 21 and the clock 2
2, a memory 23, a program memory 24, and a communication interface 25, and time setting processing is performed by a program written in the program memory 24 under the control of the CPU 21.

【0017】図2(a)は本実施例の主局での処理手順
を示すフローチャートおよび図3(b)は本実施例の従
局での処理手順を示すフローチャートである。遠隔時刻
設定の処理手順を説明すると、主局10では時計12の
時刻がTaのとき、時刻Taのデータを従局20に送出
する。またメモリ13にこの時刻データTaを記憶させ
ておく(ステップ1)。従局では、主局M10からの時
刻Taのデータを受信したら、ただちに、従局20の時
計22での受信時刻Tbをメモリ23に記憶させる(ス
テップ2)。プログラムメモリ24では、メモリ23に
記憶の時刻Tb及び自局の時刻Teを主局10にデータ
として、返送する(ステップ3)。主局10では、この
間、従局20からの返送データを持ち、返送データを受
信したら(ステップ4)、その時刻値Tcを時計12で
読み、次に、Tb,Tc,Te値を、メモリ13に記憶
する(ステップ5)。
FIG. 2(a) is a flowchart showing the processing procedure in the master station of this embodiment, and FIG. 3(b) is a flowchart showing the processing procedure in the slave station of this embodiment. To explain the processing procedure for remote time setting, when the time on the clock 12 is Ta, the master station 10 sends data at time Ta to the slave station 20. The time data Ta is also stored in the memory 13 (step 1). When the slave station receives the data at time Ta from the master station M10, it immediately stores the reception time Tb at the clock 22 of the slave station 20 in the memory 23 (step 2). The program memory 24 returns the time Tb stored in the memory 23 and the local time Te to the main station 10 as data (step 3). During this time, the master station 10 has the return data from the slave station 20, and upon receiving the return data (step 4), reads the time value Tc using the clock 12, and then stores the Tb, Tc, and Te values in the memory 13. Store (step 5).

【0018】次に、主局10のCPU11の制御および
、プログラムメモリ14の中に記述されているプログラ
ムにより、メモリ13からデータTa,Tb,Tc,T
eを読みだし、Td=(Ta−Tb+Tc−Te)/2
の演算を行い、Tdを求め、これを従局20に通信回線
を通じ、転送する(ステップ6)。受信の時刻差Tdに
より、従局内のCPU21及びプログラムメモリ24中
のプログラムの処理によって、従局20の時計の時刻を
Tn=Tn+Tdとして、時刻を設定し直す(ステップ
7)。
Next, under the control of the CPU 11 of the main station 10 and the program written in the program memory 14, the data Ta, Tb, Tc, T
Read out e, Td=(Ta-Tb+Tc-Te)/2
is calculated to obtain Td, which is transferred to the slave station 20 via the communication line (step 6). Based on the reception time difference Td, the time on the clock of the slave station 20 is reset to Tn=Tn+Td by the processing of the CPU 21 in the slave station and the program in the program memory 24 (step 7).

【0019】[0019]

【発明の効果】以上説明したように本発明は、通信回線
の遅延による主局と従局間の時刻のずれを補正時間とし
て算出し、補正時間をもとに、時計の時刻を補正するこ
とにより、通信回線の遅延及びデータの変換処理時間に
影響されずに主局と従局の時計の時刻を正確に合わせる
ことができる。
[Effects of the Invention] As explained above, the present invention calculates the time difference between the master station and the slave station due to communication line delay as a correction time, and corrects the clock time based on the correction time. It is possible to accurately synchronize the clocks of the master and slave stations without being affected by communication line delays and data conversion processing time.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の一実施例のブロック図である。FIG. 1 is a block diagram of one embodiment of the present invention.

【図2】本実施例の主局及び従局の処理手順を示すフロ
ーチャートである。
FIG. 2 is a flowchart showing a processing procedure of a master station and a slave station in this embodiment.

【図3】従来の遠隔時刻設定方式の一例を説明するため
の構成図である。
FIG. 3 is a configuration diagram for explaining an example of a conventional remote time setting method.

【図4】従来例を説明するための交信シーケンス図であ
る。
FIG. 4 is a communication sequence diagram for explaining a conventional example.

【図5】本実施例を説明するための交信シーケンス図で
ある。
FIG. 5 is a communication sequence diagram for explaining this embodiment.

【符号の説明】[Explanation of symbols]

10    主局 11,21    CPU 12,22    時計 13,23    メモリ 14,24    プログラムメモリ 15,25    通信インタフェース20    従
10 Master station 11, 21 CPU 12, 22 Clock 13, 23 Memory 14, 24 Program memory 15, 25 Communication interface 20 Slave station

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  主局と複数の従局とが遅延のある回線
で接続され前記主局の時計に従局の時計を合わせる遠隔
時刻設定方式において、前記主局から時刻Taのデータ
を送出する手段と、前記従局で前記回線からのデータが
受信された時刻Tbを記憶する手段と、前記従局の時刻
Teと記憶された時刻Tbとのデータを前記回線で前記
主局に返送する手段と、前記主局で返送されたデータが
受信された時刻Tc及び時刻Te,Thを記憶する手段
と、前記時刻Ta,Tb,Tc及びTeの関係により通
信遅延を除き前記主局と従局間の時刻のずれを補正時間
Tdとして算出する手段と、前記補正時間Tdをもとに
前記従局の時刻を補正する手段とを有することを特徴と
する遠隔時刻設定方式。
1. In a remote time setting method in which a master station and a plurality of slave stations are connected by a line with a delay and the clock of the master station is adjusted to the clock of the slave stations, means for transmitting data at time Ta from the master station. , means for storing time Tb at which the slave station receives data from the line; means for returning data of the time Te of the slave station and the stored time Tb to the master station over the line; Means for storing the time Tc and times Te and Th at which the returned data was received at the station, and the time difference between the master station and the slave station, excluding communication delays, based on the relationship between the times Ta, Tb, Tc and Te. A remote time setting method comprising: means for calculating a correction time Td; and means for correcting the time of the slave station based on the correction time Td.
【請求項2】  前記補正時間Tdを(Ta−Tb+T
c−Te)/2により算出することを特徴とする請求項
1記載の遠隔時刻設定方式。
2. The correction time Td is (Ta−Tb+T
2. The remote time setting method according to claim 1, wherein the time is calculated by c-Te)/2.
JP3009490A 1991-01-30 1991-01-30 Remote time setting system Pending JPH04253212A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3009490A JPH04253212A (en) 1991-01-30 1991-01-30 Remote time setting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3009490A JPH04253212A (en) 1991-01-30 1991-01-30 Remote time setting system

Publications (1)

Publication Number Publication Date
JPH04253212A true JPH04253212A (en) 1992-09-09

Family

ID=11721679

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3009490A Pending JPH04253212A (en) 1991-01-30 1991-01-30 Remote time setting system

Country Status (1)

Country Link
JP (1) JPH04253212A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61233822A (en) * 1985-04-08 1986-10-18 Mitsubishi Electric Corp Time matching method of on-line connector
JPH0259809A (en) * 1988-08-25 1990-02-28 Toshiba Corp Time control system for multi-computer system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61233822A (en) * 1985-04-08 1986-10-18 Mitsubishi Electric Corp Time matching method of on-line connector
JPH0259809A (en) * 1988-08-25 1990-02-28 Toshiba Corp Time control system for multi-computer system

Similar Documents

Publication Publication Date Title
US9671761B2 (en) Method, time consumer system, and computer program product for maintaining accurate time on an ideal clock
US6535926B1 (en) Time synchronization system for industrial control network using global reference pulses
US7379480B2 (en) Fast frequency adjustment method for synchronizing network clocks
EP0253096B1 (en) Time synchronization method in a data transmission system
JPH10503282A (en) Controlled time scale generator for use as primary reference clock
JPH04507157A (en) structure of computer system
JPH10509294A (en) System with predetermined timing relationship between data input and output, and transmitter and receiver of such system
US20140355629A1 (en) Communication apparatus, communication system, and communication method
JP2658962B2 (en) Network time information synchronization method
JPH0668799B2 (en) Remote monitoring control system
JP5372315B2 (en) Telemeter system slave station equipment
JPH04253212A (en) Remote time setting system
CN107623556A (en) Clock synchronizing method and its system in communication system
JP2005269759A (en) Sampling synchronization system and time management system
JPS6363238A (en) Timing device for network system
CN110824237A (en) Pulse sampling time interval adjusting method and device
JPH11355256A (en) Synchronous operation system
JPH04121691A (en) Remote time setting method
JPH08137572A (en) Performance data processing method in distributed processing processor system
JP2821091B2 (en) Remote monitoring control device and time synchronization device
JPH11223687A (en) Synchronizing system for internal timepieces among plural computers
JPS62272182A (en) Time synchronizing method
JP2686854B2 (en) Clock device with automatic calibration function
JP2004077171A (en) Time data receiving device
JPH0435244A (en) Inter-system time correction control system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19970826