[go: up one dir, main page]

JP2021111941A - Controls, communication systems, transmission methods, and programs - Google Patents

Controls, communication systems, transmission methods, and programs Download PDF

Info

Publication number
JP2021111941A
JP2021111941A JP2020004668A JP2020004668A JP2021111941A JP 2021111941 A JP2021111941 A JP 2021111941A JP 2020004668 A JP2020004668 A JP 2020004668A JP 2020004668 A JP2020004668 A JP 2020004668A JP 2021111941 A JP2021111941 A JP 2021111941A
Authority
JP
Japan
Prior art keywords
time
control device
transmission interval
synchronized
communication devices
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.)
Granted
Application number
JP2020004668A
Other languages
Japanese (ja)
Other versions
JP7518622B2 (en
Inventor
章友 佐々木
Akitomo Sasaki
章友 佐々木
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2020004668A priority Critical patent/JP7518622B2/en
Publication of JP2021111941A publication Critical patent/JP2021111941A/en
Application granted granted Critical
Publication of JP7518622B2 publication Critical patent/JP7518622B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

【課題】時刻同期パケットの送信間隔を適切に設定する。【解決手段】制御装置は、複数の通信装置を該制御装置と時刻同期させるために送信される時刻同期パケットを第1の送信間隔で送信し、該複数の通信装置が該制御装置と時刻同期したかを判定し、該複数の通信装置が該制御装置と時刻同期したと判定されたことに基づいて、該時刻同期パケットの送信間隔を該第1の送信間隔から、該第1の送信間隔よりも長い第2の送信間隔に変更する。【選択図】 図1PROBLEM TO BE SOLVED: To appropriately set a transmission interval of a time synchronization packet. A control device transmits a time synchronization packet transmitted to synchronize a plurality of communication devices with the control device at a first transmission interval, and the plurality of communication devices synchronize the time with the control device. Based on the determination that the plurality of communication devices are time-synchronized with the control device, the transmission interval of the time-synchronized packet is changed from the first transmission interval to the first transmission interval. Change to a second transmission interval that is longer than. [Selection diagram] Fig. 1

Description

本発明は、時刻同期技術に関する。 The present invention relates to a time synchronization technique.

ネットワークを用いた時刻同期のためのプロトコルとして、IEEE1588規格であるPTP(Precision TimeProtocol)が知られている。PTPでは、正確な時刻を持つマスタ装置がPTPパケットに当該時刻の情報を含めて送信し、当該PTPパケットを受信したスレーブ装置が時刻同期を行う。マスタ装置とスレーブ装置は、正確な時刻をPTPパケットに書き込むために、または、PTPパケットを受信した時刻を正確に知るために、クロックを有する。さらに、PTPでは、マスタ装置とスレーブ装置間に配置されるハブにおいて、TC(Transparent Clock)機能を備えることが求められている。TC機能は、PTPケットを中継する際にパケットの中継にかかる時間などをパケットに追加するための機能である。当該機能により、スレーブ装置は、マスタ装置との間の遅延時間を精度よく得ることができ、高精度な時刻調整を行うことができる。 PTP (Precision Time Protocol), which is an IEEE1588 standard, is known as a protocol for time synchronization using a network. In PTP, the master device having an accurate time transmits the PTP packet including the information of the time, and the slave device receiving the PTP packet synchronizes the time. The master device and the slave device have a clock to write the exact time in the PTP packet or to know the exact time when the PTP packet is received. Further, the PTP is required to have a TC (Transient Clock) function in the hub arranged between the master device and the slave device. The TC function is a function for adding the time required for relaying a packet when relaying a PTP packet to the packet. With this function, the slave device can accurately obtain the delay time with the master device, and can perform highly accurate time adjustment.

また、ネットワークにおける複数の装置の接続方法として、各通信装置を直列に接続するデイジーチェーンと呼ばれる接続方法がある。各通信装置は複数のコネクタを持ち、各コネクタを介して別々の通信装置と接続することで、デイジーチェーンの接続を確立することができる。特許文献1には、接続方法としてデイジーチェーンを利用する通信システムについて開示されている。 Further, as a connection method of a plurality of devices in a network, there is a connection method called a daisy chain in which each communication device is connected in series. Each communication device has a plurality of connectors, and by connecting to different communication devices via each connector, a daisy chain connection can be established. Patent Document 1 discloses a communication system that uses a daisy chain as a connection method.

特開2017−211828号公報Japanese Unexamined Patent Publication No. 2017-21128

PTPでは、マスタ装置は時刻同期のための時刻同期パケットを所定の間隔で送信し、複数の通信装置(スレーブ装置)は当該時刻同期パケットを受信および中継し、このような通信により得られる情報を元に時刻同期を行う。マスタ装置による時刻同期パケットの送信間隔が短いと、複数の通信装置の同期精度は向上し得るが、時刻同期パケットの通信量が多いと、ネットワークの負荷が高くなるという問題も生じる。 In PTP, the master device transmits time synchronization packets for time synchronization at predetermined intervals, and a plurality of communication devices (slave devices) receive and relay the time synchronization packets, and the information obtained by such communication is transmitted. Synchronize the time based on the original. If the transmission interval of the time synchronization packet by the master device is short, the synchronization accuracy of a plurality of communication devices can be improved, but if the communication amount of the time synchronization packet is large, there is a problem that the load on the network increases.

本発明は上記課題に鑑みてなされたものであり、時刻同期パケットの送信間隔を適切に設定することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to appropriately set a transmission interval of a time synchronization packet.

上記目的を達成するための一手段として、本発明の制御装置は以下の構成を有する。すなわち、制御装置であって、複数の通信装置を前記制御装置と時刻同期させるために送信される時刻同期パケットを第1の送信間隔で送信する第1の送信手段と、前記複数の通信装置が前記制御装置と時刻同期したかを判定する判定手段と、前記判定手段により前記複数の通信装置が前記制御装置と時刻同期したと判定されたことに基づいて、前記時刻同期パケットの送信間隔を前記第1の送信間隔から、前記第1の送信間隔よりも長い第2の送信間隔に変更する変更手段と、を有する。 As one means for achieving the above object, the control device of the present invention has the following configuration. That is, the control device, the first transmission means for transmitting the time synchronization packet transmitted to synchronize the time of the plurality of communication devices with the control device at the first transmission interval, and the plurality of communication devices. Based on the determination means for determining whether or not the time is synchronized with the control device and the determination by the determination means that the plurality of communication devices are time-synchronized with the control device, the transmission interval of the time synchronization packet is set. It has a changing means for changing from a first transmission interval to a second transmission interval longer than the first transmission interval.

本発明によれば、時刻同期パケットの送信間隔を適切に設定することが可能となる。 According to the present invention, it is possible to appropriately set the transmission interval of the time synchronization packet.

通信システムの構成例を示す図である。It is a figure which shows the configuration example of the communication system. 通信システムをスタジアムに設置した場合の設置例を示す。An installation example when the communication system is installed in the stadium is shown. 通信装置101のハードウェア構成例を示す。An example of the hardware configuration of the communication device 101 is shown. PTPによる時刻同期通信を説明するための図である。It is a figure for demonstrating time synchronization communication by PTP. 実施形態1における時刻同期パケットの送信間隔調整処理のフローチャートである。It is a flowchart of the transmission interval adjustment processing of the time synchronization packet in Embodiment 1. 図5のS504の処理の詳細なフローチャートである。It is a detailed flowchart of the process of S504 of FIG. 送信間隔の情報の受信処理のフローチャートである。It is a flowchart of the reception process of the information of a transmission interval. 時刻同期パケットの送信処理のフローチャートである。It is a flowchart of the transmission processing of a time synchronization packet. 実施形態1における時刻同期の問い合わせに対する応答処理のフローチャートである。It is a flowchart of the response processing to the inquiry of time synchronization in Embodiment 1. 実施形態2における時刻同期パケットの送信間隔調整処理のフローチャートである。It is a flowchart of the transmission interval adjustment processing of the time synchronization packet in Embodiment 2. 複数の通信装置のIPアドレスの表の例を示す。An example of a table of IP addresses of a plurality of communication devices is shown. 実施形態3における同期確認・時刻同期パケットの送信間隔調整処理のフローチャートである。FIG. 5 is a flowchart of a synchronization confirmation / time synchronization packet transmission interval adjustment process according to the third embodiment. 図12のS1208の別の処理のフローチャートである。It is a flowchart of another process of S1208 of FIG. 実施形態4におけるPTPパケットの送信回数の削減処理のフローチャートである。It is a flowchart of the process of reducing the number of times of transmission of a PTP packet in Embodiment 4. 実施形態5における送信間隔調整処理のフローチャートである。It is a flowchart of the transmission interval adjustment process in Embodiment 5. 実施形態6におけるPTPパケットの送信回数の削減処理のフローチャートである。It is a flowchart of the process of reducing the number of times of transmission of a PTP packet in Embodiment 6. 実施形態6における時刻同期の問い合わせに対する応答処理のフローチャートである。It is a flowchart of the response processing to the inquiry of time synchronization in Embodiment 6. 制御装置(同期監視装置215、時刻同期サーバ212)の構成例を示す。A configuration example of the control device (synchronization monitoring device 215, time synchronization server 212) is shown.

以下、添付図面を参照して実施形態を詳しく説明する。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. The following embodiments do not limit the invention according to the claims. Although a plurality of features are described in the embodiment, not all of the plurality of features are essential to the invention, and the plurality of features may be arbitrarily combined. Further, in the attached drawings, the same or similar configurations are designated by the same reference numbers, and duplicate explanations are omitted.

[実施形態1]
(通信ネットワークの構成)
図1に、本実施形態における通信ネットワークの構成を示す。本通信システムは、通信装置101−a〜101−r、サーバシステム201、エンドユーザ装置207から構成される。通信装置101−a〜101−rは互いに接続されている。なお、以下の説明では、通信装置101−a〜101−rを区別せずに通信装置101とも称する。通信装置101のハードウェア構成については、図2を用いて後述する。本通信システムは、PTP(Precision TimeProtocol)を用いた時刻同期処理を行うことができ、通信装置101−a〜101−rがPTPにおけるスレーブ装置、時刻同期サーバ212がPTPにおけるマスタ装置として機能する。スレーブ装置は、マスタ装置に対して時刻を合わせる装置を意味する。
[Embodiment 1]
(Communication network configuration)
FIG. 1 shows the configuration of the communication network in this embodiment. This communication system is composed of a communication device 101-a-101-r, a server system 201, and an end user device 207. The communication devices 101-a-101-r are connected to each other. In the following description, the communication device 101-a-101-r is also referred to as the communication device 101 without distinction. The hardware configuration of the communication device 101 will be described later with reference to FIG. This communication system can perform time synchronization processing using PTP (Precision Time Protocol), and the communication device 101-a-101-r functions as a slave device in PTP and the time synchronization server 212 functions as a master device in PTP. The slave device means a device that sets the time with respect to the master device.

通信装置101−a〜101−rは夫々二つのポート(第1ポート、第2ポート)を持ち、夫々のポートが別々の通信装置と直列に接続する。このように複数の通信装置を直列に(階層的に)接続する接続形態を、デイジーチェーンと呼ぶ。通信装置101−a〜101−rの夫々には、カメラ208−a〜208−rが接続されている。通信装置101−a〜101−rは、自装置に接続されたカメラによって得た画像データを他の通信装置に送信することができる。 Each of the communication devices 101-a-101-r has two ports (first port and second port), and each port is connected in series with a separate communication device. A connection form in which a plurality of communication devices are connected in series (hierarchically) in this way is called a daisy chain. Cameras 208-a to 208-r are connected to each of the communication devices 101-a-101-r. The communication device 101-a-101-r can transmit the image data obtained by the camera connected to its own device to another communication device.

通信装置101−rの第2ポートおよび通信装置101−aの第1ポートは、サーバシステム201におけるスイッチングハブ203と接続される。パケットの宛先が、通信装置101−a〜101rのいずれのものでない場合、あるいは、宛先がブロードキャスト、マルチキャストである場合、送信されたパケットがループするため、スイッチングハブ203ではループされたパケットを破棄する。本実施形態では、装置101−a〜101−r間、および、通信装置101−a/101−rとサーバシステム201との間は、一例としてイーサネットケーブルを介して接続されるものとする。 The second port of the communication device 101-r and the first port of the communication device 101-a are connected to the switching hub 203 in the server system 201. If the destination of the packet is not one of the communication devices 101-a to 101r, or if the destination is broadcast or multicast, the transmitted packet loops, so the switching hub 203 discards the looped packet. .. In the present embodiment, the devices 101-a-101-r and the communication device 101-a / 101-r and the server system 201 are connected via an Ethernet cable as an example.

画像サーバ202は、スイッチングハブ203を介して通信装置101−a〜101−rから受信した画像データの蓄積や処理を行う。配信サーバ205は、画像サーバ202に蓄積された画像データを、接続形態の一例として、インターネット206を介して、エンドユーザ装置207からの要求に応じて配信する。サーバ制御装置204は、画像サーバ202や配信サーバ205の制御を行う。DHCPサーバ213はDHCP(Dynamic Host Configuration Protocol)サーバである。また、通信装置101−a〜101−rには、DHCPクライアントとしての機能が搭載されている。DHCPサーバ213は、通信装置101−a〜101−rから受信したDHCP要求パケットに対する応答としてDHCP応答パケットを送信することで通信装置101−a〜101−rにIP(Internet Protocol)アドレスを通知することができる。なお、DHCP要求パケットとは、IPアドレスの設定を要求するパケットである。通信装置101−a〜101−rは、DHCPサーバ213から通知されたIPアドレスを設定することができる。 The image server 202 stores and processes image data received from the communication device 101-a-101-r via the switching hub 203. The distribution server 205 distributes the image data stored in the image server 202 in response to a request from the end user device 207 via the Internet 206 as an example of the connection form. The server control device 204 controls the image server 202 and the distribution server 205. The DHCP server 213 is a DHCP (Dynamic Host Configuration Protocol) server. Further, the communication device 101-a-101-r is equipped with a function as a DHCP client. The DHCP server 213 notifies the communication device 101-a-101-r of the IP (Internet Protocol) address by transmitting a DHCP response packet as a response to the DHCP request packet received from the communication device 101-a-101-r. be able to. The DHCP request packet is a packet that requests the setting of an IP address. The communication device 101-a-101-r can set the IP address notified from the DHCP server 213.

時刻同期サーバ212は、PTPマスタ装置としての処理を行う。後述するように、時刻同期サーバ212は、PTPパケットを通信装置101−a〜101−rに対して、例えばマルチキャストで送信する。同期監視装置215は通信装置101−a〜101−rの時刻の同期を監視する。 The time synchronization server 212 performs processing as a PTP master device. As will be described later, the time synchronization server 212 transmits the PTP packet to the communication device 101-a-101-r by, for example, multicast. The synchronization monitoring device 215 monitors the time synchronization of the communication devices 101-a-101-r.

図2は、図1に示した通信システムをスタジアムに設置した場合の設置の例を示す図である。通信装置101−a〜101−rは、スタジアムを一周するように配置される。また、通信装置101−a〜101−rと接続しているカメラ208−a〜208−rが、スタジアム内のグラウンドを撮影するように配置される。通信装置101−a〜101−rは、カメラ208−a〜208−rによってグラウンドを撮影により取得した画像データを、サーバシステム201に伝送する。 FIG. 2 is a diagram showing an example of installation when the communication system shown in FIG. 1 is installed in a stadium. The communication device 101-a-101-r is arranged so as to go around the stadium. Further, cameras 208-a to 208-r connected to the communication device 101-a-101-r are arranged so as to photograph the ground in the stadium. The communication device 101-a-101-r transmits the image data acquired by photographing the ground by the cameras 208-a to 208-r to the server system 201.

(通信装置のハードウェア構成)
図3に、通信装置101のハードウェア構成を示す。通信装置101は、CPU102、ROM103、DRAM104、ファイルシステム105、第1ポート106、第2ポート107、およびブリッジ108を備える。なお、不図示であるが、通信装置101は表示部第を備えてもよい。第1ポート106は第1クロック121、第2ポート107は第2クロック122を備える。なお、CPUは、Central Processing Unitの、ROMはRead Only Memoryの略である。また、DRAMは、Dynamic Random Access Memoryの略である。
(Hardware configuration of communication device)
FIG. 3 shows the hardware configuration of the communication device 101. The communication device 101 includes a CPU 102, a ROM 103, a DRAM 104, a file system 105, a first port 106, a second port 107, and a bridge 108. Although not shown, the communication device 101 may include a display unit. The first port 106 includes a first clock 121, and the second port 107 includes a second clock 122. The CPU is an abbreviation for Central Processing Unit, and ROM is an abbreviation for Read Only Memory. DRAM is an abbreviation for Dynamic Random Access Memory.

CPU102は、1つ以上のCPUやMPU等のプロセッサにより構成され、ROM103に記憶されたコンピュータプログラムを実行することにより通信装置101全体を制御する。MPUはMicro Processing Unitの略である。CPUおよびMPUはコンピュータとして機能する。なお、CPU102は、ROM103に記憶されたコンピュータプログラムとOS(Operating System)との協働により通信装置101全体を制御するようにしてもよい。また、CPU102がマルチコア等の複数のプロセッサを備え、複数のプロセッサにより通信装置101全体を制御するようにしてもよい。 The CPU 102 is composed of one or more CPUs, a processor such as an MPU, and controls the entire communication device 101 by executing a computer program stored in the ROM 103. MPU is an abbreviation for Micro Processing Unit. The CPU and MPU function as computers. The CPU 102 may control the entire communication device 101 in cooperation with the computer program stored in the ROM 103 and the OS (Operating System). Further, the CPU 102 may include a plurality of processors such as a multi-core processor, and the plurality of processors may control the entire communication device 101.

ROM103は、ROMやRAM等の1以上のメモリにより構成され、後述する各種動作を行うためのコンピュータプログラムや、無線通信のための通信パラメータ等の各種情報を記憶する。RAMはRandom Access Memoryの略である。ROM103には、ファイルシステム105からOS等のシステムプログラムをブートするためのプログラムが格納されている。なお、ROM103として、ROM、RAM等のメモリの他に、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、DVDなどの記憶媒体を用いてもよい。また、ROM103が複数のメモリ等を備えていてもよい。 The ROM 103 is composed of one or more memories such as a ROM and a RAM, and stores various information such as a computer program for performing various operations described later and communication parameters for wireless communication. RAM is an abbreviation for Random Access Memory. The ROM 103 stores a program for booting a system program such as an OS from the file system 105. As the ROM 103, in addition to memories such as ROM and RAM, storage media such as flexible disks, hard disks, optical disks, magneto-optical disks, CD-ROMs, CD-Rs, magnetic tapes, non-volatile memory cards, and DVDs are used. You may. Further, the ROM 103 may include a plurality of memories and the like.

DRAM104は、ワーキングメモリとして利用されるメモリである。DRAM104は1以上のDRAMによって構成される。あるいは、DRAM104は、DRAMに代えて、もしくは加えてSRAM(Static Random Access Memory)やその他のRAMによって構成されてもよい。ファイルシステム105には、OSなどのシステムプログラムやアプリケーションプログラムが格納されている。通信装置101による以下に示す処理のフローチャートは、CPU102がROM103やファイルシステム105に記憶されている制御プログラムを実行し、情報の演算および加工並びに各ハードウェアの制御を実行することにより実現されうる。 The DRAM 104 is a memory used as a working memory. The DRAM 104 is composed of one or more DRAMs. Alternatively, the DRAM 104 may be composed of a DRAM (Static Random Access Memory) or other RAM in place of or in addition to the DRAM. A system program such as an OS and an application program are stored in the file system 105. The flow chart of the processing shown below by the communication device 101 can be realized by the CPU 102 executing the control program stored in the ROM 103 or the file system 105, calculating and processing the information, and controlling each hardware.

第1ポート106および第2ポート107は、他の通信装置と通信を行うためのコネクタである。本実施形態では、第1ポート106および第2ポート107は、イーサネット規格に準拠した有線通信を行うためのコネクタであり、夫々にケーブル110およびゲーブル111が接続されている。通信装置101は、図1に示すように、第1ポート106および第2ポート107を介して他の通信装置と通信する。第1ポート106は第1クロック121、第2ポート107は第2クロック122を備え、これらのクロックは、PTPパケットの送受信や中継などに使用される。第1クロック121および第2クロック122(クロックにおける時刻)は、CPU102が調整することができる。 The first port 106 and the second port 107 are connectors for communicating with other communication devices. In the present embodiment, the first port 106 and the second port 107 are connectors for performing wired communication conforming to the Ethernet standard, and the cable 110 and the gable 111 are connected to each of them. As shown in FIG. 1, the communication device 101 communicates with other communication devices via the first port 106 and the second port 107. The first port 106 includes a first clock 121, and the second port 107 includes a second clock 122, and these clocks are used for transmission / reception and relay of PTP packets. The first clock 121 and the second clock 122 (time in the clock) can be adjusted by the CPU 102.

図1に示すように、 通信装置101がデイジーチェーンによって他の通信装置と接続される場合、通信装置101で実行されるネットワークアプリケーションによる通信は、ブリッジ108を通して行われる。通信装置101が、ケーブル110を介して第1ポート106で受信したパケットは、ブリッジ108に渡される。ブリッジ108は、受信したパケットがマルチキャストやブロードキャスト、あるいは通信装置101宛のユニキャストのパケットであれば、DRAM104内に構成されるネットワークバッファに受信したパケットをコピーする。そして、ブリッジ108は、パケットを受信したことを、割り込みなどを使用してCPU102に通知する。一方、ブリッジ108は、受信したパケットが通信装置101宛でない場合やマルチキャスト、ブロードキャストの場合、当該パケットを第2ポート107に送信する。同様に、通信装置101がケーブル111を介して第2ポート107で受信したパケットは、ブリッジ108に渡される。ブリッジ108は、受信したパケットがマルチキャストやブロードキャスト、あるいは通信装置101宛のユニキャストのパケットであれば、DRAM104内に構成されるネットワークバッファにコピーする。そして、ブリッジ108はパケットを受信したことをCPU102に通知する。一方、ブリッジ108は受信したパケットが通信装置101宛でない場合やマルチキャスト、ブロードキャストの場合、当該パケットを第1ポート106に送信する。 As shown in FIG. 1, when the communication device 101 is connected to another communication device by a daisy chain, the communication by the network application executed by the communication device 101 is performed through the bridge 108. The packet received by the communication device 101 on the first port 106 via the cable 110 is passed to the bridge 108. If the received packet is a multicast, broadcast, or unicast packet addressed to the communication device 101, the bridge 108 copies the received packet to the network buffer configured in the DRAM 104. Then, the bridge 108 notifies the CPU 102 that the packet has been received by using an interrupt or the like. On the other hand, when the received packet is not addressed to the communication device 101, or when it is multicast or broadcast, the bridge 108 transmits the packet to the second port 107. Similarly, the packet received by the communication device 101 on the second port 107 via the cable 111 is passed to the bridge 108. If the received packet is a multicast, broadcast, or unicast packet addressed to the communication device 101, the bridge 108 copies it to the network buffer configured in the DRAM 104. Then, the bridge 108 notifies the CPU 102 that the packet has been received. On the other hand, when the received packet is not addressed to the communication device 101, or when it is multicast or broadcast, the bridge 108 transmits the packet to the first port 106.

(時刻同期の手順)
次に、図4(a)と図4(b)を参照して、PTPで使用されるパケット(PTPパケット)を用いた時刻同期の手順について説明する。図4(a)は、時刻同期サーバ212と通信装置101−a間の時刻同期処理のための通信シーケンス例を示す。時刻同期サーバ212は設定した送信間隔で、時刻同期パケットである、Syncパケット(およびFollow_upパケット)をマルチキャストで送信する。Follow_upパケットにはSyncパケットを送信した時刻が格納されている。また、通信装置101−aは時刻同期サーバ212にDelay_Requestパケットを送信し、それに応答して時刻同期サーバ212からDelay_Responseパケットを受信する。Delay_ResponseパケットにはDelay_Requestパケットが時刻同期サーバ212により受信された時刻が格納されている。通信装置101−aは、取得した時刻の情報から往復遅延時間を計測することができる。通信装置101−aは、取得した時刻の情報および往復遅延時間に基づいて、時刻同期処理を行う。
(Procedure for time synchronization)
Next, the procedure of time synchronization using the packet (PTP packet) used in PTP will be described with reference to FIGS. 4 (a) and 4 (b). FIG. 4A shows an example of a communication sequence for time synchronization processing between the time synchronization server 212 and the communication device 101-a. The time synchronization server 212 transmits the Sync packet (and Follow_up packet), which is a time synchronization packet, by multicast at the set transmission interval. The Follow_up packet stores the time when the Sync packet was transmitted. Further, the communication device 101-a transmits a Delay_Request packet to the time synchronization server 212, and receives a Delay_Response packet from the time synchronization server 212 in response to the transmission. The Delay_Response packet stores the time when the Delay_Request packet is received by the time synchronization server 212. The communication device 101-a can measure the round-trip delay time from the acquired time information. The communication device 101-a performs the time synchronization process based on the acquired time information and the round-trip delay time.

ここで、通信装置101−aによる時刻同期処理について説明する。本実施形態における時刻同期処理は、受信した時刻同期パケットを元に、時刻のずれを求め、当該ずれから時刻の進み具合を調整する処理である。具体的には、通信装置101−aのCPU102は、取得した時刻の情報および/または往復遅延時間に基づいて、第1ポート106の第1クロック121の調整値(第1クロック121のカウント1個あたりどのくらいの時刻進めるかの値)を導出する。そして、CPU102は、第1クロック121に当該調整値を設定することにより、の第1クロック121のカウント1個あたりどのくらいの時刻進めるかの値が変更される。例えば、第1クロック121が、1クロックで1msec進むよう構成されている場合、CPU102は、第1クロック121に対して、調整値として1003μsec進ませるか、990μ進ませるかのような調整を行う。通信装置101−aのCPU102は、導出した調整値が、複数回(例えば10回)同じ値である場合に、同期したとみなすことができる。CPU102は、第1ポート106の第1クロック121の時刻の情報を、第2ポート107の第2クロック122にコピーすること等により、第1クロック121と第2クロック122の同期をとることができる。 Here, the time synchronization process by the communication device 101-a will be described. The time synchronization process in the present embodiment is a process of obtaining a time lag based on the received time synchronization packet and adjusting the progress of the time from the lag. Specifically, the CPU 102 of the communication device 101-a determines the adjustment value of the first clock 121 of the first port 106 (one count of the first clock 121) based on the acquired time information and / or the round-trip delay time. Derivation of the value of how much time is advanced per hit). Then, by setting the adjustment value in the first clock 121, the CPU 102 changes the value of how much time is advanced per count of the first clock 121. For example, when the first clock 121 is configured to advance 1 msec in one clock, the CPU 102 makes adjustments such as advancing 1003 μsec or 990 μsec as an adjustment value with respect to the first clock 121. The CPU 102 of the communication device 101-a can be regarded as synchronized when the derived adjustment value is the same value a plurality of times (for example, 10 times). The CPU 102 can synchronize the first clock 121 and the second clock 122 by copying the time information of the first clock 121 of the first port 106 to the second clock 122 of the second port 107. ..

図4(b)はデイジーチェーンにおいて通信装置101−aがPTPパケットを中継する場合の通信シーケンスである。送受信されるPTPパケットは図4(a)と同様である。通信装置101−aは、時刻同期サーバ212から受信したPTPパケットを中継して通信装置101−bに送信する場合に、中継にかかる時間もPTPパケットに書き込んで中継することができる。通信装置101−bにおける同期処理は、前述の通信装置101−aにおける同期処理と同様である。また、図示していないが、通信装置101−c〜通信装置101−rにおける同期処理も、各通信装置101によるPTPパケットの中継を介して、前述の通信装置101−bにおける同期処理と同様に行われうる。 FIG. 4B is a communication sequence when the communication device 101-a relays the PTP packet in the daisy chain. The PTP packets transmitted and received are the same as in FIG. 4 (a). When the communication device 101-a relays the PTP packet received from the time synchronization server 212 and transmits it to the communication device 101-b, the time required for the relay can also be written in the PTP packet and relayed. The synchronization process in the communication device 101-b is the same as the synchronization process in the communication device 101-a described above. Further, although not shown, the synchronization processing in the communication devices 101-c to 101-r is also the same as the synchronization processing in the communication device 101-b described above via the relay of the PTP packet by each communication device 101. Can be done.

図4(a)と図4(b)において、時刻同期サーバ212は、時刻同期パケットを一定の送信間隔で送信する。当該時刻同期パケットの送信間隔は、orgdurationとして、予め時刻同期サーバ212に設定されており、変更することが可能である。本実施形態では、同期監視装置215が通信装置101の時刻同期状態を監視し、当該時刻同期状態に基づいて時刻同期パケットの送信間隔を調整する。同期監視装置215は調整後の時刻同期パケットの送信間隔を時刻同期サーバ212に通知し、時刻同期サーバ212はそれに応じて、時刻同期パケットの送信間隔を変更する。以下、このような時刻同期パケットの送信間隔調整処理に関して、同期監視装置215、時刻同期サーバ212、通信装置101により実行される処理について順に説明する。 In FIGS. 4A and 4B, the time synchronization server 212 transmits the time synchronization packets at regular transmission intervals. The transmission interval of the time synchronization packet is set in advance in the time synchronization server 212 as an execution, and can be changed. In the present embodiment, the synchronization monitoring device 215 monitors the time synchronization state of the communication device 101, and adjusts the transmission interval of the time synchronization packet based on the time synchronization state. The synchronization monitoring device 215 notifies the time synchronization server 212 of the transmission interval of the adjusted time synchronization packet, and the time synchronization server 212 changes the transmission interval of the time synchronization packet accordingly. Hereinafter, with respect to such a time synchronization packet transmission interval adjustment process, the processes executed by the synchronization monitoring device 215, the time synchronization server 212, and the communication device 101 will be described in order.

(同期監視装置215による処理)
図5は、本実施形態による同期監視装置215により実行される、時刻同期パケットの送信間隔調整処理を示すフローチャートである。図5に示す処理は、例えば、同期監視装置215の起動時などに開始される。図5の説明にあたり、通信装置101−a〜101−rは図2に示すように配置されており、通信装置101−a〜101−rが電源を一斉にONにされた場合を想定する。なお、時刻同期パケットの送信間隔の元の(オリジナルな)値は、予めネットワークを通じてorgduration(以下、元の送信間隔)として時刻同期サーバ212に設定されているものとする。
(Processing by synchronous monitoring device 215)
FIG. 5 is a flowchart showing a transmission interval adjustment process of the time synchronization packet executed by the synchronization monitoring device 215 according to the present embodiment. The process shown in FIG. 5 is started, for example, when the synchronous monitoring device 215 is started. In the description of FIG. 5, it is assumed that the communication devices 101-a-101-r are arranged as shown in FIG. 2, and the communication devices 101-a-101-r are turned on all at once. It is assumed that the original (original) value of the transmission interval of the time synchronization packet is set in advance in the time synchronization server 212 as an organization (hereinafter, the original transmission interval) through the network.

同期監視装置215は、時刻同期サーバ212から時刻同期パケットの元の送信間隔を取得する(S501)。S501の処理は、同期監視装置215が、元の送信間隔の取得要求のためのパケットを送信し、その応答として時刻同期サーバ212から元の送信間隔の値を含むパケットを受信することにより実現されうる。続いて同期監視装置215は、取得した元の送信間隔より短い送信間隔を導出する(S502)。例えば、同期監視装置215は、元の送信間隔をX(Xは任意の正の数)で除算することで、送信間隔を求める。Xで除算することで元の送信間隔から一定の割合で値を小さくすることができる。なお、この例では除算を使用しているがこれに限るものではなく、求める送信間隔が元の送信間隔より小さければよい。例えば、求める送信間隔が、元の送信間隔より小さい固定の間隔でもよいし、元の送信間隔から所定の値を減算した値(間隔)であってもよい。時刻同期サーバ212は、導出した送信間隔を時刻同期サーバ212に通知する(S503)。導出された送信間隔を受信した時刻同期サーバ212の動作については、図7を用いて後述する。 The synchronization monitoring device 215 acquires the original transmission interval of the time synchronization packet from the time synchronization server 212 (S501). The processing of S501 is realized by the synchronization monitoring device 215 transmitting a packet for the acquisition request of the original transmission interval, and receiving a packet including the value of the original transmission interval from the time synchronization server 212 as a response. sell. Subsequently, the synchronous monitoring device 215 derives a transmission interval shorter than the acquired original transmission interval (S502). For example, the synchronous monitoring device 215 obtains the transmission interval by dividing the original transmission interval by X (X is an arbitrary positive number). By dividing by X, the value can be reduced by a certain percentage from the original transmission interval. Although division is used in this example, it is not limited to this, and the desired transmission interval may be smaller than the original transmission interval. For example, the desired transmission interval may be a fixed interval smaller than the original transmission interval, or may be a value (interval) obtained by subtracting a predetermined value from the original transmission interval. The time synchronization server 212 notifies the time synchronization server 212 of the derived transmission interval (S503). The operation of the time synchronization server 212 that has received the derived transmission interval will be described later with reference to FIG. 7.

次に、同期監視装置215は、サーバシステム201(スイッチングハブ203)に接続されているPTPのスレーブ装置のリストとスレーブ装置の最大数(slaveMAX)の情報を取得する(S504)。S504の処理については、図6を用いて後述する。本実施形態では、スレーブ装置は通信装置101−a〜101−rであることから、同期監視装置215は、スレーブ装置のリストとして通信装置101−a〜101−rのリストを取得し、slaveMAXとしてa〜rの18という数の情報を取得する。 Next, the synchronous monitoring device 215 acquires a list of PTP slave devices connected to the server system 201 (switching hub 203) and information on the maximum number of slave devices (slaveMAX) (S504). The processing of S504 will be described later with reference to FIG. In the present embodiment, since the slave device is the communication device 101-a-101-r, the synchronous monitoring device 215 acquires the list of the communication devices 101-a-101-r as the list of the slave devices, and sets it as slaveMAX. The information of the number 18 of a to r is acquired.

その後、同期監視装置215は、所定時間(例えばY秒)動作を停止する(S505)。これは、通信装置101に対して送信する問い合わせパケットがネットワークを混雑させないようにするためである。Yの値は、例えば、一台の通信装置101が同期するまでにかかる時間などである。所定時間経過後、同期監視装置215は、取得したスレーブ装置のリストのインデックスを示す変数nに0を代入する(S506)。例えば変数nは、n番目の通信装置に対応し、変数n=0の通信装置は通信装置101−a、変数n=17の通信装置は通信装置101−rに対応する。 After that, the synchronous monitoring device 215 stops the operation for a predetermined time (for example, Y seconds) (S505). This is to prevent the inquiry packet transmitted to the communication device 101 from congesting the network. The value of Y is, for example, the time required for one communication device 101 to synchronize. After the lapse of a predetermined time, the synchronous monitoring device 215 assigns 0 to the variable n indicating the index of the acquired list of slave devices (S506). For example, the variable n corresponds to the nth communication device, the communication device with the variable n = 0 corresponds to the communication device 101-a, and the communication device with the variable n = 17 corresponds to the communication device 101-r.

同期監視装置215は、リストのn番目の通信装置101(スレーブ装置)に対して同期問い合わせパケットを送信し、時刻同期しているかどうか問い合わせる(S507)。リストのn番目の通信装置101から応答パケットを受信しなければ(S508でNo)、同期監視装置215は、n番目の通信装置101は時刻同期開始前と判断し、処理はS305に戻り一定時間処理を停止する。また、同期監視装置215は、n番目の通信装置101から応答パケットを受信した場合であっても、当該応答パケットが時刻同期していなことを示す場合も、処理はS505に戻る。n番目の通信装置101から時刻同期したことを示す応答パケットを受信した場合(S508でYes)、同期監視装置215は、変数nをslaveMAX(接続されている通信装置101の総数)と比較する(S509)。変数nがslaveMAXに達していなければ(S509でYes)、同期監視装置215は、nに1を加え(S512)、処理はS507に戻る。これにより、同期監視装置215は、リストにおける次の通信装置101に対して、同期しているかどうか問い合わせることができる。 The synchronization monitoring device 215 transmits a synchronization inquiry packet to the nth communication device 101 (slave device) in the list, and inquires whether or not the time is synchronized (S507). If the response packet is not received from the nth communication device 101 in the list (No in S508), the synchronization monitoring device 215 determines that the nth communication device 101 is before the start of time synchronization, and the process returns to S305 for a certain period of time. Stop processing. Further, even when the synchronization monitoring device 215 receives the response packet from the nth communication device 101, the process returns to S505 even when the response packet indicates that the response packets are not time-synchronized. When a response packet indicating that the time has been synchronized is received from the nth communication device 101 (Yes in S508), the synchronization monitoring device 215 compares the variable n with the slaveMAX (total number of connected communication devices 101) (the total number of connected communication devices 101). S509). If the variable n has not reached slaveMAX (Yes in S509), the synchronous monitoring device 215 adds 1 to n (S512), and the process returns to S507. As a result, the synchronization monitoring device 215 can inquire whether or not the next communication device 101 in the list is synchronized.

変数nがslaveMAXに達している場合(S509でNo)は、通信装置101−a〜101−rが同期したことを示すので、同期監視装置215は、送信間隔を元の送信間隔に戻し(S510)、当該元の送信間隔を時刻同期サーバ212に通知する(S511)。S511の処理は、同期監視装置215が送信間隔を通知するためのパケットを時刻同期サーバ212に送信することにより実現されうる。 When the variable n reaches slaveMAX (No in S509), it indicates that the communication devices 101-a-101-r are synchronized, so that the synchronization monitoring device 215 returns the transmission interval to the original transmission interval (S510). ), Notify the time synchronization server 212 of the original transmission interval (S511). The process of S511 can be realized by the synchronization monitoring device 215 transmitting a packet for notifying the transmission interval to the time synchronization server 212.

次に、図5におけるS504の処理について、図6を参照して説明する。図6は、スレーブ装置のリストとスレーブ装置の最大数(slaveMAX)の情報を取得するための処理のフローチャートである。まず、同期監視装置215は、スレーブ装置の数を計数するための変数nに0を代入する(S601)。続いて、同期監視装置215は、pingとして知られているping問い合わせパケット(ICMP Echo)をブロードキャストで送信する(S602)。その後、同期監視装置215は所定時間待機し、いくつかのping応答パケット(ICMP Echo Reply)を受信できるのを待つ(S603)。当該所定時間は例えば1秒である。当該所定時間の経過後、同期監視装置215は、1以上のping応答パケットを受信したかどうかを調べ(S604)、ping応答パケットを受信していれば(S604でYes)、ping応答を1パケットだけ読み出す(S605)。同期監視装置215は複数のスレーブ装置からのping応答パケットを受信しうるが、S305では同期監視装置215は1パケットずつ読み出す。そして同期監視装置215はnが0かどうか調べ(S606)、nが0であれば(S606でYes)、ping応答パケットの送信元アドレスをスレーブ装置のリストのn番目の項目に登録する(S609)。その後nを1増やし(S610)、処理はS604に戻る。 Next, the process of S504 in FIG. 5 will be described with reference to FIG. FIG. 6 is a flowchart of a process for acquiring a list of slave devices and information on the maximum number of slave devices (slaveMAX). First, the synchronous monitoring device 215 assigns 0 to the variable n for counting the number of slave devices (S601). Subsequently, the synchronous monitoring device 215 broadcasts a ping inquiry packet (ICMP Echo) known as ping (S602). After that, the synchronous monitoring device 215 waits for a predetermined time and waits for some ping response packets (ICMP Echo Repeat) to be received (S603). The predetermined time is, for example, 1 second. After the elapse of the predetermined time, the synchronization monitoring device 215 checks whether or not one or more ping response packets have been received (S604), and if the ping response packet has been received (Yes in S604), one ping response packet. Read only (S605). The synchronous monitoring device 215 can receive ping response packets from a plurality of slave devices, but in S305, the synchronous monitoring device 215 reads one packet at a time. Then, the synchronous monitoring device 215 checks whether n is 0 (S606), and if n is 0 (Yes in S606), registers the source address of the ping response packet in the nth item of the list of slave devices (S609). ). After that, n is incremented by 1 (S610), and the process returns to S604.

S606においてnが0でなければ(S606でNo)、同期監視装置215は、ping応答パケットの送信元アドレスを、これまで受信した送信元アドレスが登録されているスレーブ装置のリストの0番目からn−1番目の項目(送信元アドレス)と比較する(S607)。送信元アドレスと一致する送信元アドレスが既にリストに登録されていれば(S608でYes)、処理はS604に戻る。送信元アドレスと一致する送信元アドレスがリストに登録されていなければ(S608でNo)、同期監視装置215は、ping応答パケットの送信元アドレスを、スレーブ装置のリストのn番目の項目に登録する(S609)。その後nを1増やし(S610)、処理はS604に戻る。 If n is not 0 in S606 (No in S606), the synchronous monitoring device 215 sets the source address of the ping response packet to n from the 0th position in the list of slave devices in which the source address received so far is registered. -Compare with the first item (source address) (S607). If a source address that matches the source address is already registered in the list (Yes in S608), the process returns to S604. If the source address that matches the source address is not registered in the list (No in S608), the synchronization monitoring device 215 registers the source address of the ping response packet in the nth item of the list of slave devices. (S609). After that, n is incremented by 1 (S610), and the process returns to S604.

S604においてping応答パケットを読み出せなかった場合、つまり、1つもping応答パケットを受信しなかった、もしくは受信したping応答パケットをすべて読み出した場合は(S604でNo)、処理はS611へ進む。S611では、同期監視装置215は、図6に示す処理の開始から所定時間経過したかどうかを調べる(S611)。S611における所定時間は、S402のping応答パケットの受信待ち時間より大きな時間であり、例えば10秒である。当該所定時間が経過していなければ(S611でNo)、処理はS602に戻り、同期監視装置215は、ping問い合わせパケットを送信する。このように構成することで、同期監視装置215は、規定時間までping問い合わせパケットを定期的に送信する。S611において規定時間を経過していれば(S611でYes)、同期監視装置215は、slaveMAXにその時のnの値を代入する(S612)。これによりslaveMAXにはスレーブ装置の数が格納される。 If the ping response packet cannot be read in S604, that is, if no ping response packet is received, or if all the received ping response packets are read (No in S604), the process proceeds to S611. In S611, the synchronous monitoring device 215 checks whether or not a predetermined time has elapsed from the start of the process shown in FIG. 6 (S611). The predetermined time in S611 is longer than the reception waiting time of the ping response packet of S402, and is, for example, 10 seconds. If the predetermined time has not elapsed (No in S611), the process returns to S602, and the synchronous monitoring device 215 transmits a ping inquiry packet. With this configuration, the synchronous monitoring device 215 periodically transmits the ping inquiry packet until the specified time. If the specified time has elapsed in S611 (Yes in S611), the synchronous monitoring device 215 substitutes the value of n at that time into slaveMAX (S612). As a result, the number of slave devices is stored in slaveMAX.

(時刻同期サーバ212による処理)
次に、図7を参照して、時刻同期サーバ212が同期監視装置215から送信間隔を受信する処理について説明する。図7は、時刻同期サーバ212により実行される送信間隔の値の受信処理のフローチャートである。当該受信処理は、図5のS501、S503、S511の処理に関連する。
(Processing by the time synchronization server 212)
Next, with reference to FIG. 7, a process in which the time synchronization server 212 receives the transmission interval from the synchronization monitoring device 215 will be described. FIG. 7 is a flowchart of the reception process of the value of the transmission interval executed by the time synchronization server 212. The reception process is related to the process of S501, S503, and S511 of FIG.

時刻同期サーバ212は、予め設定されているorgdurationの値、すなわち、元の送信間隔を、時刻同期パケットの送信間隔として設定する(S701)。その後、時刻同期サーバ212は、同期監視装置215からパケットを受信するのを待機する(S702)。具体的には、時刻同期サーバ212は、同期監視装置215から、元の送信間隔の取得要求のためのパケット(図5のS501)か、送信間隔を通知するためのパケット(図5のS503、S511)を受信するのを待機する。パケットを受信すると、時刻同期サーバ212は、受信したパケットが元の送信間隔の取得要求のためのパケットか否かを調べる(S703)。受信したパケットが元の送信間隔の取得要求のためのパケットであれば(S703でYes)、時刻同期サーバ212は、応答として元の送信間隔の値を含むパケットを同期監視装置215に送信し(S706)、処理はS702に戻る。受信したパケットが元の送信間隔の取得要求のためのパケットでなければ(S703でNo)、時刻同期サーバ212は、受信したパケットが送信間隔を通知するためのパケットかを調べる(S704)。受信したパケットが送信間隔を通知するためのパケットであれば(S704でYes)、時刻同期サーバ212は、受信したパケットに含まれる送信間隔の値を、時刻同期パケットの送信間隔として設定し(S705)、処理はS702に戻る。受信したパケットが送信間隔を通知するためのパケットでなければ(S704でNo)、処理はS702に戻り、時刻同期サーバ212はパケットの受信待ちの状態となる。 The time synchronization server 212 sets a preset value of orientation, that is, the original transmission interval, as the transmission interval of the time synchronization packet (S701). After that, the time synchronization server 212 waits for receiving a packet from the synchronization monitoring device 215 (S702). Specifically, the time synchronization server 212 receives a packet for acquiring the original transmission interval (S501 in FIG. 5) or a packet for notifying the transmission interval (S503 in FIG. 5) from the synchronization monitoring device 215. Wait for S511) to be received. Upon receiving the packet, the time synchronization server 212 checks whether the received packet is a packet for the acquisition request of the original transmission interval (S703). If the received packet is a packet for the acquisition request of the original transmission interval (Yes in S703), the time synchronization server 212 transmits a packet including the value of the original transmission interval to the synchronization monitoring device 215 as a response (Yes). S706), the process returns to S702. If the received packet is not the packet for the acquisition request of the original transmission interval (No in S703), the time synchronization server 212 checks whether the received packet is a packet for notifying the transmission interval (S704). If the received packet is a packet for notifying the transmission interval (Yes in S704), the time synchronization server 212 sets the value of the transmission interval included in the received packet as the transmission interval of the time synchronization packet (S705). ), The process returns to S702. If the received packet is not a packet for notifying the transmission interval (No in S704), the process returns to S702, and the time synchronization server 212 is in a state of waiting for packet reception.

時刻同期サーバ212は、自身に設定した時刻同期パケットの送信間隔に従って、時刻同期パケットを送信する。図8は、時刻同期サーバ212により実行される時刻同期パケットの送信処理のフローチャートである。時刻同期サーバ212は、時刻同期パケットである、SyncパケットとFollow_upパケットを前回送信してから、設定した送信間隔の時間、処理を一時停止する(S801)。設定した送信間隔が経過すると、時刻同期サーバ212は時刻同期パケットを送信する(S802)。 The time synchronization server 212 transmits the time synchronization packet according to the transmission interval of the time synchronization packet set by itself. FIG. 8 is a flowchart of a time synchronization packet transmission process executed by the time synchronization server 212. The time synchronization server 212 suspends processing for a set transmission interval time after the last transmission of the Sync packet and the Follow_up packet, which are time synchronization packets (S801). When the set transmission interval elapses, the time synchronization server 212 transmits the time synchronization packet (S802).

このように、時刻同期サーバ212は、図7のS701やS705の処理により設定した送信間隔の値を使用し、S801の停止処理(スリープ)を実行する。これにより、時刻同期サーバ212は、同期監視装置215が決定した送信間隔で時刻同期パケットを送信することができる。 In this way, the time synchronization server 212 executes the stop process (sleep) of S801 by using the value of the transmission interval set by the processes of S701 and S705 of FIG. 7. As a result, the time synchronization server 212 can transmit the time synchronization packet at the transmission interval determined by the synchronization monitoring device 215.

(通信装置101による処理)
図9に、図5のS507において同期監視装置215から同期問い合わせパケットが送信されることを受けて通信装置101により実行される処理のフローチャートを示す。通信装置101は、同期監視装置215からパケットを受信するのを待機する(S901)。具体的には、通信装置101は、同期監視装置215から、同期問い合わせパケットを受信するのを待機する。パケットを受信すると、通信装置101は、受信したパケットが同期問い合わせパケットか否かを調べる(S902)。受信したパケットが同期問い合わせパケットでなければ(S902でNo)、処理はS901に戻り、通信装置101はパケットの受信待ちの状態となる。受信したパケットが同期問い合わせパケットであれば(S902でYes)、通信装置101は、時刻同期しているか否かを判定する。時刻同期しているか否かの判定は、図4(a)、(b)を用いて前述した通りである。通信装置101は、時刻同期している場合、時刻同期していることを示す応答パケットを送信し、時刻同期していない場合、時刻同期していないことを示す応答パケットを送信する。時刻同期していない場合、通信装置101は応答パケットを送信しなくてもよい。
(Processing by communication device 101)
FIG. 9 shows a flowchart of processing executed by the communication device 101 in response to the synchronization inquiry packet being transmitted from the synchronization monitoring device 215 in S507 of FIG. The communication device 101 waits for receiving a packet from the synchronization monitoring device 215 (S901). Specifically, the communication device 101 waits for receiving the synchronization inquiry packet from the synchronization monitoring device 215. Upon receiving the packet, the communication device 101 checks whether the received packet is a synchronization inquiry packet (S902). If the received packet is not a synchronous inquiry packet (No in S902), the process returns to S901, and the communication device 101 is in a state of waiting for packet reception. If the received packet is a synchronization inquiry packet (Yes in S902), the communication device 101 determines whether or not the time is synchronized. The determination of whether or not the time is synchronized is as described above with reference to FIGS. 4A and 4B. The communication device 101 transmits a response packet indicating that the time is synchronized when the time is synchronized, and transmits a response packet indicating that the time is not synchronized when the time is not synchronized. If the time is not synchronized, the communication device 101 does not have to transmit the response packet.

(同期監視装置215と時刻同期サーバ212の構成)
上記のような処理を行う同期監視装置215と時刻同期サーバ212の構成を図18に示す。なお、本実施形態では、同期監視装置215と時刻同期サーバ212を別の装置としているが、時刻同期サーバ212と同期監視装置215が同じ装置であってもよい。図18は、時刻同期サーバ212と同期監視装置215が1つの制御装置1801として構成される場合の構成例を示す。図18(a)は制御装置1801のハードウェア構成例、図18(b)は制御装置1801の機能構成例を示す。
(Configuration of synchronization monitoring device 215 and time synchronization server 212)
FIG. 18 shows the configuration of the synchronization monitoring device 215 and the time synchronization server 212 that perform the above processing. In the present embodiment, the synchronization monitoring device 215 and the time synchronization server 212 are separate devices, but the time synchronization server 212 and the synchronization monitoring device 215 may be the same device. FIG. 18 shows a configuration example in which the time synchronization server 212 and the synchronization monitoring device 215 are configured as one control device 1801. FIG. 18A shows a hardware configuration example of the control device 1801, and FIG. 18B shows a functional configuration example of the control device 1801.

図18(a)において、CPU1802、ROM1803、DRAM1804は、図3に示した通信装置101のCPU102、ROM103、DRAM104と同様である。通信インタフェース(IF)1805は他の装置と通信を行うためのインタフェースである。表示部1806は各種表示処理を行う。制御装置1801(同期監視装置215並びに時刻同期サーバ212)による処理のフローチャートは、CPU1802がROM1803に記憶されている制御プログラムを実行し、情報の演算および加工並びに各ハードウェアの制御を実行することにより実現されうる。 In FIG. 18A, the CPU 1802, ROM 1803, and DRAM 1804 are the same as the CPU 102, ROM 103, and DRAM 104 of the communication device 101 shown in FIG. The communication interface (IF) 1805 is an interface for communicating with other devices. The display unit 1806 performs various display processes. The flowchart of processing by the control device 1801 (synchronization monitoring device 215 and time synchronization server 212) is obtained by the CPU 1802 executing the control program stored in the ROM 1803, calculating and processing the information, and controlling each hardware. It can be realized.

図18(b)において、設定部1811は、時刻同期パケットの送信間隔の導出および設定を行うための機能を有する。通信制御部1812は、通信IF1805を介した通信制御を行うための機能を有する。例えば、通信制御部1812は通信IF1805を介してパケットの送信や受信を行う。同期判定部1813は、1以上の通信装置101が同期しているかを判定するための機能を有する。例えば、同期判定部1813は、通信制御部1812を介した通信により、当該判定を行うことができる。スレーブ管理部1814は、スレーブ装置である通信装置101を管理する。例えば、スレーブ管理部1814は、通信制御部1812を介した通信により、通信装置101のリストと総数の情報を取得するための制御(図6)を行い、当該情報を管理する。計時部1815は、計時処理を行い、あるタイミングから所定の時間が経過したか否かを判定するための機能を有する。表示制御部1816は各種表示制御を行う。 In FIG. 18B, the setting unit 1811 has a function for deriving and setting the transmission interval of the time synchronization packet. The communication control unit 1812 has a function for performing communication control via the communication IF1805. For example, the communication control unit 1812 transmits and receives packets via the communication IF1805. The synchronization determination unit 1813 has a function for determining whether or not one or more communication devices 101 are synchronized. For example, the synchronization determination unit 1813 can perform the determination by communication via the communication control unit 1812. The slave management unit 1814 manages the communication device 101, which is a slave device. For example, the slave management unit 1814 controls (FIG. 6) to acquire information on the list and the total number of communication devices 101 by communication via the communication control unit 1812, and manages the information. The timekeeping unit 1815 has a function of performing a timekeeping process and determining whether or not a predetermined time has elapsed from a certain timing. The display control unit 1816 performs various display controls.

なお、図1に示すように、時刻同期サーバ212と同期監視装置215が別の装置として構成される場合は、それぞれ図18(a)に示すようなハードウェア構成を備える。また、機能構成として、例えば、時刻同期サーバ212は、設定部1811、通信制御部1812、計時部1815を備え、同期監視装置215は、図18(b)に示す構成を備えるように構成されてもよい。 As shown in FIG. 1, when the time synchronization server 212 and the synchronization monitoring device 215 are configured as separate devices, they each have a hardware configuration as shown in FIG. 18A. Further, as a functional configuration, for example, the time synchronization server 212 includes a setting unit 1811, a communication control unit 1812, and a time timing unit 1815, and the synchronization monitoring device 215 is configured to have the configuration shown in FIG. 18B. May be good.

本実施形態では、以上に述べたような構成により、図1に示すようなシステムの起動時、複数の通信装置101のいずれかの時刻の同期が取れていない場合に、時刻同期パケットの送信間隔を縮めることができる。これにより、複数の通信装置101が同期するまでの時間を短縮することができる。特に、複数の通信装置101がデイジーチェーン接続されている場合に、大きな時間短縮が得られる。 In the present embodiment, with the configuration as described above, when the time of any of the plurality of communication devices 101 is not synchronized at the time of starting the system as shown in FIG. 1, the transmission interval of the time synchronization packet is established. Can be shortened. Thereby, the time until the plurality of communication devices 101 are synchronized can be shortened. In particular, when a plurality of communication devices 101 are connected in a daisy chain, a large time reduction can be obtained.

また、接続されている通信装置101全てが同期し終えたのちに時刻同期パケットの送信間隔を元の送信間隔に戻すことで、通信装置101の時刻同期後の時刻同期のパケットを減らすことができる。これにより、ネットワーク(ケーブル110やケーブル111)にかかる負荷を減らすことができる。 Further, by returning the transmission interval of the time synchronization packet to the original transmission interval after all the connected communication devices 101 have been synchronized, the time synchronization packet after the time synchronization of the communication device 101 can be reduced. .. As a result, the load on the network (cable 110 or cable 111) can be reduced.

なお、本実施形態では、図5で説明したように、同期監視装置215は、通信装置101の総数や通信装置101のアドレスを、通信装置101との通信により取得したが、取得方法はこれに限るものではない。例えば、図2のように設置されている通信装置101の総数やアドレスの情報が予めシステムにおいて分かっている場合、その総数をオペレータ(ユーザ)が同期監視装置215に対して手操作で入力してもよい。 In the present embodiment, as described with reference to FIG. 5, the synchronous monitoring device 215 acquires the total number of the communication devices 101 and the addresses of the communication devices 101 by communication with the communication device 101. Not limited. For example, when the total number and address information of the communication devices 101 installed as shown in FIG. 2 are known in advance in the system, the operator (user) manually inputs the total number to the synchronous monitoring device 215. May be good.

また、本実施形態では、同期監視装置215は、接続されている通信装置101の時刻同期後、時刻同期パケットの送信間隔を元に戻すための処理をしているが、送信間隔を長くすることも可能である。例えば、図5のS510において、同期監視装置215は、送信間隔を、当該送信間隔より長い間隔に設定することができる。これにより、時刻同期パケットの送信頻度が下がり、ネットワーク(ケーブル110やケーブル111)にかかる負荷をさらに下げることができる。 Further, in the present embodiment, the synchronization monitoring device 215 performs a process for restoring the transmission interval of the time synchronization packet after the time synchronization of the connected communication device 101, but the transmission interval is lengthened. Is also possible. For example, in S510 of FIG. 5, the synchronization monitoring device 215 can set the transmission interval to be longer than the transmission interval. As a result, the frequency of transmitting time-synchronized packets is reduced, and the load on the network (cable 110 or cable 111) can be further reduced.

また、本実施形態では、デイジーチェーン接続されたネットワークを例に説明したが、他のネットワーク構成にも、本実施形態を適用可能である。例えば、時刻同期の監視対象となる通信装置101が予めシステムにおいて分かっていれば、通信装置101をハブに接続する一般的なスター型のネットワーク構成に、本実施形態を適用することができる。また、時刻同期サーバ212と同期監視装置215を同じ装置で構成し、通信装置101と直接イーサネットケーブルを接続した1対1の構成に、本実施形態を適用することができる。 Further, in the present embodiment, the daisy-chained network has been described as an example, but the present embodiment can also be applied to other network configurations. For example, if the communication device 101 to be monitored for time synchronization is known in advance in the system, the present embodiment can be applied to a general star-shaped network configuration in which the communication device 101 is connected to a hub. Further, the present embodiment can be applied to a one-to-one configuration in which the time synchronization server 212 and the synchronization monitoring device 215 are configured by the same device and the communication device 101 and the Ethernet cable are directly connected.

[実施形態2]
図1における通信装置101−a〜101−qは、時刻同期サーバ212が送信したPTPパケットを中継する。PTPパケットの中継時には第1ポート106の第1クロック121と第2ポート107の第2クロック122を使用するため、第1クロック121と第2クロック122が同期していなくてはならない。そのため、時刻同期開始時はPTPパケットを使用して、第1クロック121と第2クロック122の同期をとった後、PTPパケットの中継を開始する必要がある。このように、デイジーチェーンを用いた図1のようなシステムにおいては、時刻同期サーバ212に最も近い通信装置101−aから順に時刻の同期を行っていくことになる。そのため、最も離れた通信装置101−rの時刻同期が取れた時に全ての装置の時刻同期が完了していることがわかる。本実施形態はこれを利用して、同期監視装置215が通信装置101のリストと総数の情報を取得する。
[Embodiment 2]
The communication device 101-a-101-q in FIG. 1 relays the PTP packet transmitted by the time synchronization server 212. Since the first clock 121 of the first port 106 and the second clock 122 of the second port 107 are used when relaying the PTP packet, the first clock 121 and the second clock 122 must be synchronized. Therefore, at the start of time synchronization, it is necessary to use the PTP packet to synchronize the first clock 121 and the second clock 122, and then start relaying the PTP packet. As described above, in the system as shown in FIG. 1 using the daisy chain, the time is synchronized in order from the communication device 101-a closest to the time synchronization server 212. Therefore, it can be seen that the time synchronization of all the devices is completed when the time synchronization of the farthest communication device 101-r is obtained. In this embodiment, the synchronous monitoring device 215 uses this to acquire information on the list and the total number of the communication devices 101.

本実施形態では、実施形態1と異なる点について説明する。図10は、本実施形態による同期監視装置215により実行される、時刻同期パケットの送信間隔調整処理を示すフローチャートである。実施形態1において説明した図5と比較して、S503の後からS510の前までの処理が異なる。S1001では、同期監視装置215は、デイジーチェーンの最後の通信装置101(時刻同期サーバ212から最も離れている通信装置101)のアドレスを取得する。デイジーチェーンの最後の通信装置101を特定する方法については後述する。図1のように通信装置101が設置されている場合、デイジーチェーンの最後の通信装置101は、通信装置101−rである。同期監視装置215は、所定時間動作を停止後(S505)、デイジーチェーンの最後の通信装置101−rに対して時刻同期しているかどうか問い合わせる(S1002)。通信装置101−rから、応答パケットを受信しない場合、及び、時刻同期していないことを示す応答パケットを受信した場合(S1003でNo)、処理はS505へ戻る。一方、時刻同期していていることを示す応答パケットを受信した場合(S1003でYes)、処理はS510へ進む。 In this embodiment, the differences from the first embodiment will be described. FIG. 10 is a flowchart showing a transmission interval adjustment process of the time synchronization packet executed by the synchronization monitoring device 215 according to the present embodiment. Compared with FIG. 5 described in the first embodiment, the processing from after S503 to before S510 is different. In S1001, the synchronization monitoring device 215 acquires the address of the last communication device 101 in the daisy chain (the communication device 101 farthest from the time synchronization server 212). A method of identifying the last communication device 101 in the daisy chain will be described later. When the communication device 101 is installed as shown in FIG. 1, the last communication device 101 in the daisy chain is the communication device 101-r. After stopping the operation for a predetermined time (S505), the synchronization monitoring device 215 inquires whether or not the time is synchronized with the last communication device 101-r of the daisy chain (S1002). When the response packet is not received from the communication device 101-r and when the response packet indicating that the time is not synchronized is received (No in S1003), the process returns to S505. On the other hand, when a response packet indicating that the time is synchronized is received (Yes in S1003), the process proceeds to S510.

ここで、デイジーチェーンの最後の通信装置101(時刻同期サーバ212から最も離れている通信装置101)を特定する方法について説明する。図2のように通信装置101−a〜101−rが設置され、オペレータが通信装置101−a〜101−rに手動でIPアドレスを設定した場合を想定する。この場合、オペレータは、どのIPアドレスを持つ通信装置101が時刻同期サーバ212から離れた場所に設置されているかわかる。同期監視装置215は、Ping要求パケットを通信装置101に送信し、その応答パケットの結果等から、通信装置101のIPアドレスを取得し、表示部1806に表示する。図11に、同期監視装置215において表示される、通信装置101のIPアドレスの表の例を示す。オペレータは、図11のように表示されたIPアドレスの表から、時刻同期サーバ212から最も離れた場所に設置された通信装置101のチェックボックスを選択(チェック)することができる。これにより、同期監視装置215は、時刻同期サーバ212から最も離れた場所に設置されている通信装置101(図2の例では通信装置101−r)のIPアドレスを得ることができる。 Here, a method of identifying the last communication device 101 in the daisy chain (the communication device 101 farthest from the time synchronization server 212) will be described. It is assumed that the communication device 101-a-101-r is installed as shown in FIG. 2 and the operator manually sets the IP address in the communication device 101-a-101-r. In this case, the operator knows which IP address the communication device 101 has is installed at a location away from the time synchronization server 212. The synchronization monitoring device 215 transmits a Ping request packet to the communication device 101, acquires the IP address of the communication device 101 from the result of the response packet, and displays the IP address on the display unit 1806. FIG. 11 shows an example of a table of IP addresses of the communication device 101 displayed in the synchronous monitoring device 215. The operator can select (check) the check box of the communication device 101 installed at the farthest place from the time synchronization server 212 from the table of IP addresses displayed as shown in FIG. As a result, the synchronization monitoring device 215 can obtain the IP address of the communication device 101 (communication device 101-r in the example of FIG. 2) installed at the farthest place from the time synchronization server 212.

また、当該方法と別の方法で、デイジーチェーンの最後の通信装置101を特定してもよい。例えば、図1のように複数の通信装置101がデイジーチェーン接続され、DHCPサーバ213から受信したIPアドレスをある通信装置101が設定し、当該設定後に他の通信装置101によるIPアドレスの設定が許容されるように構成される場合を想定する。さらにDHCPサーバがIPアドレスの数の小さいものから順にアドレスを割り当てるように構成される場合、時刻同期サーバ212に近い通信装置101から小さい順にアドレスが付与される。DHCPサーバ213と時刻同期サーバ212を同じ装置で動作させることで、時刻同期サーバ212はDHCPサーバ213が配布したアドレスを取得できるようになる。これを利用し、DHCPサーバ213のアドレスの配布後、時刻同期サーバ212は最も大きなIPアドレスを取得し、同期監視装置215に通知することができる。この最も大きなIPアドレスの装置が、デイジーチェーンの最後の通信装置101であるとみなすことができる。DHCPサーバ213と時刻同期サーバ212と同期監視装置215を同じ装置で動作させる場合は、同期監視装置215は時刻同期サーバ212からの通知なしで、最も大きなIPアドレスを取得することができる。 Further, the last communication device 101 of the daisy chain may be specified by a method different from the method. For example, as shown in FIG. 1, a plurality of communication devices 101 are daisy-chained, an IP address received from the DHCP server 213 is set by a certain communication device 101, and after the setting, the IP address can be set by another communication device 101. Suppose that it is configured to be. Further, when the DHCP server is configured to allocate addresses in ascending order from the smallest number of IP addresses, addresses are assigned in ascending order from the communication device 101 closest to the time synchronization server 212. By operating the DHCP server 213 and the time synchronization server 212 on the same device, the time synchronization server 212 can acquire the address distributed by the DHCP server 213. Utilizing this, after the address of the DHCP server 213 is distributed, the time synchronization server 212 can acquire the largest IP address and notify the synchronization monitoring device 215. The device with the highest IP address can be considered to be the last communication device 101 in the daisy chain. When the DHCP server 213, the time synchronization server 212, and the synchronization monitoring device 215 are operated by the same device, the synchronization monitoring device 215 can acquire the largest IP address without notification from the time synchronization server 212.

[実施形態3]
本実施形態では、通信装置101の時刻同期後、通信装置101の負荷が一時的に高くなるなどの理由で同期が外れた場合に、再度時刻同期サーバ212が送信する時刻同期パケットの間隔を小さくする処理について説明する。当該処理により、通信装置101の同期が外れた場合であっても、再度同期をとるまでの時間を小さくすることができる。
[Embodiment 3]
In the present embodiment, after the time synchronization of the communication device 101, when the synchronization is lost due to a temporary increase in the load of the communication device 101 or the like, the interval of the time synchronization packets transmitted by the time synchronization server 212 is reduced again. The processing to be performed will be described. By this process, even if the communication device 101 is out of synchronization, the time until synchronization can be achieved again can be reduced.

図12は、本実施形態による同期監視装置215により実行される。同期確認処理・時刻同期パケットの送信間隔調整処理を示すフローチャートである。S1201で、同期監視装置215は所定時間、動作を停止する。すなわち、同期監視装置215は、当該所定時間毎に同期が取れているかどうかの確認を行う。当該所定時間は例えば10秒である。当該所定時間の経過後、同期監視装置215は、変数nに0を代入する(S1202)。続いて、実施形態1で説明した図6の処理により取得した通信装置101のリストのn番目の通信装置101に時刻同期しているかどうか問い合わせる。すなわち、同期監視装置215はn番目の通信装置に対して同期問い合わせパケットを送信する。同期問い合わせパケットを受信した通信装置101は、実施形態1で説明した図9の処理に従い、時刻同期が取れているか否かを応答パケットで応答する。通信装置101の負荷が高いなどの理由で応答がなかった場合(S1204でNo)は、再度同じ通信装置101に対して同期問い合わせパケットを送信する(S1204)。 FIG. 12 is executed by the synchronous monitoring device 215 according to the present embodiment. It is a flowchart which shows the synchronization confirmation processing, time synchronization packet transmission interval adjustment processing. In S1201, the synchronous monitoring device 215 stops operating for a predetermined time. That is, the synchronization monitoring device 215 confirms whether or not synchronization is achieved at the predetermined time intervals. The predetermined time is, for example, 10 seconds. After the elapse of the predetermined time, the synchronization monitoring device 215 substitutes 0 for the variable n (S1202). Subsequently, an inquiry is made as to whether or not the time is synchronized with the nth communication device 101 in the list of the communication devices 101 acquired by the process of FIG. 6 described in the first embodiment. That is, the synchronization monitoring device 215 transmits a synchronization inquiry packet to the nth communication device. The communication device 101 that has received the synchronization inquiry packet responds with the response packet whether or not the time synchronization is achieved according to the process of FIG. 9 described in the first embodiment. If there is no response due to a high load on the communication device 101 (No in S1204), the synchronization inquiry packet is transmitted to the same communication device 101 again (S1204).

同期監視装置215は、応答パケットを受信でき(S1204でYes)、当該応答パケットが同期していないことを示す場合(S1205でNo)、実施形態1で説明した図5に示す処理を実行する(S1208)。図5のフローチャートに従い、同期監視装置215は、時刻同期パケットの送信間隔を縮め、通信装置101の同期が取れたら時刻同期パケットの送信間隔を元の送信間隔に戻す。S1208の処理の終了後、処理はS1201に戻り、同期監視装置215は再度、所定時間動作を停止する。 When the synchronization monitoring device 215 can receive the response packet (Yes in S1204) and indicates that the response packet is not synchronized (No in S1205), the synchronization monitoring device 215 executes the process shown in FIG. 5 described in the first embodiment (No). S1208). According to the flowchart of FIG. 5, the synchronization monitoring device 215 shortens the transmission interval of the time synchronization packet, and returns the transmission interval of the time synchronization packet to the original transmission interval when the communication device 101 is synchronized. After the processing of S1208 is completed, the processing returns to S1201, and the synchronous monitoring device 215 stops operating again for a predetermined time.

同期監視装置215は、応答パケットを受信でき(S1204でYes)、当該応答パケットが同期していることを示す場合(S1205でYes)、nに1を付加する(S1206)。変数nがslaveMAXに達していない場合(S1207でYes)、同期監視装置215は、リストのn番目の通信装置101に対し同期問い合わせパケットを送信する(S1203)。変数nがslaveMAXに到達している場合(S1207でNo)は、デイジーチェーンに接続されている全ての通信装置101に問い合わせたことを意味する。よって、処理はS1201に戻り、同期監視装置215は再度、所定時間動作を停止する。 When the synchronization monitoring device 215 can receive the response packet (Yes in S1204) and indicates that the response packet is synchronized (Yes in S1205), 1 is added to n (S1206). When the variable n has not reached slaveMAX (Yes in S1207), the synchronization monitoring device 215 transmits a synchronization inquiry packet to the nth communication device 101 in the list (S1203). When the variable n reaches slaveMAX (No in S1207), it means that all the communication devices 101 connected to the daisy chain have been inquired. Therefore, the process returns to S1201, and the synchronous monitoring device 215 stops operating again for a predetermined time.

なお、図12の例では、S1205で応答パケットが同期していないことを示す場合に、送信間隔調整処理を行ったが(S1208)、全ての通信装置101のうち、同期していないと判定される通信装置101の台数に基づいて、送信間隔の調整を行ってもよい。例えば、同期監視装置215は、slaveMAX数のうち、S1205でNoである通信装置101の数を、時刻同期していないと判定される通信装置101の台数として決定する。そして、同期監視装置215は、時刻同期していないと判定される通信装置101の台数に基づいて、時刻同期パケットの送信間隔D3を決定してもよい。例えば、時刻同期していないと判定される通信装置101の台数をr、元の送信間隔をD1、全ての通信装置101の時刻同期がとれている場合に設定可能な送信間隔をD2(D1<D2)とした場合に、送信間隔D3=D1+(D2−D1)*r/slaveMAXとしてもよい。 In the example of FIG. 12, when it is shown in S1205 that the response packets are not synchronized, the transmission interval adjustment process is performed (S1208), but it is determined that all the communication devices 101 are not synchronized. The transmission interval may be adjusted based on the number of communication devices 101. For example, the synchronization monitoring device 215 determines the number of communication devices 101 that are No in S1205 among the number of slaveMAX as the number of communication devices 101 that are determined not to be time-synchronized. Then, the synchronization monitoring device 215 may determine the transmission interval D3 of the time synchronization packet based on the number of communication devices 101 determined to be out of time synchronization. For example, the number of communication devices 101 determined to be not time-synchronized is r, the original transmission interval is D1, and the transmission interval that can be set when all communication devices 101 are time-synchronized is D2 (D1 <. In the case of D2), the transmission interval D3 = D1 + (D2-D1) * r / slaveMAX may be set.

本実施形態では、以上に述べたような構成により、システムが起動し、通信装置101−a〜101−rの同期が取れた後に同期が取れなくなった場合、再度時刻同期サーバ212が送信する同期パケットの送信間隔を短くし、同期までの時間を短くすることができる。 In the present embodiment, when the system is started and the communication devices 101-a-101-r are synchronized and then the synchronization cannot be achieved, the synchronization server 212 transmits the synchronization again. It is possible to shorten the packet transmission interval and shorten the time until synchronization.

なお、上記の説明では、図12のS1208では図5に示す処理を行い、全ての通信装置101に同期しているかどうか問い合わせたが、同期していない通信装置101のみに問い合わせてもよい。図13に、図12のS1208の別の処理のフローチャートを示す。図13は、図5と比較して、全ての通信装置101に問い合わせるためのいくつかのステップがないことと、S507がS1301に置き換えられ、同期監視装置215は、同期が外れたことを確認した通信装置101(S1205の処理でNoであった場合のn番目の通信装置101)に対してのみ問い合わせをしている。 In the above description, in S1208 of FIG. 12, the process shown in FIG. 5 is performed to inquire whether or not all communication devices 101 are synchronized, but only the communication device 101 that is not synchronized may be inquired. FIG. 13 shows a flowchart of another process of S1208 of FIG. FIG. 13 confirms that there are no steps to query all communication devices 101 as compared to FIG. 5, and that S507 has been replaced by S1301 and the synchronization monitoring device 215 is out of sync. The inquiry is made only to the communication device 101 (the nth communication device 101 when No in the process of S1205).

[実施形態4]
実施形態3では、図12を参照して説明したように、同期監視装置215は、全ての通信装置101が同期しているかを判定するために、全ての通信装置101に対して問い合わせを行った。本実施形態では、通信装置101が、送信するPTPパケットの送信回数を減らす(PTPパケットを間引きして送信する)ことで、同期監視装置215は、全ての通信装置101が同期しているかの判定を行う。同期監視装置215は、受信されるパケットが間引きされて送信されていることを検出した場合に、通信装置101が同期していることを判定することができる。
[Embodiment 4]
In the third embodiment, as described with reference to FIG. 12, the synchronization monitoring device 215 makes an inquiry to all the communication devices 101 in order to determine whether all the communication devices 101 are synchronized. .. In the present embodiment, the communication device 101 reduces the number of transmissions of the PTP packet to be transmitted (the PTP packet is thinned out and transmitted), so that the synchronization monitoring device 215 determines whether all the communication devices 101 are synchronized. I do. The synchronization monitoring device 215 can determine that the communication device 101 is synchronized when it detects that the received packets are thinned out and transmitted.

図14は、本実施形態において通信装置101により実行される、PTPパケットの送信回数の削減処理のフローチャートである。図14に示す処理は、通信装置101において時刻同期処理に追加される処理であり、CPU102、ブリッジ108により行われる処理である。 FIG. 14 is a flowchart of a process for reducing the number of transmissions of PTP packets, which is executed by the communication device 101 in the present embodiment. The process shown in FIG. 14 is a process added to the time synchronization process in the communication device 101, and is a process performed by the CPU 102 and the bridge 108.

通信装置101は、変数cntrに0を代入する(S1401)。ここで、cntrはSyncパケットの受信回数である。次に、通信装置101はPTPパケットの受信を待つ(S1402)。パケットが受信されると(S1403)、通信装置101は、受信したPTPパケットがSyncパケットかどうか調べる(S1404)。受信したパケットがSyncパケットであれば(S1404でYes)、通信装置101は、Syncパケット受信時の処理を行い(S1405)、cntrの値を1つ増加させ(S1406)、処理はS1402に戻り、PTPパケットの受信待ちとなる。受信したパケットがSyncパケットでなければ(S1404でNo)、通信装置101はさらに、受信したパケットがFollow_upパケットかどうか調べる(S1407)。受信したパケットがFollow_upパケットであれば(S1407でYes)、通信装置101は、Follow_upパケット受信時の処理を行い(S1408)、通信装置101が同期しているかどうかを調べる(S1410)。同期しているか否かの判定は、図4(a)、(b)で説明したように行うことができる。同期していなければ(S1410でNo)、通信装置101はDelay_Requestパケットを送信し(S1411)、処理はS1402に戻り、PTPパケットの受信待ちとなる。S1410で同期していれば(S1410でYes)、通信装置101は、cntrが奇数かどうか調べる(S1413)。cntが奇数であれば(S1413でYes)、通信装置101は、Delay_Requestパケットを送信し(S1411)、処理はS1402に戻り、PTPパケットの受信待ちとなる。cntrが奇数でなければ(cntrが偶数であれば)(S1413でNo)、処理はS1402に戻り、通信装置101はPTPパケットの受信待ちとなる。 The communication device 101 assigns 0 to the variable ctr (S1401). Here, ctr is the number of receptions of Sync packets. Next, the communication device 101 waits for the reception of the PTP packet (S1402). When the packet is received (S1403), the communication device 101 checks whether the received PTP packet is a Sync packet (S1404). If the received packet is a Sync packet (Yes in S1404), the communication device 101 performs processing at the time of receiving the Sync packet (S1405), increases the value of ctr by one (S1406), and the processing returns to S1402. It waits for the reception of PTP packets. If the received packet is not a Sync packet (No in S1404), the communication device 101 further checks whether the received packet is a Follow_up packet (S1407). If the received packet is a Follow_up packet (Yes in S1407), the communication device 101 performs a process at the time of receiving the Follow_up packet (S1408), and checks whether the communication device 101 is synchronized (S1410). The determination of whether or not they are synchronized can be performed as described with reference to FIGS. 4A and 4B. If they are not synchronized (No in S1410), the communication device 101 transmits a Delay_Request packet (S1411), the process returns to S1402, and the PTP packet is waiting to be received. If it is synchronized in S1410 (Yes in S1410), the communication device 101 checks whether the ctr is odd (S1413). If the ct is odd (Yes in S1413), the communication device 101 transmits a Delay_Request packet (S1411), the process returns to S1402, and the PTP packet is waiting to be received. If the ctr is not an odd number (if the ctr is an even number) (No in S1413), the process returns to S1402, and the communication device 101 waits for the reception of the PTP packet.

S1407で、受信したパケットがFollow_upパケットでなければ(S1407でNo)、通信装置101はさらに、受信したパケットがDelay_Responseパケットかどうか調べる(S1409)。受信したパケットがDelay_Responseパケットでなければ(S1409でNo)、受信したパケットはDelay_Requestパケット等、スレーブである通信装置101で処理を行う必要のないPTPパケットである。よって、処理はS1402に戻り、通信装置101はPTPパケットの受信待ちとなる。受信したパケットがDelay_Responseパケットであれば(S1409でYes)、通信装置101は、Delay_Responseの処理を行い(S1412)、パケットのPTP受信待ちとなる(S1402)。 In S1407, if the received packet is not a Follow_up packet (No in S1407), the communication device 101 further checks whether the received packet is a Delay_Response packet (S1409). If the received packet is not a Delay_Response packet (No in S1409), the received packet is a PTP packet such as a Delay_Request packet that does not need to be processed by the slave communication device 101. Therefore, the process returns to S1402, and the communication device 101 waits for the reception of the PTP packet. If the received packet is a Pay_Response packet (Yes in S1409), the communication device 101 processes the Delay_Response (S1412) and waits for PTP reception of the packet (S1402).

本実施形態では、以上に述べたような構成により、通信装置101はPTPパケットの送信頻度を変えることにより、同期監視装置215に同期したことを伝えることができる。具体的には、通信装置101は、時刻同期していない場合はSyncパケットを受信するたびにDelay_Requestパケットを送信し、時刻が同期している場合はSyncパケットの受信の2回に1回、Delay_Requestパケットを送信する。つまり、時刻が同期している場合、Delay_Requestパケットの送信頻度を、時刻が同期していない場合の半分にすることができ、同期監視装置215に同期したことを伝えることができる。 In the present embodiment, with the configuration as described above, the communication device 101 can notify the synchronization monitoring device 215 that it has been synchronized by changing the transmission frequency of the PTP packet. Specifically, the communication device 101 transmits a Delay_Request packet every time it receives a Sync packet when the time is not synchronized, and once every two receptions of the Sync packet when the time is synchronized, the Delay_Request packet is sent. Send a packet. That is, when the times are synchronized, the transmission frequency of the Delay_Request packet can be halved compared to the case where the times are not synchronized, and it is possible to notify the synchronization monitoring device 215 that the time is synchronized.

なお、本実施形態では、Syncパケットの受信に応じてDelay_Requestパケットの送信を行っていたが、タイマを使用してDelay_Requestパケットの送信頻度を制御してもよい。例えば、通信装置101はタイマを使用して定期的にDelay_Requestパケットを送信し、同期しているかどうかに応じてタイマの値を変えることでDelay_Requestパケットの送信頻度を変更してもよい。また、本実施形態ではDelay_Requestパケットの送信頻度を変更することで同期が取れているかどうかの通知を行っているが、同期監視装置215において、通信装置101で同期がとれているかどうかのメッセージを受信するアプリケーションを使用してもよい。例えば、通信装置101は、時刻同期していない状態から同期している状態になった場合、もしくは、時刻同期している状態から同期していない状態になった場合に、同期監視装置215にメッセージを送信することができる。当該メッセージを受信した同期監視装置215は、通信装置101の同期状態を把握することが可能となる。 In the present embodiment, the Delay_Request packet is transmitted in response to the reception of the Sync packet, but the transmission frequency of the Delay_Request packet may be controlled by using a timer. For example, the communication device 101 may periodically transmit a Delay_Request packet using a timer, and may change the transmission frequency of the Delay_Request packet by changing the value of the timer depending on whether or not they are synchronized. Further, in the present embodiment, the notification of whether or not synchronization is achieved by changing the transmission frequency of the Delay_Request packet is performed, but the synchronization monitoring device 215 receives a message as to whether or not the communication device 101 is synchronized. You may use the application that you want. For example, the communication device 101 sends a message to the synchronization monitoring device 215 when the time is changed from the non-synchronized state to the synchronized state, or when the time is synchronized to the non-synchronized state. Can be sent. The synchronization monitoring device 215 that has received the message can grasp the synchronization state of the communication device 101.

[実施形態5]
本実施形態では、通信装置101による時刻同期後、同期監視装置215が定期的に通信装置101の同期を確認し、通信装置101の時刻同期が外れた場合に時刻同期の間隔を再度短くする処理について説明する。当該処理により、時刻同期が外れた通信装置101の同期までにかかる時間を短くすることができる。
[Embodiment 5]
In the present embodiment, after the time synchronization by the communication device 101, the synchronization monitoring device 215 periodically confirms the synchronization of the communication device 101, and when the time synchronization of the communication device 101 is lost, the time synchronization interval is shortened again. Will be described. By this process, it is possible to shorten the time required for the communication device 101, which is out of time synchronization, to be synchronized.

図15は、本実施形態における同期監視装置215により実行される、時刻同期パケットの送信間隔調整処理のフローチャートである。図15に示す処理は、実施形態1で説明した図5の処理の後に行われる。なお、図5の処理の後以外のタイミングで図15に示す処理が行われてもよい。 FIG. 15 is a flowchart of a time synchronization packet transmission interval adjustment process executed by the synchronization monitoring device 215 in the present embodiment. The process shown in FIG. 15 is performed after the process of FIG. 5 described in the first embodiment. The process shown in FIG. 15 may be performed at a timing other than after the process of FIG.

S1501では、図5のS510の処理と同様に、同期監視装置215は、送信間隔を元の送信間隔に戻す。続いて、図5のS511の処理と同様に、同期監視装置215は、当該元の送信間隔を時刻同期サーバ212に通知する(S1502)。なお、図15に示す処理を図5の処理の後に行う場合は、S1501とS1502は省略される。 In S1501, the synchronization monitoring device 215 returns the transmission interval to the original transmission interval in the same manner as in the process of S510 in FIG. Subsequently, similarly to the process of S511 of FIG. 5, the synchronization monitoring device 215 notifies the time synchronization server 212 of the original transmission interval (S1502). When the process shown in FIG. 15 is performed after the process shown in FIG. 5, S1501 and S1502 are omitted.

その後、同期監視装置215は、所定時間(例えばY秒)動作を停止する(S1503)。これは、同期監視装置215が頻繁に問い合わせを行うことによってネットワークや通信装置101に負荷を掛けることを回避するためである。所定時間経過後、同期監視装置215は、変数nに0を代入する(S1504)。nは取得した通信装置101のリストのインデックスである。続いて、同期監視装置215は、リストのn番目の通信装置101に対して同期問い合わせパケットを送信し、時刻同期しているかどうか問い合わせる(S1505)応答として時刻同期していないことを示す応答パケットが受信された場合(S1506でNo)、同期監視装置215は元の送信間隔より短い送信間隔を導出し(S1509)、当該短い送信間隔の値を時刻同期サーバ212に通知する(S1508)。その後、処理はS1503へ戻る。一方、時刻同期していることを示す応答パケットが受信された場合(S1506でYes)、処理はS1507へ進む。S1507では、同期監視装置215は、変数nをslaveMAX(接続されている通信装置101の総数)と比較する(S1507)。変数nがslaveMAXに達していなければ(S1507でYes)、同期監視装置215は、nに1を加え(S1510)、処理はS1505に戻る。これにより、同期監視装置215は、リストにおける次の通信装置101に対して、同期しているかどうか問い合わせることができる。変数nがslaveMAXに達している場合(S1507でNo)は、処理はS1501に戻り、同期監視装置215は、送信間隔を元の送信間隔に戻し、当該元の送信間隔を時刻同期サーバ212に通知する(S1502)。 After that, the synchronous monitoring device 215 stops the operation for a predetermined time (for example, Y seconds) (S1503). This is to prevent the synchronous monitoring device 215 from imposing a load on the network or the communication device 101 due to frequent inquiries. After the lapse of a predetermined time, the synchronization monitoring device 215 substitutes 0 for the variable n (S1504). n is an index of the acquired list of communication devices 101. Subsequently, the synchronization monitoring device 215 transmits a synchronization inquiry packet to the nth communication device 101 in the list, and inquires whether the time is synchronized (S1505). As a response, a response packet indicating that the time is not synchronized is sent. When received (No in S1506), the synchronization monitoring device 215 derives a transmission interval shorter than the original transmission interval (S1509), and notifies the time synchronization server 212 of the value of the short transmission interval (S1508). After that, the process returns to S1503. On the other hand, when a response packet indicating that the time is synchronized is received (Yes in S1506), the process proceeds to S1507. In S1507, the synchronization monitoring device 215 compares the variable n with slaveMAX (the total number of connected communication devices 101) (S1507). If the variable n has not reached slaveMAX (Yes in S1507), the synchronous monitoring device 215 adds 1 to n (S1510), and the process returns to S1505. As a result, the synchronization monitoring device 215 can inquire whether or not the next communication device 101 in the list is synchronized. When the variable n reaches slaveMAX (No in S1507), the process returns to S1501, the synchronization monitoring device 215 returns the transmission interval to the original transmission interval, and notifies the time synchronization server 212 of the original transmission interval. (S1502).

本実施形態では、以上に述べたような構成により、システムが起動し、通信装置101−a〜101−rの同期が取れた後に同期が取れなくなった場合、時刻同期サーバ212が送信する同期パケットの送信間隔を短くすることができる。これにより、時刻同期が外れた通信装置101の時刻が再同期するまでの時間を縮めることができる。また、このように構成することで、同期していない通信装置101が少なくとも1台でもある場合に時刻同期パケットの送信間隔を縮めることで、時刻同期が外れた通信装置101の同期を早めることが可能となる。 In the present embodiment, when the system is started and the communication devices 101-a-101-r are synchronized and then the synchronization cannot be achieved by the configuration as described above, the synchronization packet transmitted by the time synchronization server 212 is transmitted. Transmission interval can be shortened. As a result, the time until the time of the communication device 101 out of time synchronization is resynchronized can be shortened. Further, by configuring in this way, when there is at least one communication device 101 that is not synchronized, the transmission interval of the time synchronization packet can be shortened, so that the synchronization of the communication device 101 that is out of time synchronization can be accelerated. It will be possible.

[実施形態6]
時刻同期サーバ212により送信される時刻同期パケットによるネットワークの負荷を低減するため、実施形態1で説明した図5のS510等のように時刻同期パケットの送信間隔を元の送信間隔に戻すのではなく、送信間隔を元の送信間隔よりも大きくすることが考えられる。また、通信装置101では、時刻同期パケットが届かなくなったと認識した場合、エラーの表示などを行うことが考えられる。この場合、通信装置101が、時刻同期サーバ212の送信間隔が大きくなったことを時刻同期サーバ212の故障と判断し、エラーを表示することが考えられる。本実施形態では、時刻同期サーバ212が送信する時刻同期パケットの間隔を大きくすることを通信装置101に通知するための処理を説明する。当該処理により、通信装置101がエラーとして表示するのを抑制することができる。
[Embodiment 6]
In order to reduce the network load due to the time synchronization packet transmitted by the time synchronization server 212, the transmission interval of the time synchronization packet is not returned to the original transmission interval as in S510 of FIG. 5 described in the first embodiment. , It is conceivable to make the transmission interval larger than the original transmission interval. Further, when the communication device 101 recognizes that the time synchronization packet has not arrived, it is conceivable to display an error or the like. In this case, it is conceivable that the communication device 101 determines that the transmission interval of the time synchronization server 212 is increased as a failure of the time synchronization server 212 and displays an error. In the present embodiment, a process for notifying the communication device 101 that the interval of the time synchronization packets transmitted by the time synchronization server 212 will be increased will be described. By this process, it is possible to suppress the communication device 101 from displaying as an error.

図16は、本実施形態において通信装置101により実行される処理のフローチャートである。図16の処理は実施形態4で説明した図14の処理に対して、S1601〜S1604の処理を加えた処理に相当する。S1401で、通信装置101が変数cntrに0を代入した後、通信装置101は変数timeoutの値を初期値に設定する(S1601)。当該初期値は、例えば、時刻同期サーバ212による時刻同期パケットの元の送信間隔等から予め設定され得る。次に、通信装置101は、変数timeoutの値を時刻同期パケットの受信タイムアウトのパラメータとして設定し(S1602)、時刻同期パケットの受信を待つ(S1402)。時刻同期パケットの受信の待機中に、通信装置101が時刻同期パケットを受信した場合、もしくは、S1602で設定されたタイムアウト時間を経過した場合に、処理はS1603に進む。S1603では、タイムアウト時間が経過した場合(S1603でYes)、通信装置101は表示部(不図示)にエラーを表示し(S1604)、処理はS1602に戻る。S1602では、後述する図17で説明するように、送信間隔の通知のためのパケットが受信された場合は、当該送信間隔に基づいて求めた変数timeoutの値を、時刻同期パケットの受信タイムアウトのパラメータとして設定することができる。S1406、S1412、S1411、S1413の後に戻るS1602の場合も同様である。S1603においてタイムアウト時間が経過していなければ、処理はS1403に進む。S1403以降の処理は、図14を参照して説明した通りである。このように、通信装置101は、時刻同期サーバ212が送信する時刻同期パケットの送信間隔がS1601における初期値を超えると、エラーを表示する。 FIG. 16 is a flowchart of processing executed by the communication device 101 in the present embodiment. The process of FIG. 16 corresponds to a process in which the processes of S1601 to S1604 are added to the process of FIG. 14 described in the fourth embodiment. In S1401, after the communication device 101 assigns 0 to the variable ctr, the communication device 101 sets the value of the variable timeout to the initial value (S1601). The initial value can be set in advance from, for example, the original transmission interval of the time synchronization packet by the time synchronization server 212. Next, the communication device 101 sets the value of the variable timeout as a parameter for the reception timeout of the time synchronization packet (S1602), and waits for the reception of the time synchronization packet (S1402). If the communication device 101 receives the time synchronization packet while waiting for the reception of the time synchronization packet, or if the timeout time set in S1602 has elapsed, the process proceeds to S1603. In S1603, when the timeout time has elapsed (Yes in S1603), the communication device 101 displays an error on the display unit (not shown) (S1604), and the process returns to S1602. In S1602, as will be described later with reference to FIG. 17, when a packet for notifying the transmission interval is received, the value of the variable timeout obtained based on the transmission interval is used as a parameter for the reception timeout of the time synchronization packet. Can be set as. The same applies to the case of S1602 returning after S1406, S1412, S1411, and S1413. If the timeout time has not elapsed in S1603, the process proceeds to S1403. The processing after S1403 is as described with reference to FIG. As described above, the communication device 101 displays an error when the transmission interval of the time synchronization packet transmitted by the time synchronization server 212 exceeds the initial value in S1601.

図17に、同期監視装置215から同期問い合わせパケットが送信されることを受けて通信装置101により実行される処理のフローチャートを示す。図17の処理は、実施形態1で説明した図9の処理にS1701〜S1702の処理を追加した処理に相当する。S901〜S903の処理は、図9を参照して説明した通りである。S902において、受信したパケットが同期問い合わせパケットでなければ(S902でNo)、通信装置101は、受信したパケットが、時刻同期パケットの送信間隔の通知のためパケットかどうか判断する(S1701)。受信したパケットが送信間隔の通知のためのパケットであれば(S1701でYes)、通信装置101は、通知された送信間隔を元に受信のタイムアウト値を決定し、変数timeoutに代入する(S1702)。この例では送信間隔の5倍の値を変数timeoutに代入している。求めた変数timeoutの値は、時刻同期パケットの受信タイムアウトの値に設定される。受信されたパケットが送信間隔の通知のためのパケットでなければ(S1701でNo)、処理はS901に戻る。 FIG. 17 shows a flowchart of processing executed by the communication device 101 in response to the synchronization inquiry packet being transmitted from the synchronization monitoring device 215. The process of FIG. 17 corresponds to a process in which the processes of S1701 to S1702 are added to the process of FIG. 9 described in the first embodiment. The processing of S901 to S903 is as described with reference to FIG. In S902, if the received packet is not a synchronization inquiry packet (No in S902), the communication device 101 determines whether the received packet is a packet for notifying the transmission interval of the time synchronization packet (S1701). If the received packet is a packet for notifying the transmission interval (Yes in S1701), the communication device 101 determines the reception timeout value based on the notified transmission interval and assigns it to the variable timeout (S1702). .. In this example, a value five times the transmission interval is assigned to the variable timeout. The value of the obtained variable timeout is set to the value of the reception timeout of the time synchronization packet. If the received packet is not a packet for notifying the transmission interval (No in S1701), the process returns to S901.

なお、上記の説明では、同期監視装置215による送信間隔の通知は、時刻同期サーバ212に対して行われているが(図5、図10のS311、図15のS1502等)、通知の宛先をブロードキャストやマルチキャストとしてもよい。これにより、通信装置101も同期監視装置215から時刻同期パケットの送信間隔の通知を受けることができ、通知された送信間隔の値を元に、時刻同期パケットの受信タイムアウトの値を決定することができる。 In the above description, the synchronization monitoring device 215 notifies the time synchronization server 212 of the transmission interval (S311 in FIGS. 5 and 10, S1502 in FIG. 15 and the like), but the notification destination is set. It may be broadcast or multicast. As a result, the communication device 101 can also receive the notification of the transmission interval of the time synchronization packet from the synchronization monitoring device 215, and can determine the value of the reception timeout of the time synchronization packet based on the value of the notified transmission interval. can.

本実施形態では、以上に述べたような構成により、同期監視装置215により決定された、時刻同期サーバ212が送信する時刻同期パケットの送信間隔を元に、通信装置101は時刻同期パケットの受信タイムアウト値を決定することができる。これにより、時刻同期サーバ212が送信する時刻同期パケットの送信間隔が大きくなっても、通信装置101は受信タイムアウトの値を調整することができる。 In the present embodiment, the communication device 101 has a time-out for receiving the time synchronization packet based on the transmission interval of the time synchronization packet transmitted by the time synchronization server 212 determined by the synchronization monitoring device 215 according to the configuration as described above. The value can be determined. As a result, the communication device 101 can adjust the value of the reception timeout even if the transmission interval of the time synchronization packet transmitted by the time synchronization server 212 becomes large.

なお、上記実施形態は、複数の通信装置が直列に接続されている(デイジーチェーン)の例を用いて説明したが、階層的に接続された複数の通信装置の場合にも、本実施形態を適用することが可能である。例えば、ツリー状、ピラミッド状に、複数の通信装置が接続されている場合である。 Although the above embodiment has been described with reference to an example in which a plurality of communication devices are connected in series (daisy chain), the present embodiment may also be used in the case of a plurality of communication devices connected hierarchically. It is possible to apply. For example, when a plurality of communication devices are connected in a tree shape or a pyramid shape.

また、上記実施形態では、通信装置101は、受信したパケットが同期問い合わせパケットである場合に、時刻同期しているか否かを応答したが、当該問い合わせパケットの応答としてではなく、自発的に、時刻同期しているか否かを示すパケット/時刻同期していることを示すパケットを送信するように構成してもよい。このようにすることで、同期監視装置215は、同期問い合わせパケットを送信しなくても、通信装置101の時刻同期の状況を判断することが可能となる。 Further, in the above embodiment, when the received packet is a synchronization inquiry packet, the communication device 101 responds whether or not the time is synchronized, but the time is spontaneously not responded to by the inquiry packet. It may be configured to send a packet indicating whether or not it is synchronized / a packet indicating that it is synchronized in time. By doing so, the synchronization monitoring device 215 can determine the time synchronization status of the communication device 101 without transmitting the synchronization inquiry packet.

[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Embodiments]
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the above embodiments, and various modifications and modifications can be made without departing from the spirit and scope of the invention. Therefore, a claim is attached to make the scope of the invention public.

102 CPU、103 ROM、104 DRAM、105 ファイルシステム、106 第1ポート、107 第2ポート、108 ブリッジ、 212 時刻同期サーバ、215 同期監視装置、101 通信装置 102 CPU, 103 ROM, 104 DRAM, 105 file system, 106 1st port, 107 2nd port, 108 bridge, 212 time synchronization server, 215 synchronization monitoring device, 101 communication device

Claims (21)

制御装置であって、
複数の通信装置を前記制御装置と時刻同期させるために送信される時刻同期パケットを第1の送信間隔で送信する第1の送信手段と、
前記複数の通信装置が前記制御装置と時刻同期したかを判定する判定手段と、
前記判定手段により前記複数の通信装置が前記制御装置と時刻同期したと判定されたことに基づいて、前記時刻同期パケットの送信間隔を前記第1の送信間隔から、前記第1の送信間隔よりも長い第2の送信間隔に変更する変更手段と、
を有することを特徴とする制御装置。
It ’s a control device,
A first transmission means for transmitting a time synchronization packet transmitted for time synchronization of a plurality of communication devices with the control device at a first transmission interval, and
A determination means for determining whether the plurality of communication devices are time-synchronized with the control device, and
Based on the determination by the determination means that the plurality of communication devices are time-synchronized with the control device, the transmission interval of the time-synchronized packet is changed from the first transmission interval to the first transmission interval. A change method to change to a longer second transmission interval, and
A control device characterized by having.
前記送信間隔が前記第2の送信間隔に変更された後に、前記判定手段により前記複数の通信装置が前記制御装置と時刻同期していないと判定された場合、前記変更手段は、前記送信間隔を前記第2の送信間隔から前記第1の送信間隔に変更することを特徴とする請求項1に記載の制御装置。 When the determination means determines that the plurality of communication devices are not time-synchronized with the control device after the transmission interval is changed to the second transmission interval, the changing means sets the transmission interval. The control device according to claim 1, wherein the second transmission interval is changed to the first transmission interval. 前記送信間隔が前記第2の送信間隔に変更された後に、前記判定手段により前記複数の通信装置が前記制御装置と時刻同期していないと判定された場合、前記変更手段は、前記送信間隔を前記第2の送信間隔から、前記第2の送信間隔よりも短い第3の送信間隔に変更することを特徴とする請求項1に記載の制御装置。 When the determination means determines that the plurality of communication devices are not time-synchronized with the control device after the transmission interval is changed to the second transmission interval, the changing means sets the transmission interval. The control device according to claim 1, wherein the second transmission interval is changed to a third transmission interval shorter than the second transmission interval. 前記第3の送信間隔は、前記複数の通信装置のうち、前記制御装置と時刻同期していないと判定された通信装置の台数に応じた間隔であることを特徴とする請求項3に記載の制御装置。 3. The third transmission interval according to claim 3, wherein the third transmission interval is an interval corresponding to the number of communication devices determined not to be time-synchronized with the control device among the plurality of communication devices. Control device. 前記判定手段は、前記複数の通信装置のそれぞれに対して、前記制御装置と時刻同期したかを問い合わせるための問い合わせパケットを送信し、当該問い合わせパケットに対する応答パケットであって、時刻同期していることを示す応答パケットを前記複数の通信装置から受信した場合に、前記複数の通信装置が前記制御装置と時刻同期していると判定し、それ以外の場合は前記複数の通信装置が前記制御装置と時刻同期していないと判定することを特徴とする請求項1から4のいずれか1項に記載の制御装置。 The determination means transmits an inquiry packet for inquiring whether or not the time is synchronized with the control device to each of the plurality of communication devices, and is a response packet to the inquiry packet and is time-synchronized. When the response packet indicating the above is received from the plurality of communication devices, it is determined that the plurality of communication devices are time-synchronized with the control device, and in other cases, the plurality of communication devices are in sync with the control device. The control device according to any one of claims 1 to 4, wherein it is determined that the time is not synchronized. 前記判定手段は、前記複数の通信装置のうち、前記制御装置と時刻同期されたと判定されていない1以上の通信装置に対して、前記制御装置と時刻同期したかを問い合わせるための問い合わせパケットを送信し、当該問い合わせパケットに応答する応答パケットであって、時刻同期していることを示す応答パケットを前記1以上の通信装置から受信した場合に、前記複数の通信装置が前記制御装置と時刻同期していると判定し、それ以外の場合は前記複数の通信装置が前記制御装置と時刻同期していないと判定することを特徴とする請求項1から4のいずれか1項に記載の制御装置。 The determination means transmits an inquiry packet for inquiring whether or not the time is synchronized with the control device to one or more communication devices that are not determined to be time-synchronized with the control device among the plurality of communication devices. Then, when a response packet that is a response packet in response to the inquiry packet and indicates that the time is synchronized is received from the one or more communication devices, the plurality of communication devices are time-synchronized with the control device. The control device according to any one of claims 1 to 4, wherein it is determined that the control device is used, and in other cases, it is determined that the plurality of communication devices are not time-synchronized with the control device. 前記複数の通信装置は、前記制御装置に対して階層的に接続されていることを特徴とする請求項1から4のいずれか1項に記載の制御装置。 The control device according to any one of claims 1 to 4, wherein the plurality of communication devices are hierarchically connected to the control device. 前記複数の通信装置のうち、前記制御装置に対する階層の最後に接続されている通信装置を特定する特定手段をさらに有し、
前記判定手段は、前記特定された通信装置に対して、前記制御装置と時刻同期したかを問い合わせるための問い合わせパケットを送信し、当該問い合わせパケットに対する応答パケットであって、時刻同期していることを示す応答パケットを前記特定された通信装置から受信した場合に、前記複数の通信装置が前記制御装置と時刻同期していると判定し、それ以外の場合は前記複数の通信装置が前記制御装置と時刻同期していないと判定することを特徴とする請求項7に記載の制御装置。
Further having a specific means for identifying the communication device connected to the end of the hierarchy with respect to the control device among the plurality of communication devices.
The determination means transmits an inquiry packet for inquiring whether or not the time is synchronized with the control device to the specified communication device, and indicates that the response packet to the inquiry packet is time-synchronized. When the indicated response packet is received from the specified communication device, it is determined that the plurality of communication devices are time-synchronized with the control device, and in other cases, the plurality of communication devices are in sync with the control device. The control device according to claim 7, wherein it is determined that the time is not synchronized.
前記制御装置は前記複数の通信装置とPTP(Precision TimeProtocol)を用いた通信を行うことを特徴とする請求項1から8のいずれか1項に記載の制御装置。 The control device according to any one of claims 1 to 8, wherein the control device communicates with the plurality of communication devices using PTP (Precision Time Protocol). 複数の通信装置と、前記複数の通信装置に接続された制御装置とを含む通信システムであって、
前記制御装置は、
前記複数の通信装置を前記制御装置と時刻同期させるために送信される時刻同期パケットを第1の送信間隔で送信する第1の送信手段と、
前記複数の通信装置が前記制御装置と時刻同期したかを判定する判定手段と、
前記判定手段により前記複数の通信装置が前記制御装置と時刻同期したと判定されたことに基づいて、前記時刻同期パケットの送信間隔を前記第1の送信間隔から、前記第1の送信間隔よりも長い第2の送信間隔に変更する変更手段と、
を有することを特徴とする通信システム。
A communication system including a plurality of communication devices and a control device connected to the plurality of communication devices.
The control device is
A first transmission means for transmitting a time synchronization packet transmitted for time synchronization of the plurality of communication devices with the control device at a first transmission interval,
A determination means for determining whether the plurality of communication devices are time-synchronized with the control device, and
Based on the determination by the determination means that the plurality of communication devices are time-synchronized with the control device, the transmission interval of the time-synchronized packet is changed from the first transmission interval to the first transmission interval. A change method to change to a longer second transmission interval, and
A communication system characterized by having.
前記送信間隔が前記第2の送信間隔に変更された後に、前記判定手段により前記複数の通信装置が前記制御装置と時刻同期していないと判定された場合、前記変更手段は、前記送信間隔を前記第2の送信間隔から前記第1の送信間隔に変更することを特徴とする請求項10に記載の通信システム。 When the determination means determines that the plurality of communication devices are not time-synchronized with the control device after the transmission interval is changed to the second transmission interval, the changing means sets the transmission interval. The communication system according to claim 10, wherein the second transmission interval is changed to the first transmission interval. 前記送信間隔が前記第2の送信間隔に変更された後に、前記判定手段により前記複数の通信装置が前記制御装置と時刻同期していないと判定された場合、前記変更手段は、前記送信間隔を前記第2の送信間隔から、前記第2の送信間隔よりも短い第3の送信間隔に変更することを特徴とする請求項10に記載の通信システム。 When the determination means determines that the plurality of communication devices are not time-synchronized with the control device after the transmission interval is changed to the second transmission interval, the changing means sets the transmission interval. The communication system according to claim 10, wherein the second transmission interval is changed to a third transmission interval shorter than the second transmission interval. 前記第3の送信間隔は、前記複数の通信装置のうち、前記制御装置と時刻同期していないと判定された通信装置の台数に応じた間隔であることを特徴とする請求項12に記載の通信システム。 12. The third transmission interval according to claim 12, wherein the third transmission interval is an interval corresponding to the number of communication devices determined not to be time-synchronized with the control device among the plurality of communication devices. Communications system. 前記判定手段は、前記複数の通信装置のそれぞれに対して、前記制御装置と時刻同期したかを問い合わせるための問い合わせパケットを送信し、当該問い合わせパケットに対する応答パケットであって、時刻同期していることを示す応答パケットを前記複数の通信装置から受信した場合に、前記複数の通信装置が前記制御装置と時刻同期していると判定し、それ以外の場合は前記複数の通信装置が前記制御装置と時刻同期していないと判定することを特徴とする請求項10から13のいずれか1項に記載の通信システム。 The determination means transmits an inquiry packet for inquiring whether or not the time is synchronized with the control device to each of the plurality of communication devices, and is a response packet to the inquiry packet and is time-synchronized. When the response packet indicating the above is received from the plurality of communication devices, it is determined that the plurality of communication devices are time-synchronized with the control device, and in other cases, the plurality of communication devices are in sync with the control device. The communication system according to any one of claims 10 to 13, wherein it is determined that the time is not synchronized. 前記判定手段は、前記複数の通信装置のうち、前記制御装置と時刻同期されたと判定されていない1以上の通信装置に対して、前記制御装置と時刻同期したかを問い合わせるための問い合わせパケットを送信し、当該問い合わせパケットに応答する応答パケットであって、時刻同期していることを示す応答パケットを前記1以上の通信装置から受信した場合に、前記複数の通信装置が前記制御装置と時刻同期していると判定し、それ以外の場合は前記複数の通信装置が前記制御装置と時刻同期していないと判定することを特徴とする請求項10から13のいずれか1項に記載の通信システム。 The determination means transmits an inquiry packet for inquiring whether or not the time is synchronized with the control device to one or more communication devices that are not determined to be time-synchronized with the control device among the plurality of communication devices. Then, when a response packet that is a response packet in response to the inquiry packet and indicates that the time is synchronized is received from the one or more communication devices, the plurality of communication devices are time-synchronized with the control device. The communication system according to any one of claims 10 to 13, wherein the communication system is determined to be the same, and in other cases, it is determined that the plurality of communication devices are not time-synchronized with the control device. 前記複数の通信装置は、前記制御装置に対して階層的に接続されていることを特徴とする請求項10から13のいずれか1項に記載の通信システム。 The communication system according to any one of claims 10 to 13, wherein the plurality of communication devices are hierarchically connected to the control device. 前記制御装置は、前記複数の通信装置のうち、前記制御装置に対する階層の最後に接続されている通信装置を特定する特定手段をさらに有し、
前記判定手段は、前記特定された通信装置に対して、前記制御装置と時刻同期したかを問い合わせるための問い合わせパケットを送信し、当該問い合わせパケットに対する応答パケットであって、時刻同期していることを示す応答パケットを前記特定された通信装置から受信した場合に、前記複数の通信装置が前記制御装置と時刻同期していると判定し、それ以外の場合は前記複数の通信装置が前記制御装置と時刻同期していないと判定することを特徴とする請求項16に記載の通信システム。
The control device further includes a specific means for identifying the communication device connected at the end of the hierarchy to the control device among the plurality of communication devices.
The determination means transmits an inquiry packet for inquiring whether the time synchronization with the control device is performed to the specified communication device, and indicates that the response packet to the inquiry packet is time-synchronized. When the indicated response packet is received from the specified communication device, it is determined that the plurality of communication devices are time-synchronized with the control device, and in other cases, the plurality of communication devices are in sync with the control device. The communication system according to claim 16, wherein it is determined that the time is not synchronized.
前記制御装置は前記複数の通信装置とPTP(Precision TimeProtocol)を用いた通信を行うことを特徴とする請求項10から17のいずれか1項に記載の通信システム。 The communication system according to any one of claims 10 to 17, wherein the control device communicates with the plurality of communication devices using PTP (Precision Time Protocol). 前記制御装置は、前記複数の通信装置の同期状態を監視するように構成された同期監視装置と、時刻同期パケットを送信するように構成された時刻同期サーバを含むことを特徴とする請求項10から18のいずれか1項に記載の通信システム。 10. The control device includes a synchronization monitoring device configured to monitor the synchronization state of the plurality of communication devices, and a time synchronization server configured to transmit a time synchronization packet. The communication system according to any one of 18 to 18. 複数の通信装置を制御装置と時刻同期させるために送信される時刻同期パケットの送信方法であって、
前記時刻同期パケットを第1の送信間隔で送信する第1の送信工程と、
前記複数の通信装置が前記制御装置と時刻同期したかを判定する判定工程と、
前記判定工程において前記複数の通信装置が前記制御装置と時刻同期したと判定されたことに基づいて、前記時刻同期パケットの送信間隔を前記第1の送信間隔から、前記第1の送信間隔よりも長い第2の送信間隔に変更する変更工程と、
を有することを特徴とする送信方法。
A method of transmitting a time synchronization packet that is transmitted to synchronize the time of multiple communication devices with a control device.
The first transmission step of transmitting the time synchronization packet at the first transmission interval, and
A determination step of determining whether the plurality of communication devices are time-synchronized with the control device, and
Based on the determination that the plurality of communication devices are time-synchronized with the control device in the determination step, the transmission interval of the time-synchronized packet is changed from the first transmission interval to the first transmission interval. The change process to change to a longer second transmission interval,
A transmission method characterized by having.
コンピュータを、請求項1から8のいずれか1項に記載の制御装置として機能させるためのプログラム。 A program for causing a computer to function as the control device according to any one of claims 1 to 8.
JP2020004668A 2020-01-15 2020-01-15 CONTROL DEVICE, COMMUNICATION SYSTEM, TRANSMISSION METHOD, AND PROGRAM Active JP7518622B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020004668A JP7518622B2 (en) 2020-01-15 2020-01-15 CONTROL DEVICE, COMMUNICATION SYSTEM, TRANSMISSION METHOD, AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020004668A JP7518622B2 (en) 2020-01-15 2020-01-15 CONTROL DEVICE, COMMUNICATION SYSTEM, TRANSMISSION METHOD, AND PROGRAM

Publications (2)

Publication Number Publication Date
JP2021111941A true JP2021111941A (en) 2021-08-02
JP7518622B2 JP7518622B2 (en) 2024-07-18

Family

ID=77060335

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020004668A Active JP7518622B2 (en) 2020-01-15 2020-01-15 CONTROL DEVICE, COMMUNICATION SYSTEM, TRANSMISSION METHOD, AND PROGRAM

Country Status (1)

Country Link
JP (1) JP7518622B2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08331039A (en) * 1995-06-02 1996-12-13 Matsushita Electric Ind Co Ltd Wireless communication control method, base station device, slave station device, and wireless communication system
JP2012204912A (en) * 2011-03-24 2012-10-22 Renesas Electronics Corp Clock synchronization device and clock synchronization method
JP2014032055A (en) * 2012-08-02 2014-02-20 Hitachi Ltd Communication system
JP2016116143A (en) * 2014-12-17 2016-06-23 三菱電機株式会社 Time synchronization monitoring method, communication system and master device
JP2017050730A (en) * 2015-09-02 2017-03-09 富士通株式会社 Wireless device and base station system
JP2018074534A (en) * 2016-11-04 2018-05-10 大井電気株式会社 Base station and radio device
JP2019146060A (en) * 2018-02-22 2019-08-29 オムロン株式会社 Communication system, communication device, and communication method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08331039A (en) * 1995-06-02 1996-12-13 Matsushita Electric Ind Co Ltd Wireless communication control method, base station device, slave station device, and wireless communication system
JP2012204912A (en) * 2011-03-24 2012-10-22 Renesas Electronics Corp Clock synchronization device and clock synchronization method
JP2014032055A (en) * 2012-08-02 2014-02-20 Hitachi Ltd Communication system
JP2016116143A (en) * 2014-12-17 2016-06-23 三菱電機株式会社 Time synchronization monitoring method, communication system and master device
JP2017050730A (en) * 2015-09-02 2017-03-09 富士通株式会社 Wireless device and base station system
JP2018074534A (en) * 2016-11-04 2018-05-10 大井電気株式会社 Base station and radio device
JP2019146060A (en) * 2018-02-22 2019-08-29 オムロン株式会社 Communication system, communication device, and communication method

Also Published As

Publication number Publication date
JP7518622B2 (en) 2024-07-18

Similar Documents

Publication Publication Date Title
JP5554363B2 (en) Media clock negotiation
JP7000649B2 (en) Beacon-based wireless synchronization
JP6488195B2 (en) Communication device for time synchronization
WO2013143112A1 (en) Method and system for robust precision time protocol synchronization
CN108322358B (en) Method and device for sending, processing and consuming multi-live distributed messages in different places
JP4944991B2 (en) Monitoring system
KR102475744B1 (en) Control apparatis and control system
JP2013157744A (en) Mobile terminal, control method, and program
AU2017359390A1 (en) Wireless device, wireless device processing method, and program
CN110933450A (en) Multi-channel live broadcast synchronization method, system, edge device, terminal and storage medium
CN108401454B (en) Transaction scheduling method, processor, distributed system and drone
JP7518622B2 (en) CONTROL DEVICE, COMMUNICATION SYSTEM, TRANSMISSION METHOD, AND PROGRAM
JP5891142B2 (en) Communications system
JP2021106328A (en) Synchronization control device and method
CN120729955A (en) Distributed Scheduling Device Based on Time Synchronization System Model
JP2018088644A (en) Time synchronization method and time synchronization system between a plurality of wirelessly connected terminals
WO2024260194A1 (en) Information processing system, method and apparatus, and product
EP3407632B1 (en) Communication device, method controlling same, and program
KR101485328B1 (en) Multi-synchro control system for player
JP6503271B2 (en) Time synchronization system
JP2021164121A (en) Communication device, communication method, and program
JP6612006B1 (en) Time synchronization apparatus, communication system, time synchronization method, and time synchronization program
JP7741449B2 (en) Identification device and identification method
JP2021093695A (en) Synchronous controller, synchronous controller control method, and program
CN110071949B (en) System, method and device for managing computing application across geographic areas

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20210103

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210113

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230106

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240329

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240522

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240607

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240705

R150 Certificate of patent or registration of utility model

Ref document number: 7518622

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150