+

JPH1125057A - Inter-subsystem time correction system - Google Patents

Inter-subsystem time correction system

Info

Publication number
JPH1125057A
JPH1125057A JP9193148A JP19314897A JPH1125057A JP H1125057 A JPH1125057 A JP H1125057A JP 9193148 A JP9193148 A JP 9193148A JP 19314897 A JP19314897 A JP 19314897A JP H1125057 A JPH1125057 A JP H1125057A
Authority
JP
Japan
Prior art keywords
system time
time
subsystem
calendar clock
synchronization message
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
JP9193148A
Other languages
Japanese (ja)
Inventor
Hisanao Kataoka
久直 片岡
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 JP9193148A priority Critical patent/JPH1125057A/en
Publication of JPH1125057A publication Critical patent/JPH1125057A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

PROBLEM TO BE SOLVED: To acquire properly corrected system time without changing a calendar clock in a subsystem itself. SOLUTION: A system time informing means 13 built in a main system 1 periodically acquires current system time from a calendar clock 12 and informs respective subsystems 2 of the current system time. A time correction means 22 built in each subsystem 2 acquires a local calendar clock 21 to be corrected and stores a system time correction value consisting of a difference from the system time informed by the main system 1 in a shared table 25. A system time acquiring means 27 built in the subsystem 2 acquires the local calendar clock 21 at the time of receiving a time acquiring request from an operation program 26, and while taking account of the system time correction value stored in the table 25, provides the corrected time as a current system time.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はシステム時刻に同期
して動作するコンピュータネットワークシステムに関
し、特にサブシステム間時刻補正方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer network system operating in synchronization with a system time, and more particularly to a time correction method between subsystems.

【0002】[0002]

【従来の技術】従来、メインシステムが保有する、シス
テム系内唯一の絶対時刻(以下、システム時刻という)
に複数のサブシステムを同期させて動作させることは、
メインシステムから一定時間毎に配信される時刻通知に
基づき、各サブシステムで保有するローカルなカレンダ
クロックを随時更新することにより実現されていた(特
開平3−25582号公報,特開平2−156758号
公報等参照)。
2. Description of the Related Art Conventionally, the only absolute time in a system system which is owned by a main system (hereinafter, referred to as a system time).
Synchronizing and operating multiple subsystems in
This has been realized by updating the local calendar clock held in each subsystem as needed based on a time notification distributed from the main system at regular intervals (Japanese Patent Application Laid-Open Nos. 3-25582 and 2-156758). Gazette).

【0003】[0003]

【発明が解決しようとする課題】上述した従来の技術で
は、サブシステム内のカレンダクロックの変更を伴うた
め、(評価等の目的により)システム時刻を任意に設定
できる業務系システムにおいては、カレンダクロックを
参照している他のプログラム(オペレーティングシステ
ムを含む)の矛盾を引き起こし、最悪の場合にはシステ
ム停止等の重大障害を招くおそれがあるという問題点が
あった。
In the above-mentioned prior art, since the calendar clock in the subsystem is changed, in the business system in which the system time can be arbitrarily set (for evaluation or the like), the calendar clock is not used. This causes inconsistency of other programs (including the operating system) that refer to, and in the worst case, there is a risk of causing a serious failure such as a system stop.

【0004】また、カレンダクロックが常に正確である
とは限らないため、メインシステムと切り離された状態
でファイル保守等のオフライン作業を行う際には、必ず
時刻設定を行う必要があり、これを怠った場合は作成し
たファイル等の日付(タイムスタンプ)が不正確なもの
となり、ファイル管理上重大な支障を引き起こすおそれ
があるという問題点があった。
In addition, since the calendar clock is not always accurate, it is necessary to always set the time when performing offline work such as file maintenance while being disconnected from the main system. In such a case, the date (time stamp) of the created file or the like becomes inaccurate, which may cause a serious problem in file management.

【0005】本発明の目的は、システム時刻を提供する
メインシステム側と、提供されるサブシステム側とでは
(よほどのクロック精度の差が無い限り)ある一定の誤
差を保ちながら同期して動作することに着目し、システ
ム時刻を提供されるサブシステム側でその誤差をシステ
ム時刻補正値として保持することにより、自己のカレン
ダクロックを変更することなく、適時補正されたシステ
ム時刻を取得することを可能にするサブシステム間時刻
補正方式を提供することにある。
An object of the present invention is to operate synchronously while maintaining a certain error between the main system providing the system time and the subsystem provided (as long as there is no significant difference in clock accuracy). Focusing on the fact that the subsystem that provides the system time keeps the error as the system time correction value, so that the time corrected system time can be obtained without changing its own calendar clock To provide a time correction method between subsystems.

【0006】[0006]

【課題を解決するための手段】本発明のサブシステム間
時刻補正方式は、システム系内唯一のシステム時刻を計
時するメインシステムと、このメインシステムのシステ
ム時刻に同期して業務処理を行うサブシステムとを備え
るコンピュータネットワークシステムにおいて、前記メ
インシステムからの定期的なシステム時刻同期メッセー
ジの配信により、各サブシステム内の業務プログラムで
システム時刻の補正を行う際に、各サブシステム毎に保
有するローカルなカレンダクロックを変更することな
く、システム時刻の補正を可能とすることを特徴とす
る。
According to the present invention, there is provided a system for correcting time between subsystems, comprising: a main system for measuring only the system time in a system; and a subsystem for performing business processing in synchronization with the system time of the main system. In the computer network system having the following, when the system time is corrected by the business program in each subsystem by regularly transmitting the system time synchronization message from the main system, a local system held for each subsystem is provided. The system time can be corrected without changing the calendar clock.

【0007】また、本発明のサブシステム間時刻補正方
式は、システム系内唯一のシステム時刻を計時するメイ
ンシステムと、このメインシステムのシステム時刻に同
期して業務処理を行うサブシステムとを備えるコンピュ
ータネットワークシステムにおいて、前記メインシステ
ムに設けられ、定期的に各サブシステムに現在のシステ
ム時刻を通知するシステム時刻通知手段と、前記サブシ
ステムに設けられ、補正対象となるローカルなカレンダ
クロックを取得し、前記メインシステムから通知された
システム時刻との差分でなるシステム時刻補正値を共有
テーブル上に保持する時刻補正手段と、前記サブシステ
ムに設けられ、業務プログラムからの時刻取得要求に対
して、ローカルなカレンダクロックを取得し、前記共有
テーブルに保持されたシステム時刻補正値を加味してそ
の時点でのシステム時刻として提供するシステム時刻取
得手段とを有する。前記システム時刻通知手段が、タイ
マ割込みにより定期的にシステム時刻同期メッセージの
送信タイミングを発生させるメッセージ送信タイミング
発生部と、このメッセージ送信タイミング発生部からの
送信タイミングに基づいてカレンダクロックからシステ
ム時刻を取得しシステム時刻同期メッセージを作成して
サブシステムに送信するシステム時刻同期メッセージ送
信部とからなっていてもよい。また、前記時刻補正手段
が、システム時刻同期メッセージを受信するシステム時
刻同期メッセージ受信部と、このシステム時刻同期メッ
セージ受信部により受信されたシステム時刻同期メッセ
ージ中のシステム時刻とローカルなカレンダクロックと
の差分であるシステム時刻補正値を計算して共有テーブ
ルに格納するシステム時刻補正値計算部とからなってい
てもよい。さらに、前記システム時刻取得手段が、業務
プログラムにリンクされ、不定期に呼び出されるサブル
ーチンからなっていてもよい。これにより、メインシス
テムでは、システム時刻通知手段により、同一システム
系内の各サブシステムに、補正の基準となるシステム時
刻を通知することができる。一方、各サブシステムで
は、時刻補正手段により、自システム内のカレンダクロ
ックの時刻とメインシステムから通知されたシステム時
刻との差分を求め、その差分をシステム時刻補正値とし
て共有テーブル上に保持する。このとき、カレンダクロ
ックの変更は行っていない。また、システム時刻取得手
段は、業務プログラムからシステム時刻の通知要求があ
った場合に作用し、その時点でのローカルなカレンダク
ロックに共有テーブル上のシステム時刻補正値を加算す
ることで、同時点のシステム時刻を容易に取得すること
ができる。
[0007] A time correction method between subsystems according to the present invention is a computer comprising a main system for measuring only the system time in a system, and a subsystem for performing business processing in synchronization with the system time of the main system. In the network system, a system time notification unit provided in the main system and periodically notifying the current system time to each subsystem, and a local calendar clock provided in the subsystem and to be corrected, A time correction unit that holds a system time correction value, which is a difference from the system time notified from the main system, on a shared table; and a local time correction unit that is provided in the subsystem and that responds to a time acquisition request from a business program. Get the calendar clock and keep it in the shared table It was by adding the system time correction value and a system time acquisition means for providing a system time at that time. A message transmission timing generator for periodically generating a transmission timing of a system time synchronization message by a timer interrupt; and acquiring a system time from a calendar clock based on the transmission timing from the message transmission timing generator. And a system time synchronization message transmitting unit that creates a system time synchronization message and transmits it to the subsystem. Also, the time correction means may include a system time synchronization message receiving unit that receives a system time synchronization message, and a difference between a system time in the system time synchronization message received by the system time synchronization message receiving unit and a local calendar clock. And a system time correction value calculation unit that calculates the system time correction value and stores it in the shared table. Further, the system time obtaining means may be a subroutine linked to a business program and called at irregular intervals. Thus, in the main system, the system time serving as a correction reference can be notified to each subsystem in the same system system by the system time notifying unit. On the other hand, in each subsystem, the difference between the time of the calendar clock in the own system and the system time notified from the main system is obtained by the time correction means, and the difference is stored in the shared table as a system time correction value. At this time, the calendar clock was not changed. Further, the system time obtaining means operates when a notification of the system time is requested from the business program, and adds the system time correction value on the shared table to the local calendar clock at that time, thereby obtaining the simultaneous time. The system time can be easily obtained.

【0008】一方、本発明の記録媒体は、メインシステ
ムのコンピュータを、定期的に各サブシステムに現在の
システム時刻を通知するシステム時刻通知手段として機
能させるためのプログラムと、各サブシステムのコンピ
ュータを、補正対象となるローカルなカレンダクロック
を取得し、前記メインシステムから通知されたシステム
時刻との差分でなるシステム時刻補正値を共有テーブル
上に保持する時刻補正手段,および業務プログラムから
の時刻取得要求に対して、ローカルなカレンダクロック
を取得し、前記共有テーブルに保持されたシステム時刻
補正値を加味してその時点でのシステム時刻として提供
するシステム時刻取得手段として機能させるためのプロ
グラムとを記録する。
On the other hand, the recording medium of the present invention comprises a program for causing a computer of a main system to function as a system time notifying means for periodically notifying each subsystem of the current system time, and a computer of each subsystem. A time correction unit that obtains a local calendar clock to be corrected, and stores a system time correction value, which is a difference from the system time notified from the main system, in a shared table, and a time acquisition request from a business program. A program for acquiring a local calendar clock, and taking into account the system time correction value held in the shared table, and providing a program for functioning as system time acquisition means for providing the system time at that time. .

【0009】また、本発明の記録媒体は、コンピュータ
を、定期的に各サブシステムに現在のシステム時刻を通
知するシステム時刻通知手段として機能させるためのプ
ログラムを記録する。
Further, the recording medium of the present invention records a program for causing a computer to function as a system time notifying means for periodically notifying each subsystem of the current system time.

【0010】さらに、本発明の記録媒体は、コンピュー
タを、補正対象となるローカルなカレンダクロックを取
得し、メインシステムから通知されたシステム時刻との
差分でなるシステム時刻補正値を共有テーブル上に保持
する時刻補正手段,および業務プログラムからの時刻取
得要求に対して、ローカルなカレンダクロックを取得
し、前記共有テーブルに保持されたシステム時刻補正値
を加味してその時点でのシステム時刻として提供するシ
ステム時刻取得手段として機能させるためのプログラム
を記録する。
Further, in the recording medium of the present invention, the computer acquires a local calendar clock to be corrected and holds a system time correction value, which is a difference from the system time notified from the main system, on a shared table. And a system for acquiring a local calendar clock in response to a time acquisition request from a business program, and providing the system time at that time taking into account the system time correction value held in the shared table. A program for functioning as time acquisition means is recorded.

【0011】[0011]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0012】図1は、本発明の第1の実施の形態に係る
サブシステム間時刻補正方式を適用するコンピュータネ
ットワークシステムの構成を示すブロック図である。こ
のコンピュータネットワークシステムは、システム時刻
を計時するメインシステム1と、システム時刻に同期し
て動作する業務プログラム26を搭載したサブシステム
2とから、その主要部が構成されている。
FIG. 1 is a block diagram showing a configuration of a computer network system to which an inter-subsystem time correction method according to a first embodiment of the present invention is applied. The main part of this computer network system is composed of a main system 1 for measuring the system time and a subsystem 2 having a business program 26 operating in synchronization with the system time.

【0013】メインシステム1とサブシステム2とは、
通信回線3により直接接続されている。補正後のシステ
ム時刻の精度を高めるためには、極力高速な通信手段を
用いることが望ましく、業務処理等による通信量が多い
場合は時刻同期用に専用の通信回線を設置することも必
要となる。
The main system 1 and the subsystem 2
It is directly connected by the communication line 3. In order to increase the accuracy of the corrected system time, it is desirable to use a communication means with a high speed as much as possible, and when there is a large amount of communication due to business processing or the like, it is necessary to install a dedicated communication line for time synchronization. .

【0014】図2は、メインシステム1からサブシステ
ム2に通信回線3を通じて送信されるシステム時刻同期
メッセージMの一例を示す図である。このシステム時刻
同期メッセージMは、送信先識別子,送信元識別子およ
びデータ長からなるヘッダ部と、メッセージID(ID
entification)およびメッセージからなる
メッセージ部とにより構成される。
FIG. 2 is a diagram showing an example of a system time synchronization message M transmitted from the main system 1 to the subsystem 2 via the communication line 3. The system time synchronization message M includes a header portion including a transmission destination identifier, a transmission source identifier, and a data length, and a message ID (ID
and a message portion including a message.

【0015】メインシステム1には、割込みタイマ11
およびカレンダクロック12を含むオペレーティングシ
ステム(以下、OSと略記する)10と、メッセージ送
信タイミング発生部14およびシステム時刻同期メッセ
ージ送信部15からなるシステム時刻通知手段13とが
搭載されている。
The main system 1 includes an interrupt timer 11
An operating system (hereinafter abbreviated as OS) 10 including a calendar clock 12 and a system time notifying unit 13 including a message transmission timing generation unit 14 and a system time synchronization message transmission unit 15 are mounted.

【0016】システム時刻通知手段13は、割込みタイ
マ11からの割込みにより定期的にシステム時刻同期メ
ッセージMの送信タイミングを発生させるメッセージ送
信タイミング発生部14と、カレンダクロック12から
システム時刻を取得しシステム時刻同期メッセージを作
成してサブシステム2に送信するシステム時刻同期メッ
セージ送信部15とから構成されている。
The system time notifying means 13 includes a message transmission timing generator 14 for periodically generating the transmission timing of the system time synchronizing message M in response to an interrupt from the interrupt timer 11, a system time from the calendar clock 12, and a system time. And a system time synchronization message transmitting unit 15 for generating a synchronization message and transmitting it to the subsystem 2.

【0017】メインシステム1の立ち上げ時、まずシス
テム時刻同期メッセージ送信部15においてシステム時
刻同期メッセージ送信部15〜システム時刻同期メッセ
ージ受信部23間の論理通信路の開設が行われる。開設
に成功した場合、システム時刻同期メッセージ送信部1
5は、カレンダクロック12からその時点でのシステム
時刻を取得し、システム時刻同期メッセージMを作成し
て各サブシステム2に送信する(初回送信)。
When the main system 1 is started, first, a logical communication path between the system time synchronization message transmitting unit 15 and the system time synchronization message receiving unit 23 is established in the system time synchronization message transmitting unit 15. If the establishment is successful, the system time synchronization message transmission unit 1
5 acquires the system time at that time from the calendar clock 12, creates a system time synchronization message M, and transmits it to each subsystem 2 (first transmission).

【0018】一方、メッセージ送信タイミング発生部1
4は、初期起動時から常時、割込みタイマ11からの割
込みに基づいて定期的にシステム時刻同期メッセージ送
信部15に対してシステム時刻の送信タイミングを与え
続ける。
On the other hand, a message transmission timing generator 1
4 continuously gives the transmission timing of the system time to the system time synchronization message transmitting unit 15 regularly based on the interrupt from the interrupt timer 11 from the time of initial startup.

【0019】システム時刻同期メッセージ送信部15
は、メッセージ送信タイミング発生部14からの送信タ
イミングに応じてカレンダクロック12からその時点で
のシステム時刻を取得し、論理通信路が開設されている
サブシステム2に対してシステム時刻同期メッセージM
を送信する。これにより、コンピュータネットワークシ
ステム全体の継続的なシステム時刻の補正を可能にして
いる。
System time synchronization message transmission section 15
Obtains the current system time from the calendar clock 12 in accordance with the transmission timing from the message transmission timing generator 14, and sends the system time synchronization message M to the subsystem 2 in which the logical communication path is established.
Send This enables continuous correction of the system time of the entire computer network system.

【0020】メッセージ送信タイミング発生部14が与
える送信タイミング(間隔)は、そのコンピュータネッ
トワークシステムに要求されるシステム時刻の精度やサ
ブシステム2のローカルなカレンダクロックの精度等に
より決定される評価値とする。
The transmission timing (interval) provided by the message transmission timing generator 14 is an evaluation value determined by the accuracy of the system time required for the computer network system, the accuracy of the local calendar clock of the subsystem 2, and the like. .

【0021】なお、システム時刻同期メッセージ送信部
15においては、論理通信路の開設に失敗した場合の再
試行処理を具備しておく必要がある。これは、サブシス
テム2側でも同様である。
It should be noted that the system time synchronization message transmitting section 15 needs to be provided with a retry process when the establishment of the logical communication path has failed. This is the same on the subsystem 2 side.

【0022】サブシステム2は、カレンダクロック21
を含むOS20と、時刻補正手段22と、共有テーブル
25と、システム時刻取得手段27を含む業務プログラ
ム26とを搭載している。
The subsystem 2 includes a calendar clock 21
, A time correction unit 22, a shared table 25, and a business program 26 including a system time acquisition unit 27.

【0023】時刻補正手段22は、システム時刻同期メ
ッセージMを受信するシステム時刻同期メッセージ受信
部23と、システム時刻補正値を計算して共有テーブル
25に格納するシステム時刻補正値計算部24とから構
成されている。
The time correction means 22 comprises a system time synchronization message receiving section 23 for receiving the system time synchronization message M, and a system time correction value calculating section 24 for calculating the system time correction value and storing it in the shared table 25. Have been.

【0024】業務プログラム26には、不定期に呼び出
されるサブルーチンでなるシステム時刻取得手段27が
リンクされている。
The business program 26 is linked with a system time acquisition means 27 which is a subroutine called at irregular intervals.

【0025】なお、システム時刻補正値計算部24とシ
ステム時刻取得手段27とで補正値を共有するために共
有テーブル25を使用している。
The shared table 25 is used for sharing the correction value between the system time correction value calculation unit 24 and the system time acquisition unit 27.

【0026】サブシステム2の立ち上げ時、メインシス
テム1と同様に、システム時刻同期メッセージ受信部2
3においてメインシステム1との間に論理通信路の開設
を行う。開設後は、常時受信状態を保持し、システム時
刻同期メッセージMの受信のたびにシステム時刻補正値
計算部24に対して受信通知を行う。
When the subsystem 2 is started, similarly to the main system 1, the system time synchronization message receiving unit 2
In 3, a logical communication path is established with the main system 1. After the establishment, the reception state is always maintained, and each time the system time synchronization message M is received, a reception notification is sent to the system time correction value calculation unit 24.

【0027】システム時刻補正値計算部24は、初期起
動時に共有テーブル25の確保を行う。共有テーブル2
5には、ローカルのカレンダクロック21とシステム時
刻との差分でなるシステム時刻補正値を格納するため、
システム時刻をメインシステム1から受信するまでの
間、その値は0である。
The system time correction value calculation section 24 secures the shared table 25 at the time of initial startup. Shared table 2
5 stores a system time correction value which is a difference between the local calendar clock 21 and the system time.
Until the system time is received from the main system 1, its value is 0.

【0028】システム時刻補正値計算部24は、システ
ム時刻同期メッセージ受信部23からの受信完了通知を
契機に自サブシステム2のカレンダクロック21から現
在時刻を取得し、通知されたシステム時刻との差分を求
める。この時点では、求めた差分をシステム時刻補正値
として共有テーブル25に保存するだけである。
The system time correction value calculation unit 24 obtains the current time from the calendar clock 21 of the own subsystem 2 in response to the reception completion notification from the system time synchronization message reception unit 23, and calculates the difference from the notified system time. Ask for. At this point, the obtained difference is simply stored in the shared table 25 as the system time correction value.

【0029】システム時刻取得手段27は、それ自身が
リンクされている業務プログラム26の内部でシステム
時刻が必要になったときに呼び出され、要求元に現在の
システム時刻を通知する機能を実現するサービスプログ
ラムである。業務プログラム26からの不定期の呼び出
し時、まずローカルなカレンダクロック21から現在時
刻を求め、それに共有テーブル25のシステム時刻補正
値を加算したものをシステム時刻として要求元の業務プ
ログラム26へ返す。
The system time acquisition means 27 is a service which is called when the system time is needed in the business program 26 to which it is linked, and realizes a function of notifying the request source of the current system time. It is a program. At the time of an irregular call from the business program 26, first, the current time is obtained from the local calendar clock 21, and a value obtained by adding the system time correction value of the shared table 25 to the current time is returned to the requesting business program 26 as the system time.

【0030】なお、図1においてシステム時刻を必要と
する業務プログラム26が複数存在する場合は、それぞ
れがシステム時刻取得手段27をリンクしている必要が
ある。
When there are a plurality of business programs 26 requiring the system time in FIG. 1, each of them needs to link the system time acquisition means 27.

【0031】図3を参照すると、メッセージ送信タイミ
ング発生部14の処理は、一定時間スリープステップA
001と、送信要求メッセージ作成ステップA002
と、イベント通知ステップA003とからなる。
Referring to FIG. 3, the process of the message transmission timing generator 14 is a sleep step A for a fixed time.
001 and transmission request message creation step A002
And an event notification step A003.

【0032】図4を参照すると、システム時刻同期メッ
セージ送信部15の処理は、論理通信路開設ステップA
101と、一定時間スリープステップA102と、共通
の送信処理ステップA103と、イベント待ち合わせス
テップA104と、共通の送信処理ステップA105と
からなる。
Referring to FIG. 4, the processing of the system time synchronization message transmitting unit 15 is performed in a logical communication channel opening step A.
101, a sleep step A102 for a fixed time, a common transmission processing step A103, an event waiting step A104, and a common transmission processing step A105.

【0033】図5を参照すると、共通の送信処理ステッ
プA103は、さらに、カレンダ時刻取得ステップA1
11と、相対時間変換ステップA112と、メッセージ
送信ステップA113とからなる。
Referring to FIG. 5, the common transmission processing step A103 further includes a calendar time acquisition step A1.
11, a relative time conversion step A112, and a message transmission step A113.

【0034】図6を参照すると、システム時刻同期メッ
セージ受信部23の処理は、論理通信路開設ステップA
201と、一定時間スリープステップA202と、メッ
セージ受信待ちステップA203と、システム時刻取り
出しステップA204と、イベント通知ステップA20
5とからなる。
Referring to FIG. 6, the processing of the system time synchronization message receiving unit 23 is a logical communication channel establishment step A.
201, a predetermined time sleep step A202, a message reception waiting step A203, a system time retrieval step A204, and an event notification step A20.
5

【0035】図7を参照すると、システム時刻補正値計
算部24の処理は、共有テーブル確保ステップA301
と、イベント受信待ちステップA302と、カレンダ時
刻取得ステップA303と、相対時間変換ステップA3
04と、システム時刻補正値格納ステップA305とか
らなる。
Referring to FIG. 7, the processing of the system time correction value calculating section 24 is performed in a shared table securing step A301.
, An event reception waiting step A302, a calendar time acquisition step A303, and a relative time conversion step A3.
04 and a system time correction value storage step A305.

【0036】図8を参照すると、業務プログラム26の
処理は、業務処理ステップA401と、システム時刻取
得要求ステップA402と、業務処理ステップA403
とからなる。
Referring to FIG. 8, the processing of the business program 26 includes a business processing step A401, a system time acquisition requesting step A402, and a business processing step A403.
Consists of

【0037】図9を参照すると、システム時刻取得手段
27の処理は、カレンダ時刻取得ステップA501と、
相対時間変換ステップA502と、システム時刻相対時
間計算ステップA503と、カレンダシステム時刻変換
ステップA504と、システム時刻返却ステップA50
5とからなる。
Referring to FIG. 9, the processing of the system time obtaining means 27 includes a calendar time obtaining step A501,
Relative time conversion step A502, system time relative time calculation step A503, calendar system time conversion step A504, system time return step A50
5

【0038】図10は、第1の実施の形態におけるシス
テム時刻とサブシステムローカル時刻との関係を示すタ
イミングチャートである。
FIG. 10 is a timing chart showing the relationship between the system time and the subsystem local time in the first embodiment.

【0039】次に、このように構成された第1の実施の
形態に係るサブシステム間時刻補正方式の動作につい
て、図1ないし図10を参照しながら説明する。
Next, the operation of the time correction method between subsystems according to the first embodiment configured as described above will be described with reference to FIGS.

【0040】メッセージ送信タイミング発生部14は、
初期起動直後から一定時間スリープし(ステップA00
1)、その満了時にシステム時刻同期メッセージMの送
信要求メッセージを作成し(ステップA002)、シス
テム時刻同期メッセージ送信部15にイベントの通知を
行う(ステップA003)。通知後、メッセージ送信タ
イミング発生部14は、再びステップA001に制御を
戻す。
The message transmission timing generator 14
Sleep for a certain period of time immediately after the initial startup (Step A00)
1) At the time of expiration, a transmission request message for the system time synchronization message M is created (step A002), and an event is notified to the system time synchronization message transmission unit 15 (step A003). After the notification, the message transmission timing generator 14 returns the control to step A001 again.

【0041】また、システム時刻同期メッセージ送信部
15は、初期起動時にサブシステム2との論理通信路の
開設を行う(ステップA101)。開設に失敗した場合
は再試行を行うため、一定時間スリープする(ステップ
A102)。開設に成功した場合は、システム時刻同期
メッセージ送信部15は、共通の送信処理を行う(ステ
ップA103)。すなわち、システム時刻同期メッセー
ジ送信部15は、その時点でOS10が提供するカレン
ダクロック12から現在の時刻Ts を取得し(ステップ
A111)、それをシステム系内で一意に取り決めた、
過去の任意の時刻T0 からの相対時間Δts に変換し
(ステップA112)、システム時刻同期メッセージM
としてサブシステム2ヘ送信する(ステップA11
3)。システム時刻Ts を過去の任意の時刻T0 からの
相対時間Δts に変換するのは、サブシステム2におい
て時刻補正のための計算を容易にするためである。
Further, the system time synchronization message transmitting section 15 establishes a logical communication path with the subsystem 2 at the time of initial startup (step A101). If the establishment has failed, the system sleeps for a certain period of time to retry (step A102). If the establishment is successful, the system time synchronization message transmission unit 15 performs a common transmission process (step A103). That is, the system time synchronization message transmission unit 15 acquires the current time T s from the calendar clock 12 to provide the OS10 at that time (step A111), we negotiated it uniquely within the system based,
Into a relative time Delta] t s from arbitrary time T 0 of the past (Step A 112), system time synchronization message M
To the subsystem 2 (step A11).
3). The reason for converting the system time T s into a relative time Δt s from an arbitrary time T 0 in the past is to facilitate calculations for time correction in the subsystem 2.

【0042】初期処理後は、システム時刻同期メッセー
ジ送信部15は、メッセージ送信タイミング発生部14
からのイベント待ちとなる(ステップA104)。メッ
セージ送信タイミング発生部14から送信要求イベント
を受信したならば、システム時刻同期メッセージ送信部
15は、初期処理時と同様に、共通送信処理のステップ
A111〜A113を実行する(ステップA105)。
After the initial processing, the system time synchronizing message transmitting section 15
(Step A104). When the transmission request event is received from the message transmission timing generator 14, the system time synchronization message transmitter 15 executes steps A111 to A113 of the common transmission processing as in the case of the initial processing (step A105).

【0043】システム時刻同期メッセージ受信部23
は、初期起動時にメインシステム1との論理通信路の開
設を行う(ステップA201)。開設に失敗した場合は
再試行を行うため、一定時間スリープする(ステップA
202)。開設に成功した場合は、システム時刻同期メ
ッセージ受信部23は、その時点からメインシステム1
からのシステム時刻同期メッセージMの受信待ちを継続
する(ステップA203)。メインシステム1からのシ
ステム時刻同期メッセージMを受信した場合は、システ
ム時刻同期メッセージ受信部23は、それからシステム
時刻の相対時間ΔTs を取り出し(ステップA20
4)、システム時刻補正値計算部24へ通知する(ステ
ップA205)。通知後、システム時刻同期メッセージ
受信部23は、再びメッセージ受信待ちを継続する(ス
テップA203)。
System time synchronization message receiving section 23
Opens a logical communication path with the main system 1 at the time of initial startup (step A201). If the establishment fails, sleep for a certain period of time to retry (step A
202). If the establishment is successful, the system time synchronization message receiving section 23 starts the main system 1
(Step A203). When receiving the system time synchronization message M from the main system 1, the system time synchronization message receiving unit 23 extracts the relative time ΔT s of the system time therefrom (step A20).
4), and notifies the system time correction value calculation unit 24 (step A205). After the notification, the system time synchronization message receiving unit 23 continues to wait for the message reception again (step A203).

【0044】システム時刻補正値計算部24は、初期起
動時にシステム時刻補正値Δtを格納しておくための共
有テーブル25を確保してシステム時刻取得手段27か
ら参照可能としておく(ステップA301)。その後、
システム時刻補正値計算部24は、システム時刻同期メ
ッセージ受信部23からの時刻受信通知待ち状態で待機
する(ステップA302)。システム時刻同期メッセー
ジ受信部23からの時刻受信通知を受信したならば、シ
ステム時刻補正値計算部24は、OS20が提供するカ
レンダクロック21から現在の時刻T1 を取得し(ステ
ップA303)、メインシステム1で行うのと同様に、
それをシステム系内で一意に取り決めた時刻T0 からの
相対時間Δt1 に変換した後(ステップA304)、シ
ステム時刻補正値Δt=Δts −Δt1 を求めて共有テ
ーブル25に格納する(ステップA305)。格納した
ならば、システム時刻補正値計算部24は、再び時刻受
信通知待ちの状態で待機する(ステップA302)。
The system time correction value calculation unit 24 secures a shared table 25 for storing the system time correction value Δt at the time of the initial startup, and makes the system table obtainable by the system time acquisition unit 27 (step A301). afterwards,
The system time correction value calculation unit 24 waits in a state of waiting for a time reception notification from the system time synchronization message reception unit 23 (step A302). Upon receiving the time reception notification from the system time synchronization message receiving part 23, the system time correction value calculation unit 24 obtains the current time T 1 from the calendar clock 21 OS20 is provided (step A303), the main system Just like in step 1,
After it is converted into a relative time Δt 1 from time T 0 uniquely decided in the system (step A304), a system time correction value Δt = Δt s −Δt 1 is obtained and stored in the shared table 25 (step A304). A305). After the storage, the system time correction value calculation unit 24 waits again for a time reception notification (step A302).

【0045】業務処理中に(ステップA401)、業務
プログラム26でシステム時刻が必要になった場合は、
業務プログラム26は、システム時刻取得手段27を呼
び出す(ステップA402)。
When the system time is required by the business program 26 during the business process (step A401),
The business program 26 calls the system time acquisition unit 27 (Step A402).

【0046】呼び出されたシステム時刻補正手段27
は、まずOS20が提供するカレンダクロック21から
現在時刻T2 を読み込み(ステップA501)、やはり
時刻T0 からの相対時間Δt2 に変換し(ステップA5
02)、システム時刻の相対時間Δts =Δt2 +Δt
を求める(ステップA503)。最後に、システム時刻
補正手段27は、それをカレンダ時刻Ts に変換し(ス
テップA504)、要求元に返す(ステップA50
5)。
The called system time correction means 27
Reads (step A 501) the current time T 2, from the calendar clock 21 to first OS20 is provided, to convert again the relative time Delta] t 2 from time T 0 (step A5
02), relative time of system time Δt s = Δt 2 + Δt
(Step A503). Finally, the system time correction means 27, converts it to calendar time T s (step A 504), and returns to the requestor (step A50
5).

【0047】この後、業務プログラム26は、業務処理
を再開する(ステップA403)。
Thereafter, the business program 26 resumes business processing (step A403).

【0048】次に、本発明の第2の実施の形態について
図面を参照して詳細に説明する。
Next, a second embodiment of the present invention will be described in detail with reference to the drawings.

【0049】図11を参照すると、本発明の第2の実施
の形態に係るサブシステム間時刻補正方式は、図1に示
した第1の実施の形態に係るサブシステム間時刻補正方
式に対して、システム時刻通知手段13に相当するシス
テム時刻通知プログラムを記録した記録媒体4と、時刻
補正手段22に相当する時刻補正プログラムおよびシス
テム時刻取得手段27に相当するシステム時刻取得プロ
グラムを記録した記録媒体5とを備えるものである。
Referring to FIG. 11, the time correction method between subsystems according to the second embodiment of the present invention is different from the time correction method between subsystems according to the first embodiment shown in FIG. A recording medium 4 in which a system time notification program corresponding to the system time notification means 13 is recorded, and a recording medium 5 in which a time correction program corresponding to the time correction means 22 and a system time acquisition program corresponding to the system time acquisition means 27 are recorded. Is provided.

【0050】システム時刻通知プログラムは、記録媒体
4からメインシステム1に読み込まれ、メインシステム
1の動作を制御する。システム時刻通知プログラムの制
御によるメインシステム1の動作は、図1に示した第1
の実施の形態に係るサブシステム間時刻補正方式におけ
るメインシステム1の動作と全く同様であるので、その
詳しい説明を割愛する。
The system time notification program is read from the recording medium 4 into the main system 1 and controls the operation of the main system 1. The operation of the main system 1 under the control of the system time notification program is the same as that of the first system shown in FIG.
The operation is the same as that of the main system 1 in the inter-subsystem time correction method according to the embodiment, and thus the detailed description is omitted.

【0051】また、時刻補正プログラムおよびシステム
時刻取得プログラムは、記録媒体5からサブシステム2
に読み込まれ、サブシステム2の動作を制御する。時刻
補正プログラムおよびシステム時刻取得プログラムの制
御によるサブシステム2の動作は、図1に示した第1の
実施の形態に係るサブシステム間時刻補正方式における
サブシステム2の動作と全く同様であるので、その詳し
い説明を割愛する。
The time correction program and the system time acquisition program are transmitted from the storage medium 5 to the subsystem 2.
To control the operation of the subsystem 2. The operation of the subsystem 2 under the control of the time correction program and the system time acquisition program is exactly the same as the operation of the subsystem 2 in the inter-subsystem time correction method according to the first embodiment shown in FIG. I omit the detailed explanation.

【0052】[0052]

【実施例】次に、第1の実施の形態に係るサブシステム
間時刻補正方式の一実施例について、図12ないし図1
9を参照して説明する。
Next, an embodiment of the time correction method between subsystems according to the first embodiment will be described with reference to FIGS.
This will be described with reference to FIG.

【0053】図12は、本実施例のサブシステム間時刻
補正方式が適用されたコンピュータネットワークシステ
ム全体の構成を表しており、メインシステムCPU0l
と、サブシステムFEP0l,FEP02およびFEP
03とが通信回線3としてのバス型LANで接続される
形態をとっている。
FIG. 12 shows the overall configuration of a computer network system to which the time correction method between subsystems according to the present embodiment is applied.
And subsystems FEP01, FEP02 and FEP
03 is connected by a bus-type LAN as the communication line 3.

【0054】メインシステムCPU0lのシステム時刻
通知手段13を構成するプログラムには、タスクTFP
にシステム時刻の送信タイミングを与えるタスクTCP
と、バス型LANで接続された各サブシステムFEP0
l,FEP02およびFEP03とのデータリンク制御
およびシステム時刻の送信処理を行うタスクTFPとが
ある。
The program constituting the system time notifying means 13 of the main system CPU01 includes a task TFP
Task TCP that gives the transmission timing of the system time to the
And each subsystem FEP0 connected by a bus type LAN
1, a task TFP for performing data link control with FEP02 and FEP03 and transmitting system time.

【0055】一方、各サブシステムFEP0l,FEP
02およびFEP03で共通に動作する時刻補正手段2
2を構成するプログラムには、メインシステムCPU0
lとのデータリンク制御およびシステム時刻の受信処理
を行うタスクHDPと、タスクHDPからの通知により
システム時刻補正値を計算して共有テーブルcomtb
1に格納するタスクNCPとがある。
On the other hand, each subsystem FEP01, FEP
Time correction means 2 which operates in common with FEP02 and FEP03
2 include main system CPU 0
l, a task HDP for performing data link control with the system l and a process for receiving the system time, and a system time correction value calculated based on a notification from the task HDP, and a shared table
1 is stored in the task NCP.

【0056】また、業務処理を行うタスクAPには、G
etSystemTime()という名前で提供される
ライブラリ関数であるサブルーチンがリンクされてい
る。
The task AP for performing business processing includes G
A subroutine that is a library function provided as etSystemTime () is linked.

【0057】さらに、タスクNCPとタスクAPとから
共通に参照可能である共有テーブルcomtb1が確保
されている。
Further, a shared table commtb1 that can be commonly referred to by the task NCP and the task AP is secured.

【0058】次に、このような本実施例のサブシステム
間時刻補正方式の動作について、図12ないし図19を
参照して説明する。
Next, the operation of the time correction method between subsystems according to the present embodiment will be described with reference to FIGS.

【0059】まず、処理を説明するのに必要となる2つ
のパラメータp1およびp2について説明する。
First, two parameters p1 and p2 necessary for explaining the processing will be described.

【0060】パラメータp1は、コンピュータネットワ
ークシステムで一意に取り決めたシステム時刻の補正の
基準点となる過去の時刻であり、その値は1997年1
月1日午前0時0分0秒である。パラメータp2は、シ
ステム時刻の補正間隔であり、その値は3600[秒]
である。
The parameter p1 is a past time serving as a reference point for correcting the system time uniquely determined in the computer network system.
It is 00:00:00 on the first day of the month. The parameter p2 is a correction interval of the system time, and its value is 3600 [seconds].
It is.

【0061】図13は、メインシステムCPU0lにお
けるタスクTCPの処理の流れを示すフローチャートで
ある。
FIG. 13 is a flowchart showing the flow of processing of the task TCP in the main system CPU01.

【0062】タスクTCPは、初期起動後、すぐにパラ
メータp2の時間分スリープ(OS10が提供する機能
で、指定時間の経過後に割り込みによりスリープが解除
されるもの)する(ステップB001)。スリープ解除
時、タスクTCPは、システム時刻送信要求を作成し
(ステップB002)、タスクTFPに対してこれを通
知し(ステップB003)、再びパラメータp2の時間
分スリープする(ステップB001)。タスクTCP
は、この動作をシステム停止まで継続する。
After the initial startup, the task TCP immediately sleeps for the time of the parameter p2 (a function provided by the OS 10 whose sleep is released by interruption after a lapse of a specified time) (step B001). When the sleep mode is released, the task TCP creates a system time transmission request (step B002), notifies the task TFP of the request (step B003), and sleeps again for the time of the parameter p2 (step B001). Task TCP
Continues this operation until the system stops.

【0063】図14は、メインシステムCPU0lにお
けるタスクTFPの処理の流れを示すフローチャートで
ある。
FIG. 14 is a flowchart showing the flow of processing of task TFP in main system CPU 01.

【0064】タスクTFPは、各サブシステム2とのデ
ータリンク毎に非同期に処理を行う。すなわち、複数の
データリンクに発生するイベントを多重に待ち合わせる
ことができ、発生したイベント毎に処理が定義されてい
る(イベント駆動)。
The task TFP performs processing asynchronously for each data link with each subsystem 2. That is, events occurring in a plurality of data links can be waited for in a multiplex manner, and processing is defined for each occurred event (event driving).

【0065】タスクTFPは、初期起動時、まずパラメ
ータplのセットアップを行い(ステップB101)、
その後、各サブシステムFEP01,FEP02および
FEP03に対してデータリンクのオープン要求を行い
(ステップB102)、イベントを待ち合わせる(ステ
ップB103)。オープン要求は1秒間隔で30回のリ
トライ(OS10による非同期処理)を行う。データリ
ンクのオープンに失敗した場合は、タスクTFPは、1
分後に再試行を行うためにタイマ値を設定し(ステップ
B105)、オープンリトライタイマを起動する(ステ
ップB106)。この動作は、当該サブシステムがオー
プンするまで継続する。
At the time of initial startup, the task TFP first sets up the parameter pl (step B101).
Thereafter, a data link open request is made to each of the subsystems FEP01, FEP02, and FEP03 (step B102), and an event is waited for (step B103). The open request performs 30 retries (asynchronous processing by the OS 10) at one second intervals. If the data link open fails, the task TFP
After a minute, a timer value is set to retry (step B105), and an open retry timer is started (step B106). This operation continues until the subsystem is opened.

【0066】オープンに成功したサブシステムについて
は、タスクTFPは、この時点で図15に示す時刻送信
処理を行う(ステップB107)。
For the subsystem that has been successfully opened, the task TFP performs the time transmission process shown in FIG. 15 at this point (step B107).

【0067】詳しくは、タスクTFPは、まず、OS1
0のもつカレンダクロック11より現在時刻c_tim
eを取得し(ステップB201)、これをシステム系内
で取り決めたパラメータp1からの相対時間s_tim
eに変換する(ステップB202)。この変換には、O
S10により提供される関数を使用する(CNV(x,
y)とする)。得られた相対時間s_timeを送信メ
ッセージエリアにセットし(ステップB203)、これ
にさらにメッセージヘッダ(相手局アドレス,自局アド
レス,メッセージ長,メッセージID)を付加して、当
該サブシステムに送信する(ステップB204)。
More specifically, the task TFP starts with the OS1
Current time c_tim from calendar clock 11 of 0
e (step B201), and the relative time s_tim from the parameter p1 determined in the system.
e (step B202). This conversion involves O
Using the function provided by S10 (CNV (x,
y)). The obtained relative time s_time is set in the transmission message area (step B203), and a message header (address of the partner station, own station address, message length, message ID) is further added to the message and transmitted to the subsystem (step B203). Step B204).

【0068】メインシステムCPU0lは、2つのタス
クTCPおよびタスクTFPの働きにより、システム系
内の各サブシステムFEP01,FEP02およびFE
P03に一定時間毎にシステム時刻を送信し続けること
ができる。
The main system CPU01 operates the two tasks TCP and TFP to operate the respective subsystems FEP01, FEP02 and FE in the system.
The system time can be continuously transmitted to P03 at regular intervals.

【0069】一方、図16は、サブシステムFEP0l
(サブシステムFEP02およびFEP03のいずれも
同じ)におけるタスクHDPの処理の流れを示すフロー
チャートである。
On the other hand, FIG.
It is a flowchart which shows the flow of the process of the task HDP in (subsystem FEP02 and FEP03 are the same).

【0070】タスクHDPは、初期起動後、メインシス
テムCPU0lに対してデータリンクのオープン要求を
行う(ステップC001)。オープン要求は、1秒間隔
で30回のリトライを行い、これに失敗した場合は、1
分間のスリープ(ステップC003)の後に再試行を行
う。この動作は、メインシステムCPU0lがオープン
するまで継続する(永久リトライ)。
After the initial startup, the task HDP issues a data link open request to the main system CPU 01 (step C001). An open request retries 30 times at 1 second intervals, and fails if it fails.
A retry is performed after a sleep period of minutes (step C003). This operation is continued until the main system CPU01 is opened (permanent retry).

【0071】データリンクがオープンしたならば、タス
クHDPは、メインシステムCPU0lからのメッセー
ジ受信待ちとなる(ステップC002)。メッセージを
受信したならば、タスクHDPは、メッセージヘッダ部
を検査し、不正なメッセージであればデータリンクを切
断し(ステップC005)、再度オープン動作からやり
直す。
When the data link is opened, the task HDP waits for a message from the main system CPU 01 (step C002). Upon receiving the message, the task HDP examines the message header part, and if it is an invalid message, disconnects the data link (step C005) and starts again from the open operation.

【0072】正常なメッセージであれば、タスクHDP
は、その中からシステム時刻(相対時間)を取り出し
(ステップC004)、システム時刻受信通知を作成し
てタスクNCPに渡す(ステップC006)。タスクH
DPは、この受信動作をシステム停止まで繰り返す。
If the message is normal, the task HDP
Extracts the system time (relative time) from the information (step C004), creates a system time reception notification, and passes it to the task NCP (step C006). Task H
The DP repeats this receiving operation until the system stops.

【0073】図17は、同じくサブシステムFEP0l
におけるタスクNCPの処理の流れを示すフローチャー
トである。
FIG. 17 is a diagram showing a similar configuration of the subsystem FEP01.
3 is a flowchart showing a flow of a process of a task NCP in FIG.

【0074】タスクNCPは、初期起動時、タスクAP
との共有エリアである共有テーブルcomtb1を初期
化(確保)し(ステップC101)、そこにシステム時
刻補正値の初期値「0」を書き込む(ステップC10
2)。次に、タスクNCPは、タスクHDPからの受信
イベント待ちとなる(ステップC103)。タスクHD
Pからのシステム時刻受信通知時、タスクNCPは、ま
ずOS20のカレンダクロック21より現在の時刻c_
timeを取得し(ステップC104)、パラメータp
1からの相対時間l_timeに変換する(ステップC
105)。この変換には、やはりCNV関数を使用す
る。続いて、タスクNCPは、相対時間l_timeを
いま受信したメインシステムCPU0lのシステム時刻
s_time(ステップC106)から引き、結果を共
有テーブルcomtb1に格納する(ステップC10
7)。これが、サブシステムFEP0lでのシステム時
刻補正値となる。この値は、別のカレンダクロック21
を持つサブシステムFEP02やFEP03では当然異
なる。
When the task NCP is initially started, the task AP
Initialize (secure) the shared table commtb1, which is a shared area with the server (step C101), and write the initial value “0” of the system time correction value therein (step C10).
2). Next, the task NCP waits for a reception event from the task HDP (step C103). Task HD
At the time of notification of reception of the system time from P, the task NCP first determines the current time c_
time is acquired (step C104), and the parameter p
Is converted to a relative time l_time from 1 (step C
105). This conversion also uses the CNV function. Subsequently, the task NCP subtracts the relative time l_time from the system time s_time (step C106) of the main system CPU01 that has just received, and stores the result in the shared table commtb1 (step C10).
7). This is the system time correction value in the subsystem FEP01. This value is the value of another calendar clock 21
This is naturally different in subsystems FEP02 and FEP03 having

【0075】図18は、サブシステムFEP0lにおけ
るタスクAPの処理の流れを示すフローチャートであ
る。この例では、タスクAPでは、システム時刻を付加
した帳票を出力する処理を行うものと想定している。
FIG. 18 is a flowchart showing the flow of the processing of the task AP in the subsystem FEP01. In this example, it is assumed that the task AP performs a process of outputting a form with the system time added.

【0076】帳票作成処理(ステップC201)の中
で、タスクAPは、ライブラリ関数GetSystem
Time()を呼び出している(ステップC202)。
このライブラリ関数GetSystemTime()
は、システム時刻補正機能の一部として提供されるサー
ビスプログラムであり、タスクAPからの要求により、
図19に示す処理を行う。
In the form creation processing (step C201), the task AP is assigned the library function GetSystem.
Time () is called (step C202).
This library function GetSystemTime ()
Is a service program provided as a part of the system time correction function, and upon a request from the task AP,
The processing shown in FIG. 19 is performed.

【0077】詳しくは、ライブラリ関数GetSyst
emTime()は、まずOS20のカレンダクロック
21より現在の時刻c_timeを取得し(ステップC
501)、パラメータp1からの相対時間l_time
に変換する(ステップC502)。次に、ライブラリ関
数GetSystemTime()は、相対時間l_t
imeに、共有テーブルcomtb1に保存してあるシ
ステム時刻補正値を加えた時間s_time(ステップ
C504)を、カレンダ表記に変換する関数(EXT
(x,y)とする)を使用して、最終的なシステム時刻
e_timeを得(ステップC505)、タスクAPに
戻り値として返す(ステップC506)。
More specifically, the library function GetSyst
emTime () first obtains the current time c_time from the calendar clock 21 of the OS 20 (step C).
501), relative time l_time from parameter p1
(Step C502). Next, the library function GetSystemTime () calculates the relative time l_t.
A function (EXT) for converting the time s_time (step C504) obtained by adding the system time correction value stored in the shared table commtb1 to the calendar notation into the calendar notation
(X, y)) to obtain a final system time e_time (step C505), and return it to the task AP as a return value (step C506).

【0078】システム時刻e_timeを得たタスクA
Pは、帳票出力処理(ステップC203)でこれを付加
し、プリントアウトを行う。
Task A that has obtained system time e_time
P adds this in the form output process (step C203) and prints out.

【0079】[0079]

【発明の効果】第1の効果は、サブシステムでカレンダ
クロックの変更を伴わずに、システム時刻を得ることが
できる点にある。このことは、不意のカレンダクロック
の変更によるシステムの不安定な動作を防ぐ効果があ
る。その理由は、メインシステムの保持するシステム時
刻との差分をサブシステム側でシステム時刻補正値とし
て保持し、必要な時にそれを用いてシステム時刻を求め
ているからである。
The first effect is that the system time can be obtained without changing the calendar clock in the subsystem. This has the effect of preventing unstable operation of the system due to unexpected changes in the calendar clock. The reason is that the difference from the system time held by the main system is held as a system time correction value on the subsystem side, and the system time is obtained when necessary.

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

【図1】本発明の第1の実施の形態に係るサブシステム
間時刻補正方式が適用されるコンピュータネットワーク
システムの構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a computer network system to which an inter-subsystem time correction method according to a first embodiment of the present invention is applied.

【図2】第1の実施の形態に係るサブシステム間時刻補
正方式で用いられるシステム時刻同期メッセージの構成
を示す図である。
FIG. 2 is a diagram showing a configuration of a system time synchronization message used in an inter-subsystem time correction method according to the first embodiment.

【図3】図1中のメッセージ送信タイミング発生部の処
理の流れを示すフローチャートである。
FIG. 3 is a flowchart showing a processing flow of a message transmission timing generator in FIG. 1;

【図4】図1中のシステム時刻同期メッセージ送信部の
処理の流れを示すフローチャートである。
FIG. 4 is a flowchart showing a processing flow of a system time synchronization message transmitting unit in FIG. 1;

【図5】図4中の共通の送信処理をさらに詳細に示すフ
ローチャートである。
FIG. 5 is a flowchart showing the common transmission processing in FIG. 4 in further detail;

【図6】図1中のシステム時刻同期メッセージ受信部の
処理の流れを示すフローチャートである。
FIG. 6 is a flowchart showing a processing flow of a system time synchronization message receiving unit in FIG. 1;

【図7】図1中のシステム時刻補正値計算部の処理の流
れを示すフローチャートである。
FIG. 7 is a flowchart showing a processing flow of a system time correction value calculation unit in FIG. 1;

【図8】図1中の業務プログラムの処理の流れを示すフ
ローチャートである。
FIG. 8 is a flowchart showing a flow of processing of a business program in FIG. 1;

【図9】図1中のシステム時刻取得手段の処理の流れを
示すフローチャートである。
FIG. 9 is a flowchart showing a processing flow of a system time acquisition unit in FIG. 1;

【図10】第1の実施の形態におけるシステム時刻とサ
ブシステムローカル時刻との関係を示すタイミングチャ
ートである。
FIG. 10 is a timing chart illustrating a relationship between a system time and a subsystem local time according to the first embodiment.

【図11】本発明の第2の実施の形態に係るサブシステ
ム間時刻補正方式が適用されるコンピュータネットワー
クシステムの構成を示すブロック図である。
FIG. 11 is a block diagram illustrating a configuration of a computer network system to which an inter-subsystem time correction method according to a second embodiment of the present invention is applied.

【図12】第1の実施の形態に係るサブシステム間時刻
補正方の一実施例を示すブロック図である。
FIG. 12 is a block diagram illustrating an example of a method of correcting time between subsystems according to the first embodiment.

【図13】図12中のタスクTCPの処理の流れを示す
フローチャートである。
FIG. 13 is a flowchart showing a flow of processing of a task TCP in FIG.

【図14】図12中のタスクTFPの処理の流れを示す
フローチャートである。
FIG. 14 is a flowchart showing a processing flow of a task TFP in FIG. 12;

【図15】図14中の時刻送信処理をより詳しく示すフ
ローチャートである。
15 is a flowchart showing the time transmission process in FIG. 14 in more detail.

【図16】図12中のタスクHDPの処理の流れを示す
フローチャートである。
FIG. 16 is a flowchart showing a processing flow of a task HDP in FIG. 12;

【図17】図12中のタスクNCPの処理の流れを示す
フローチャートである。
FIG. 17 is a flowchart showing a process flow of a task NCP in FIG. 12;

【図18】図12中のタスクAPの処理の流れを示すフ
ローチャートである。
FIG. 18 is a flowchart showing a processing flow of a task AP in FIG.

【図19】図18中のGetSystemTimeをよ
り詳しく示すフローチャートである。
19 is a flowchart showing GetSystemTime in FIG. 18 in more detail.

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

1 メインシステム 2 サブシステム 3 通信回線 4,5 記録媒体 10 オペレーティングシステム 11 割込みタイマ 12 カレンダクロック 13 システム時刻通知手段 14 メッセージ送信タイミング発生部 15 システム時刻同期メッセージ送信部 22 時刻補正手段 23 システム時刻同期メッセージ受信部 24 システム時刻補正値計算部 25 共有テーブル 26 業務プログラム 27 システム時刻取得手段 AP,TCP,TFP,HDP,NCP タスク comtbl 共有テーブル CPU01 メインシステム FEP0l,FEP02,FEP03 サブシステム GetSystemTime ライブラリ関数 M システム時刻同期メッセージ DESCRIPTION OF SYMBOLS 1 Main system 2 Subsystem 3 Communication line 4, 5 Recording medium 10 Operating system 11 Interrupt timer 12 Calendar clock 13 System time notification means 14 Message transmission timing generation part 15 System time synchronization message transmission part 22 Time correction means 23 System time synchronization message Reception unit 24 System time correction value calculation unit 25 Shared table 26 Business program 27 System time acquisition means AP, TCP, TFP, HDP, NCP Task commtbl Shared table CPU01 Main system FEP01, FEP02, FEP03 Subsystem GetSystemTime Library function M System time synchronization message

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 システム系内唯一のシステム時刻を計時
するメインシステムと、このメインシステムのシステム
時刻に同期して業務処理を行うサブシステムとを備える
コンピュータネットワークシステムにおいて、 前記メインシステムからの定期的なシステム時刻同期メ
ッセージの配信により、各サブシステム内の業務プログ
ラムでシステム時刻の補正を行う際に、各サブシステム
毎に保有するローカルなカレンダクロックを変更するこ
となく、システム時刻の補正を可能とすることを特徴と
するサブシステム間時刻補正方式。
1. A computer network system comprising: a main system that measures only the system time in a system; and a subsystem that performs business processing in synchronization with the system time of the main system. System time synchronization message, the system time can be corrected without changing the local calendar clock owned by each subsystem when the system time is corrected by the business program in each subsystem. A time correction method between subsystems.
【請求項2】 システム系内唯一のシステム時刻を計時
するメインシステムと、このメインシステムのシステム
時刻に同期して業務処理を行うサブシステムとを備える
コンピュータネットワークシステムにおいて、 前記メインシステムに設けられ、定期的に各サブシステ
ムに現在のシステム時刻を通知するシステム時刻通知手
段と、 前記サブシステムに設けられ、補正対象となるローカル
なカレンダクロックを取得し、前記メインシステムから
通知されたシステム時刻との差分でなるシステム時刻補
正値を共有テーブル上に保持する時刻補正手段と、 前記サブシステムに設けられ、業務プログラムからの時
刻取得要求に対して、ローカルなカレンダクロックを取
得し、前記共有テーブルに保持されたシステム時刻補正
値を加味してその時点でのシステム時刻として提供する
システム時刻取得手段とを有することを特徴とするサブ
システム間時刻補正方式。
2. A computer network system comprising: a main system that measures only the system time within a system; and a subsystem that performs business processing in synchronization with the system time of the main system. System time notification means for periodically notifying each subsystem of the current system time, and a local calendar clock provided in the subsystem, which is to be corrected, and obtained from the system time notified by the main system. A time correction unit that stores a system time correction value, which is a difference, on a shared table; and a local calendar clock that is provided in the subsystem and that obtains a local calendar clock in response to a time acquisition request from a business program, and stores the local calendar clock in the shared table. Taking into account the system time correction value And a system time obtaining means for providing the system time as the system time.
【請求項3】 前記システム時刻通知手段が、タイマ割
込みにより定期的にシステム時刻同期メッセージの送信
タイミングを発生させるメッセージ送信タイミング発生
部と、このメッセージ送信タイミング発生部からの送信
タイミングに基づいてカレンダクロックからシステム時
刻を取得しシステム時刻同期メッセージを作成してサブ
システムに送信するシステム時刻同期メッセージ送信部
とからなる請求項2記載のサブシステム間時刻補正方
式。
3. A system according to claim 1, wherein said system time notifying means generates a system time synchronization message transmission timing periodically by a timer interrupt, and a calendar clock based on the transmission timing from said message transmission timing generation section. 3. The inter-subsystem time correction system according to claim 2, further comprising: a system time synchronization message transmitting unit that acquires a system time from the system, creates a system time synchronization message, and transmits the system time synchronization message to the subsystem.
【請求項4】 前記時刻補正手段が、システム時刻同期
メッセージを受信するシステム時刻同期メッセージ受信
部と、このシステム時刻同期メッセージ受信部により受
信されたシステム時刻同期メッセージ中のシステム時刻
とローカルなカレンダクロックとの差分であるシステム
時刻補正値を計算して共有テーブルに格納するシステム
時刻補正値計算部とからなる請求項2記載のサブシステ
ム間時刻補正方式。
4. The system time synchronization message receiving unit for receiving a system time synchronization message, wherein the time correction means includes a system time synchronization message received by the system time synchronization message reception unit and a local calendar clock. 3. The time correction system between subsystems according to claim 2, further comprising a system time correction value calculation unit that calculates a system time correction value that is a difference from the system time and stores the system time correction value in a shared table.
【請求項5】 前記システム時刻取得手段が、業務プロ
グラムにリンクされ、不定期に呼び出されるサブルーチ
ンでなる請求項2記載のサブシステム間時刻補正方式。
5. The time correction method between subsystems according to claim 2, wherein said system time acquisition means is a subroutine linked to a business program and called at irregular intervals.
【請求項6】 メインシステムのコンピュータを、定期
的に各サブシステムに現在のシステム時刻を通知するシ
ステム時刻通知手段として機能させるためのプログラム
と、 各サブシステムのコンピュータを、補正対象となるロー
カルなカレンダクロックを取得し、前記メインシステム
から通知されたシステム時刻との差分を共有テーブル上
に保持する時刻補正手段,および業務プログラムからの
時刻取得要求に対して、ローカルなカレンダクロックを
取得し、前記共有テーブルに保持されたシステム時刻補
正値を加味してその時点でのシステム時刻として提供す
るシステム時刻取得手段として機能させるためのプログ
ラムとを記録した記録媒体。
6. A program for causing a computer of a main system to periodically function as a system time notifying means for notifying each subsystem of a current system time, and a computer of each subsystem being provided with a local computer to be corrected. Time correction means for acquiring a calendar clock, and holding a difference from the system time notified from the main system on a shared table; and acquiring a local calendar clock in response to a time acquisition request from a business program, A recording medium which stores a program for functioning as a system time acquisition unit that provides a system time at that time in consideration of a system time correction value held in a shared table.
【請求項7】 コンピュータを、定期的に各サブシステ
ムに現在のシステム時刻を通知するシステム時刻通知手
段として機能させるためのプログラムを記録した記録媒
体。
7. A recording medium on which a program for causing a computer to function as a system time notifying means for periodically notifying each subsystem of a current system time is recorded.
【請求項8】 コンピュータを、補正対象となるローカ
ルなカレンダクロックを取得し、メインシステムから通
知されたシステム時刻との差分を共有テーブル上に保持
する時刻補正手段,および業務プログラムからの時刻取
得要求に対して、ローカルなカレンダクロックを取得
し、前記共有テーブルに保持されたシステム時刻補正値
を加味してその時点でのシステム時刻として提供するシ
ステム時刻取得手段として機能させるためのプログラム
を記録した記録媒体。
8. A time correction unit that obtains a local calendar clock to be corrected by a computer and stores a difference from a system time notified from a main system on a shared table, and a time obtaining request from a business program. Recording a program for functioning as a system time obtaining means for obtaining a local calendar clock, providing the system time at that time in consideration of the system time correction value held in the shared table, Medium.
JP9193148A 1997-07-03 1997-07-03 Inter-subsystem time correction system Pending JPH1125057A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9193148A JPH1125057A (en) 1997-07-03 1997-07-03 Inter-subsystem time correction system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9193148A JPH1125057A (en) 1997-07-03 1997-07-03 Inter-subsystem time correction system

Publications (1)

Publication Number Publication Date
JPH1125057A true JPH1125057A (en) 1999-01-29

Family

ID=16303093

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9193148A Pending JPH1125057A (en) 1997-07-03 1997-07-03 Inter-subsystem time correction system

Country Status (1)

Country Link
JP (1) JPH1125057A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004234266A (en) * 2003-01-29 2004-08-19 Konami Co Ltd Selection device, selection method and program
JP2007128362A (en) * 2005-11-04 2007-05-24 Omron Corp Clock synchronization of controller
JP2009260706A (en) * 2008-04-17 2009-11-05 Nippon Telegr & Teleph Corp <Ntt> Accuracy improving method by post-processing time correction in packet measurement, correcting system, and program of same
JP2010233261A (en) * 2003-07-28 2010-10-14 Sonos Inc System and method for synchronizing operations among a plurality of independently clocked digital data processing devices
JP2011198013A (en) * 2010-03-19 2011-10-06 Fujitsu Ltd Information processor and method of starting information processor
JP2024042198A (en) * 2022-09-15 2024-03-28 Necプラットフォームズ株式会社 Packet synchronization control device, packet synchronous reproduction device, packet synchronization control method, packet synchronous reproduction method, and program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004234266A (en) * 2003-01-29 2004-08-19 Konami Co Ltd Selection device, selection method and program
JP2010233261A (en) * 2003-07-28 2010-10-14 Sonos Inc System and method for synchronizing operations among a plurality of independently clocked digital data processing devices
JP2007128362A (en) * 2005-11-04 2007-05-24 Omron Corp Clock synchronization of controller
JP2009260706A (en) * 2008-04-17 2009-11-05 Nippon Telegr & Teleph Corp <Ntt> Accuracy improving method by post-processing time correction in packet measurement, correcting system, and program of same
JP2011198013A (en) * 2010-03-19 2011-10-06 Fujitsu Ltd Information processor and method of starting information processor
JP2024042198A (en) * 2022-09-15 2024-03-28 Necプラットフォームズ株式会社 Packet synchronization control device, packet synchronous reproduction device, packet synchronization control method, packet synchronous reproduction method, and program

Similar Documents

Publication Publication Date Title
US5005122A (en) Arrangement with cooperating management server node and network service node
US10892839B2 (en) Method for fast reconfiguration of GM clocks in the TSN network by means of an explicit teardown message
US7107473B2 (en) Method and device for synchronizing the global time of a plurality of TTCAN buses and a corresponding bus system
JP2001251329A (en) Data exchange method and its system
JP5079039B2 (en) Management mediation apparatus, image forming apparatus, management mediation program, and recording medium recording management mediation program
CN104935634B (en) Mobile device data sharing method based on Distributed shared memory
JPH11177554A (en) Control system and actuator node
JPH06242980A (en) Redundant task synchronization system
US7848361B2 (en) Time-triggered communication system and method for the synchronization of a dual-channel network
JPH1125057A (en) Inter-subsystem time correction system
WO2018074136A1 (en) Communication method, central control device and individual control device
EP1096751B1 (en) Method and apparatus for reaching agreement between nodes in a distributed system
Maree et al. Opportunities for Digital Twins for the Provisioning, Management and Monitoring of Heterogeneous IoT Devices
JP2002169704A (en) Proxy processing method, proxy processing system and computer system
Postolache Time-triggered CANopen implementation for networked embedded systems
Zeltwanger Time-Triggered communication on CAN
JP2001305256A (en) Time synchronization method in computer system
JP2850637B2 (en) Time synchronization device for supervisory control system
CN114780305B (en) Single node starting method, device, equipment and medium
JP2005210360A (en) Network device connected to the network, and network device management system
JP4067784B2 (en) Program for distributing rule bases
JP2004351806A (en) Image forming device
JP2006318394A (en) Management method of uninterruptible power supply for network system
CN115441975B (en) Time synchronization method, device, equipment and storage medium
JP2002135284A (en) Line concentrator
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载