JPS61255421A - Time setting system for computer - Google Patents

Time setting system for computer

Info

Publication number
JPS61255421A
JPS61255421A JP60095975A JP9597585A JPS61255421A JP S61255421 A JPS61255421 A JP S61255421A JP 60095975 A JP60095975 A JP 60095975A JP 9597585 A JP9597585 A JP 9597585A JP S61255421 A JPS61255421 A JP S61255421A
Authority
JP
Japan
Prior art keywords
time
computer
external
internal clock
clock
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
JP60095975A
Other languages
Japanese (ja)
Inventor
Hideki Shibata
秀樹 柴田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP60095975A priority Critical patent/JPS61255421A/en
Publication of JPS61255421A publication Critical patent/JPS61255421A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electric Clocks (AREA)

Abstract

PURPOSE:To obtain highly accurate and stable time setting system of a computer by checking clocks by time recognized from an external read-out clock and time recognized by an internal clock. CONSTITUTION:When interruption from an external read-out clock 5 reached n times, time of the external read-out clock 5 is read from the external read-out clock 5 through an input circuit 4, and compared with the value of time tB of an internal clock 1 provided inside of a computer 7. If the result of comparison is within a specified limit, the value from the external read-out clock 5 is set to a computer 3 as external clock time tA and internal clock time tB. Thereby, internal clock time tB is corrected automatically. When the result of judgement is out of the fixed limit, the value of internal clock time tB is adopted as the value of external clock time tA.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、計算機の内部クロックと外部クロックとの
同期をとpつつ計算機の時刻を設定する計算機の時刻設
定方式に関するものである0〔従来の技術〕 一般に、計算機のMHする時刻は、計算機内部にクロッ
クを設置し、そのクロックからの割込みをソフトウェア
的に計数して時刻が作り出されたもの、あるいは外部に
時刻装置を設け、その時刻を計算機が読み込むことによ
り作り出されたものがある。第3図は内部クロックによ
って上記機能を実現するための従来の時刻設定方式の構
成図で6タ、図において1は計算機装置7内部に設けら
れた内部クロック、2は計算機装置7の内部及び外部か
らの割込みをプログラムに通知する割込み処理回路、3
は計算機である。また、第4図は外部時刻装置による従
来の時刻設定方式を示す構成図であ夛、図中、2,3は
第3図のものと同一のものである。また第4図中、4は
外部時刻の値を計算機3に取込むための入力回路、5は
外部時刻装置% 6は外部時刻の変化する毎に出力され
る外部時刻割込み信号線でめる。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a computer time setting method for setting the time of a computer while synchronizing the internal clock of the computer with an external clock. [Technology] In general, the time for MH of a computer is created by installing a clock inside the computer and counting interrupts from that clock using software, or by installing an external time device and calculating the time. There are things that are created by being read by a computer. FIG. 3 is a block diagram of a conventional time setting system for realizing the above functions using an internal clock. an interrupt processing circuit that notifies the program of interrupts from 3;
is a calculator. Further, FIG. 4 is a block diagram showing a conventional time setting method using an external time device. In the figure, numerals 2 and 3 are the same as those in FIG. 3. In FIG. 4, 4 is an input circuit for inputting the external time value into the computer 3, 5 is an external time device, and 6 is an external time interrupt signal line that is output every time the external time changes.

次に動作を説明する。まず第3図のような計算機装置内
に内部クロック1t−備えた構成の場合は、内部クロッ
ク1のみで計算機3が認識する時刻を作り出しており、
内部クロック1の一定周期毎ノ割込みをプログラム的に
計数し、m秒2秒2分。
Next, the operation will be explained. First, in the case of a configuration in which the computer device is equipped with an internal clock 1t as shown in FIG. 3, the time recognized by the computer 3 is created only by the internal clock 1.
Interrupts of internal clock 1 are counted at regular intervals by a program, and the time is m seconds, 2 seconds, and 2 minutes.

時1日2月2年を作り出していくものである。It is what creates time, 1 day, 2 months, and 2 years.

他方、第4図に示すような外部時刻装置5により計算機
3が認識する時刻を作シ出す場合は、外部時刻割込み信
号線6からの割込み信号を、割込み処理回路2により計
算機3に通知し、入力回路4を通して外部時刻を読み込
み、計算機3に設定するものである。
On the other hand, when the time recognized by the computer 3 is generated by an external time device 5 as shown in FIG. 4, an interrupt signal from the external time interrupt signal line 6 is notified to the computer 3 by the interrupt processing circuit 2. The external time is read through the input circuit 4 and set in the computer 3.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

従来の計算機の時刻設定方式は以上の様に構成されて時
刻を設定しているので、内部クロックを利用する場合に
は日本標準時刻等の絶対的時刻に秒以下のオーダ(単位
)で、あわすことが困難であシ、又、内部クロックその
ものの精度も極端に優れたものを使用すると計算機自体
が非常に高価になり経済的でないという問題点がある。
The time setting method of conventional computers is configured as described above to set the time, so when using the internal clock, it is necessary to adjust the time to the absolute time such as Japan Standard Time in the order (unit) of seconds or less. Moreover, if the internal clock itself is extremely accurate, the computer itself will become very expensive and uneconomical.

さらに外部時刻装置を利用する場合は、計算機の外部に
設置されるため、計算機に取込む迄のケーブル上のトラ
ブルの確率が内部クロックよりも高く、また外部時刻の
設定が人為的に容易に変更されてしまうことがあって誤
った時刻が計算機内部に設定されてしまうなどの問題点
があった。
Furthermore, when using an external time device, since it is installed outside the computer, there is a higher probability of problems with the cable before it is imported into the computer than with an internal clock, and the external time setting can be easily changed artificially. There were problems such as the wrong time being set inside the computer due to the incorrect time being set inside the computer.

この発明は上記の様な問題点を解消するためになされた
もので、外部クロックの精度と内部クロックの信頼性と
から高精度かつ安定性のある計算機の時刻設定方式を得
ることを目的とする。
This invention was made to solve the above-mentioned problems, and aims to provide a highly accurate and stable computer time setting method based on the accuracy of the external clock and the reliability of the internal clock. .

〔問題点を解決するための手段〕[Means for solving problems]

この発明に係る計算機の時刻設定方式は、内部クロック
と、割込み処理回路とを備えた計算機装置において、外
部時刻装置から認識された時刻と、前記内部クロックに
より認識された時刻とにより夫々のクロックをチェック
するようにしたものである。
A time setting method for a computer according to the present invention is to set each clock based on a time recognized from an external time device and a time recognized by the internal clock in a computer device including an internal clock and an interrupt processing circuit. I decided to check it.

〔作 用〕[For production]

この発明における時刻設定方式は、内部クロックを用い
て外部時刻装置の故障の有無をチェックし、上記外部時
刻装置を用いて計算機内部に設定される内部クロック時
刻の遅れ、進みを定期的に修正することにより、精度の
よい時刻が計算機内部に設定される。
The time setting method in this invention uses an internal clock to check whether there is a failure in the external time device, and periodically corrects the delay or advance of the internal clock time set inside the computer using the external time device. This allows a highly accurate time to be set inside the computer.

〔実施例〕〔Example〕

以下、この発明の一実施例を図について説明する。第1
図において、1は計算機装置7内部に設けられた内部ク
ロック、2は計算機3の内部および外部からの割込みを
プログラムに通知する割込み処理回路、3は計算機、4
は外部時刻の値を計算機3に取込むための入力回路、5
は外部時刻装置、6は外部時刻の変化する毎に出力され
る外部時刻割込み信号線である。
An embodiment of the present invention will be described below with reference to the drawings. 1st
In the figure, 1 is an internal clock provided inside the computer device 7, 2 is an interrupt processing circuit that notifies the program of interrupts from inside and outside the computer 3, 3 is the computer, and 4
5 is an input circuit for importing an external time value into the computer 3;
6 is an external time device, and 6 is an external time interrupt signal line that is output every time the external time changes.

上記のように構成された本発明の計算機の時刻設定方式
について、その処理方式を図を用いて説明する。この第
2−1図は本発明の計算機3における処理方式を示すフ
ローチャートであり、図に示すフローは計算機3が外部
時刻割込み線6から割込み処理回路2を経て、外部時刻
装置5の時刻の変化毎に起動される場合を示す。判定ブ
ロック10は外部時刻装置5からの割込みがn回目か否
か、すなわち、一定時間経過しているかどうかをチェッ
クし、このチェックの結果、n回に達していない時は内
部クロック1でのみ構成する場合(従来例)と同様の処
理方式でm秒(ミリ秒)。
The processing method for the time setting method of the computer of the present invention configured as described above will be explained with reference to the drawings. FIG. 2-1 is a flowchart showing a processing method in the computer 3 of the present invention. The case where it is started every time is shown. The judgment block 10 checks whether or not the interrupt from the external time device 5 is the nth time, that is, whether a certain period of time has elapsed.If the result of this check is that the interrupt has not reached the nth time, the system is configured only with the internal clock 1. m seconds (milliseconds) using the same processing method as in the conventional example.

秒1分2日9月1年を計数し、外部クロック時刻を人を
計算機3の内部に設定する(処理ブロック11)。ここ
で、チェックの結果n回に達している時には外部時刻装
置5から入力回路4を経て外部時刻装置5の時刻を読み
込み(処理ブロック12)、内部クロック時刻tBの値
と比較する(判定ブロック13)。この比較の結果が一
定範囲内であれば、外部時刻装置5からの値を外部クロ
ック時刻tA、内部クロック時刻1Bとして計算機4に
設定する(処理ブロック14)。このことにより内部ク
ロック時刻tBが自動的に修正される。ここで判定結果
が一定範囲外であった時には内部クロック時刻1Bの値
を外部クロック時刻1人の値として採用する(処理ブロ
ック15)。
Seconds, minutes, two days, September, and one year are counted, and the external clock time is set inside the computer 3 (processing block 11). Here, if the result of the check has reached n times, the time of the external time device 5 is read from the external time device 5 via the input circuit 4 (processing block 12), and compared with the value of the internal clock time tB (judgment block 13). ). If the result of this comparison is within a certain range, the values from the external time device 5 are set in the computer 4 as the external clock time tA and the internal clock time 1B (processing block 14). As a result, the internal clock time tB is automatically corrected. If the determination result is outside the certain range, the value of internal clock time 1B is adopted as the value of external clock time 1 (processing block 15).

処理ブロック16における処理は本処理ルーチンが一定
時間経過する毎に内部クロック処理ルーチンのカウント
値を零に設定し、内部クロック処理ルーチンで外部時刻
装置5からの割込みが故障したか否かの判定材料を作成
している。次に第2−2図は内部クロック10割込み毎
に計算機3が起動される場合の処理方式を示したもので
あり、まず処理ブロック20は第2−1図の処理ブロッ
ク16のiを毎回1ずつ加算することを示し2判定ブロ
ック21にて一定回数以上かどうかのチェックをする。
The processing in the processing block 16 sets the count value of the internal clock processing routine to zero every time this processing routine passes a certain period of time, and uses the internal clock processing routine to determine whether or not an interrupt from the external time device 5 has failed. is being created. Next, FIG. 2-2 shows a processing method when the computer 3 is activated every 10 internal clock interrupts. First, the processing block 20 changes i of the processing block 16 of FIG. Indicates that the number is to be added by 2, and a check is made in the 2nd judgment block 21 to see if the number is greater than a certain number of times.

この時、Mの値は第2−1図における判定ブロック10
の一定時間値よりもわずかに大きく設定しておくことに
より、外部時刻装置5の故障の有無を判定出来る。また
、故障と[識した時は処理ブロック22にて外部クロッ
ク故障モードを設定する。この故障モードの解除は第2
−1図の処理ブロック14にて行なう。処理ブロック2
3は内部クロック1からのクロックにより内部クロック
10時刻【Bを作成するものである。
At this time, the value of M is determined by the decision block 10 in FIG. 2-1.
By setting it slightly larger than the fixed time value of , it is possible to determine whether or not the external time device 5 is malfunctioning. Furthermore, when a failure is detected, an external clock failure mode is set in processing block 22. The release of this failure mode is the second
This is carried out in the processing block 14 of FIG. Processing block 2
3 creates the internal clock 10 time [B] using the clock from the internal clock 1.

〔発明の効果〕〔Effect of the invention〕

以上の様に、この発明によれば外部時刻装置と内部クロ
ックを備え、外部クロックの高精度な点と内部クロック
の安定性を利用して構成したので、安定性ある精度の良
い計算機の時刻設定方式が得られる効果がある。
As described above, according to the present invention, an external time device and an internal clock are provided, and the configuration takes advantage of the high accuracy of the external clock and the stability of the internal clock, so that the time of the computer can be set with good stability and precision. There is an effect that the method can obtain.

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

第1図はこの発明の一実施例による計算機の時刻設定方
式におけるハードウェア構成を示す構成図、第2−1図
は第1図における外部時刻装置の処理ルーチンの一例を
示すフローチャート、!2−2図は第1図における内部
クロックの処理ルーチンの一例を示すフローチャート、
第3図は従来の計算機のハードウェア構成の一例を示す
構成図、第4図は従来の計算機の他のハードウェア構成
を示す構成図である。 図において、1は内部クロック、2は割込処理回路、3
は計算機、5は外部時刻装置、7は計算機装置である。 なお、各図中、同一符号は同一または相当部分を示す。 第1図 1:内含伜フローlり 6: 5ト舎?’?亥・」官・」梨!七トイ六号東7:
計算檄゛蔑置 第2−1図 第2−2図 第3図 、7 第4図
FIG. 1 is a block diagram showing the hardware configuration of a computer time setting method according to an embodiment of the present invention, and FIG. 2-1 is a flowchart showing an example of the processing routine of the external time device in FIG. 1. 2-2 is a flowchart showing an example of the internal clock processing routine in FIG.
FIG. 3 is a block diagram showing an example of the hardware structure of a conventional computer, and FIG. 4 is a block diagram showing another hardware structure of the conventional computer. In the figure, 1 is the internal clock, 2 is the interrupt processing circuit, and 3 is the internal clock.
is a computer, 5 is an external time device, and 7 is a computer device. In each figure, the same reference numerals indicate the same or corresponding parts. Figure 1 1: Containment flow 6: 5 points? '? Pig/”Government/”Pear! Seven Toy No. 6 East 7:
Calculation Reference Figure 2-1 Figure 2-2 Figure 3, 7 Figure 4

Claims (1)

【特許請求の範囲】[Claims] 計算機装置の内部に設けられた内部クロックと、前記計
算機装置の外部に設けられた外部時刻装置からの割込み
及び前記内部クロックからの割込みをプログラムに通知
する割込み処理回路とを備えた計算機の時刻設定方式に
おいて、前記内部クロックの計算機に対する割込み回数
を計数することによつて作成された内部クロック時刻と
、前記外部時刻装置からの外部時刻の変化する毎に計算
機に送られる割込回数を計数することによつて作成され
た外部クロック時刻とから前記内部クロック時刻を修正
するとともに前記計算機装置の内部におけるプログラム
上の時刻を設定するようにしたことを特徴とする計算機
の時刻設定方式。
Time setting for a computer comprising an internal clock provided inside the computer device, and an interrupt processing circuit that notifies a program of an interrupt from an external time device provided outside the computer device and an interrupt from the internal clock. In the method, an internal clock time created by counting the number of interrupts of the internal clock to the computer and the number of interrupts sent to the computer each time the external time from the external time device changes are counted. 1. A time setting method for a computer, characterized in that the internal clock time is corrected based on an external clock time created by a computer, and a time on a program inside the computer device is set.
JP60095975A 1985-05-08 1985-05-08 Time setting system for computer Pending JPS61255421A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60095975A JPS61255421A (en) 1985-05-08 1985-05-08 Time setting system for computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60095975A JPS61255421A (en) 1985-05-08 1985-05-08 Time setting system for computer

Publications (1)

Publication Number Publication Date
JPS61255421A true JPS61255421A (en) 1986-11-13

Family

ID=14152167

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60095975A Pending JPS61255421A (en) 1985-05-08 1985-05-08 Time setting system for computer

Country Status (1)

Country Link
JP (1) JPS61255421A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7555651B2 (en) 2003-05-28 2009-06-30 Fujitsu Limited Time management apparatus and time management method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7555651B2 (en) 2003-05-28 2009-06-30 Fujitsu Limited Time management apparatus and time management method

Similar Documents

Publication Publication Date Title
US6374364B1 (en) Fault tolerant computing system using instruction counting
GB1462690A (en) Computer comprising three data processors
JPS61255421A (en) Time setting system for computer
JPS62293441A (en) Data outputting system
US5768573A (en) Method and apparatus for computing a real time clock divisor
JP2725419B2 (en) Counting circuit
JPH04199207A (en) Clock correcting system
JPS63187913A (en) Pulse duty detecting circuit
JPH03244218A (en) Block code decoder and method for evaluating reliability of received word
SU1425684A1 (en) Program execution checking device
JPS627238A (en) Data transmission control device
KR930005650B1 (en) Time delay method using timer
JPS5972547A (en) Correcting system for internal timepiece of computer
JPS5983438A (en) Program failure detecting system
JPS6028986Y2 (en) data processing equipment
JPH01266647A (en) Serial i/o circuit
JPS61249152A (en) Program run-away processing system
JPH02118710A (en) Method and circuit for detecting step-out
JPS60230225A (en) Timer processing system of programmable controller
JPH04113097U (en) Computer with built-in clock mechanism
JPS62150454A (en) Direct memory access system
JPS59116873A (en) Time correction system of multiple electronic computer system
JPS5816319A (en) Time controller of computer system
JPS5850031A (en) Time correcting system for computer
JPH03204038A (en) Majority comparator