JPH07113866B2 - Real-time clock module management device - Google Patents
Real-time clock module management deviceInfo
- Publication number
- JPH07113866B2 JPH07113866B2 JP62053679A JP5367987A JPH07113866B2 JP H07113866 B2 JPH07113866 B2 JP H07113866B2 JP 62053679 A JP62053679 A JP 62053679A JP 5367987 A JP5367987 A JP 5367987A JP H07113866 B2 JPH07113866 B2 JP H07113866B2
- Authority
- JP
- Japan
- Prior art keywords
- time
- real
- clock module
- time information
- time 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.)
- Expired - Lifetime
Links
Landscapes
- Electric Clocks (AREA)
Description
【発明の詳細な説明】 《発明の分野》 この発明は、リアルタイム・クロックモジュールを内蔵
した制御システムにおいて、モジュールで生成された時
刻情報に異常が生じたとき、これを迅速に復旧できるよ
うにした管理装置に関する。Description: FIELD OF THE INVENTION The present invention, in a control system having a built-in real-time clock module, makes it possible to promptly recover an abnormal time information generated by the module. Regarding management device.
《発明の概要》 この発明では、リアルタイム・クロックモジュールで生
成される時刻情報を一定微小時間毎に読出し、その内容
により所定の時刻レジスタの内容を更新し、またモジュ
ールで生成れた時刻情報に異常が生じたとき、所定のリ
セット指令が与えられることを条件として、時刻レジス
タに保存された時刻情報をリアルタイム・クロックモジ
ュールに初期設定するようにしたものである。<< Summary of the Invention >> According to the present invention, the time information generated by the real-time clock module is read at a fixed time interval, the content of a predetermined time register is updated according to the content, and the time information generated by the module is abnormal. When the above occurs, the time information stored in the time register is initialized in the real-time clock module on condition that a predetermined reset command is given.
《従来技術とその問題点》 従来、リアルタイム・クロックモジュールを内蔵した制
御システムにおいては、リアルタイム・クロックモジュ
ールで生成される時刻情報を一定微小時間毎に読出し、
時刻情報を構成する日,時,時刻がそれぞれ規定範囲に
収まるか否かに基づいて当該時刻情報の正常,異常を判
定するようにしている。<< Conventional Technology and its Problems >> Conventionally, in a control system having a built-in real-time clock module, the time information generated by the real-time clock module is read out at fixed time intervals,
The normality / abnormality of the time information is determined based on whether or not the date, hour, and time forming the time information fall within the specified ranges.
そして,異常が判定された場合には,例えばブザーを鳴
動する等によりオペレータにその旨を知らせ、オペレー
タのキー操作などを介して正しい時刻情報をリアルタイ
ム・クロックモジュールに設定し直すようにしている。When an abnormality is determined, the operator is notified by, for example, sounding a buzzer, and the correct time information is reset in the real-time clock module via the operator's key operation.
しかしながら、このような従来のモジュール管理方法に
あっては時刻情報の再設定に手間がかかり、迅速性に欠
ける等の問題点があった。However, in such a conventional module management method, there is a problem that it takes a lot of time to reset the time information and lacks promptness.
《発明の目的》 この発明は、この種のリアルタイム・クロックモジュー
ルを内蔵した制御システムにおいて、モジュールで生成
される時刻情報に異常が生じた場合、これを迅速に復旧
することができるようにしたリアルタイム・クロックモ
ジュールの管理装置を提供することにある。<Object of the Invention> The present invention is a control system including a real-time clock module of this type, and in the case where an abnormality occurs in time information generated by the module, the real-time clock module is capable of quickly recovering the abnormality. -To provide a clock module management device.
《発明の構成と効果》 この発明は上記の目的を達成するために、リアルタイム
・クロックモジュールを内蔵した制御システムにおい
て、 リアルタイム・クロックモジュールで生成された時刻情
報を一定微小時間毎に読出し、その内容により所定の時
刻レジスタの内容を更新する手段と、 リアルタイム・クロックモジュールで生成された時刻情
報に異常が生じないことを検出する手段と、 異常が生じたことが検出されたときには、所定のリセッ
ト指令が与えられることを条件として、時刻レジスタに
保存された時刻情報をリアルタイム・クロックモジュー
ルに初期設定する手段と、 を具備することを特徴とするものである。<< Structure and Effect of the Invention >> In order to achieve the above-mentioned object, the present invention reads the time information generated by the real-time clock module at every fixed minute time in a control system having a built-in real-time clock module. Means for updating the contents of a predetermined time register, a means for detecting that the time information generated by the real-time clock module is normal, and a predetermined reset command when an abnormality is detected. Is provided, and means for initializing the time information stored in the time register in the real-time clock module is provided.
このような構成によれば、この種のリアルタイム・クロ
ックモジュールを内蔵した制御システムにおいて、モジ
ュールで生成される時刻情報に異常が生じた場合、これ
を迅速に復旧することができるという効果がある。According to such a configuration, in a control system including this kind of real-time clock module, when an abnormality occurs in the time information generated by the module, it is possible to quickly recover the abnormality.
《実施例の説明》 第1図はリアルタイム・クロックモジュールを内蔵した
制御システム全体の構成を概略的に示すブロック図であ
る。<< Description of Embodiments >> FIG. 1 is a block diagram schematically showing the overall configuration of a control system incorporating a real-time clock module.
同図に示されるようにこのシステムは、マイクロプロセ
ッサを主体として構成された中央処理ユニット(以下、
CPUという)1,制御プログラム等を格納させたROM2,ワー
キングエリア等として使用され、本発明では時刻レジス
タが内蔵されるRAM3,時刻情報を生成するリアルタイム
・クロックモジュール(以下、RTCという)4を備えて
おり、これらの構成要素によって制御対象5を制御する
ようになさている。As shown in the figure, this system is a central processing unit (hereinafter,
(CPU) 1, ROM 2 storing control programs, etc., RAM 3 which is used as a working area, etc. and has a time register built therein, and a real-time clock module (hereinafter referred to as RTC) 4 for generating time information Therefore, the controlled object 5 is controlled by these components.
そして、CPU1ではROM2に格納された制御プログラムを実
行することによって、制御対象5に対する各種の制御を
行なうとともに、RTC4から読込まれた時刻情報に基づ
き、制御対象5に時刻を表示させたり、あるいは各種の
時間管理制御などを行なうようになされている。Then, the CPU 1 executes the control program stored in the ROM 2 to perform various controls on the controlled object 5 and display the time on the controlled object 5 based on the time information read from the RTC 4, or It is designed to perform time management control, etc.
以上の構成において、特に本発明にあっては、ROM2内に
新たに第2図に示されるような管理プログラムを設ける
ことによって、RTC4で生成された時刻情報の異常に迅速
に対処しようとするものである。In the above-mentioned configuration, particularly in the present invention, a management program as shown in FIG. 2 is newly provided in the ROM2 so as to promptly deal with the abnormality of the time information generated by the RTC4. Is.
すなわち、第2図の制御プログラムは、定時割込みによ
って1秒〜1分間隔で繰り返し実行される。That is, the control program of FIG. 2 is repeatedly executed at intervals of 1 second to 1 minute by the regular interruption.
プログラムがスタートされるとまずRTC4で生成された時
刻情報の読込が行なわれる(ステップ201)。この時刻
情報は、月,日,時,分,秒情報からなっている。When the program is started, the time information generated by RTC4 is first read (step 201). This time information includes month, day, hour, minute, and second information.
続いて、読込まれた時刻情報について、その正誤の判定
が行なわれる(ステップ202)。この判定は、1≦月≦1
2,1≦日≦31,0≦時≦23,0≦分≦59,0≦秒≦59を確認す
ることによって行なわれる。Then, the read time information is checked for its correctness (step 202). This judgment is 1 ≦ month ≦ 1
It is performed by checking 2,1 ≤ day ≤ 31,0 ≤ hour ≤ 23,0 ≤ minute ≤ 59, 0 ≤ second ≤ 59.
確認の結果、全ての情報が正しいと判定されれば(ステ
ップ203肯定)、読込まれた時刻情報は、RAM3内に設定
された時刻レジスタに保存される(ステップ204)。As a result of the confirmation, if all the information is determined to be correct (Yes at step 203), the read time information is stored in the time register set in the RAM 3 (step 204).
RTC4が正常な場合、以上説明したステップ201〜204の処
理が一定微小時間毎に繰り返され、その都度RAM3内の時
刻レジスタの内容は、新たな時刻情報によって更新され
ることとなる。When the RTC 4 is normal, the processes of steps 201 to 204 described above are repeated at regular intervals, and the content of the time register in the RAM 3 is updated with new time information each time.
なお、RAM3内に設けられた時刻レジスタは、バッテリに
よってバックアップされており、停電時においてもその
内容が保持される。The time register provided in the RAM 3 is backed up by a battery, and its contents are retained even during a power failure.
一方、RTCから読込まれた時刻情報の正誤を判定した結
果、これが異常と判定された場合には(ステップ203否
定)、直ちに制御対象5に設けられた表示器において時
刻情報の異常が表示され、同時にブザー等によってオペ
レータに対しその旨が報知される(ステップ205)。On the other hand, if it is determined that the time information read from the RTC is correct or incorrect (No at step 203), the time information abnormality is immediately displayed on the display provided in the controlled object 5, At the same time, the buzzer or the like notifies the operator of that fact (step 205).
その後、CPU1では、図示しないリセットスイッチの押下
を待機する状態となる(ステップ206否定)。After that, the CPU 1 enters a state of waiting for the pressing of the reset switch (not shown) (No at step 206).
この状態において、オペレータがリセットスイッチを押
下すると(ステップ206肯定)、CPU1ではRAM3の時刻レ
ジスタから、ステップ204で保存された最新の時刻情報
を読出し、これをRTCに書込むことによって、RTC4に対
する現時刻初期設定を行なう(ステップ207)。In this state, when the operator presses the reset switch (Yes at Step 206), the CPU1 reads the latest time information stored at Step 204 from the time register of RAM3, and writes it to the RTC to write the current time to the RTC4. Initialize the time (step 207).
なお、RTC4に対する時刻情報の書込処理については周知
であるから説明は省略する。Note that the process of writing the time information to the RTC 4 is well known and will not be described.
このように本実施例によれば、この種の制御システムに
おいてノイズ等によりRTC4で生成される時刻情報に異常
が生じた場合、オペレータはリセットスイッチを押下す
るだけで直ちにRTC4を正常な状態に復旧させることがで
き、月,日,時,分,秒をそれぞれキー入力せねばなら
なかった従来例に比べ、この種の復旧処理を迅速に達成
することができる。As described above, according to the present embodiment, if the time information generated by the RTC 4 is abnormal due to noise or the like in this type of control system, the operator can immediately restore the RTC 4 to a normal state by pressing the reset switch. This kind of restoration process can be achieved more quickly than in the conventional example in which the user must key in the month, day, hour, minute, and second.
なお、以上の実施例ではリセットスイッチの押下を待っ
て現時刻初期設定を行なったが、リセット指令を自動的
に内部で生成しこれにより現時刻初期設定を行なわせて
もよい。Although the present time is initialized after the reset switch is pressed in the above embodiments, the present time may be initialized by automatically generating a reset command internally.
第1図は本発明が適用された制御システムの構成を概略
的に示すブロック図、第2図は本発明に係わるリアルタ
イム・クロックモジュール管理処理の詳細を示すフロー
チャートである。 1……CPU 2……ROM 3……RAM 4……RTC 5……制御対象FIG. 1 is a block diagram schematically showing the configuration of a control system to which the present invention is applied, and FIG. 2 is a flowchart showing details of the real-time clock module management processing according to the present invention. 1 …… CPU 2 …… ROM 3 …… RAM 4 …… RTC 5 …… Control target
Claims (1)
した制御システムにおいて、 リアルタイム・クロックモジュールで生成される時刻情
報を一定微小時間毎に読出し、その内容により所定の時
刻レジスタの内容を更新する手段と、 リアルタイム・クロックモジュールで生成された時刻情
報に異常が生じたことを検出する手段と、 異常が生じたことが検出されたときには、所定のリセッ
ト指令が与えられることを条件として、時刻レジスタに
保存された時刻情報をリアルタイム・クロックモジュー
ルに初期設定する手段と、 を具備することを特徴とするリアルタイム・クロックモ
ジュールの管理装置。1. A control system having a real-time clock module built-in, which reads out time information generated by the real-time clock module at fixed time intervals, and updates the content of a predetermined time register according to the content. -A means for detecting that an abnormality has occurred in the time information generated by the clock module, and when the abnormality has been detected, it is stored in the time register on condition that a predetermined reset command is given. A real-time clock module management device comprising: means for initializing time information in the real-time clock module.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62053679A JPH07113866B2 (en) | 1987-03-09 | 1987-03-09 | Real-time clock module management device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62053679A JPH07113866B2 (en) | 1987-03-09 | 1987-03-09 | Real-time clock module management device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS63220312A JPS63220312A (en) | 1988-09-13 |
| JPH07113866B2 true JPH07113866B2 (en) | 1995-12-06 |
Family
ID=12949505
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62053679A Expired - Lifetime JPH07113866B2 (en) | 1987-03-09 | 1987-03-09 | Real-time clock module management device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH07113866B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104639847A (en) * | 2015-03-04 | 2015-05-20 | 福建捷联电子有限公司 | Device and method for automatically switching television wall signal based on low-power consumption design of RTC (real time clock) |
-
1987
- 1987-03-09 JP JP62053679A patent/JPH07113866B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS63220312A (en) | 1988-09-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH07113866B2 (en) | Real-time clock module management device | |
| JPH04542A (en) | Memory checking system | |
| JPH06348535A (en) | Abnormality generation history storage device | |
| JP3357777B2 (en) | Program control system | |
| JPS59178552A (en) | Self diagnosis controlling system | |
| JPS63109550A (en) | Starting system for memory damp program of information processing unit | |
| JPH0687213B2 (en) | Data processing device | |
| JPH05334159A (en) | Method for automatically diagnosing file destruction | |
| JP3338724B2 (en) | Database save method | |
| JPH05134888A (en) | Information processor | |
| JP2811906B2 (en) | Vending machine data error notification control device | |
| JPS62284440A (en) | Software resource maintenance system for terminal equipment | |
| JP2814587B2 (en) | Watchdog timer | |
| JPH02162437A (en) | File processing device | |
| JPH05324416A (en) | System error history saving system | |
| JPH01162094A (en) | Key telephone system | |
| JPH05120088A (en) | Memory dump sampling device | |
| JPH01126709A (en) | data processing equipment | |
| JPH04184551A (en) | Data restoring system for electronic disk device | |
| JPH08292804A (en) | Process failure monitoring method by programmable controller | |
| JPS63257042A (en) | Memory device for history of key operation | |
| JPS5816352A (en) | Processing method in recovery mode of power supply interruption for microcomputer | |
| JPS6089257A (en) | Software logic trouble saving system | |
| JPS63191243A (en) | Collection system for jump history data | |
| JPH0316656B2 (en) |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| EXPY | Cancellation because of completion of term |