JP6045950B2 - Communication control device and communication system - Google Patents

Communication control device and communication system Download PDF

Info

Publication number
JP6045950B2
JP6045950B2 JP2013055383A JP2013055383A JP6045950B2 JP 6045950 B2 JP6045950 B2 JP 6045950B2 JP 2013055383 A JP2013055383 A JP 2013055383A JP 2013055383 A JP2013055383 A JP 2013055383A JP 6045950 B2 JP6045950 B2 JP 6045950B2
Authority
JP
Japan
Prior art keywords
communication
time
communication control
control device
packet
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.)
Active
Application number
JP2013055383A
Other languages
Japanese (ja)
Other versions
JP2014183386A (en
Inventor
丸山 龍也
龍也 丸山
山田 勉
山田  勉
城戸 三安
三安 城戸
吉田 昌司
昌司 吉田
輝昭 酒田
輝昭 酒田
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2013055383A priority Critical patent/JP6045950B2/en
Publication of JP2014183386A publication Critical patent/JP2014183386A/en
Application granted granted Critical
Publication of JP6045950B2 publication Critical patent/JP6045950B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、通信制御装置及び通信システムに関し、通信装置間の時刻を同期させる通信制御装置及び通信システムに適用して好適なるものである。   The present invention relates to a communication control device and a communication system, and is suitable for application to a communication control device and a communication system that synchronize time between communication devices.

分散されて構成される制御システムにおいては、実現するアプリケーションに応じて、接続端末間の時刻を同期することが求められる場合がある。ネットワークで接続された分散制御システムの場合は、ネットワークを介した時刻同期パケットの送受信によって、時刻を同期することができる。   In a control system configured in a distributed manner, it may be required to synchronize the time between connected terminals in accordance with an application to be realized. In the case of a distributed control system connected via a network, the time can be synchronized by transmitting and receiving a time synchronization packet via the network.

例えば、産業用製造装置の場合、ロボットアーム、チップマウンタ、工作機械テーブル等の制御対象を複数のサーボモータで動作をさせる。これらの制御対象に所望の動作をさせるためには、制御対象の複数のサーボモータを同期して制御する必要がある。その他、時刻同期の応用としては、計測、測定の分野や、マルチメディア、無線通信等の基地局、電力系統の分野などが挙げられる。   For example, in the case of an industrial manufacturing apparatus, a controlled object such as a robot arm, a chip mounter, or a machine tool table is operated by a plurality of servo motors. In order to make these controlled objects perform desired operations, it is necessary to control a plurality of controlled servo motors in synchronization. Other applications of time synchronization include the fields of measurement and measurement, base stations for multimedia and wireless communication, and the field of power systems.

ネットワークを用いた時刻同期方式としては、NTP(Network Time Protocol)、SNTP(Simple Network Time Protocol)、IEC61158、IEC61784−2のCommunication Profile Family 12(以下、EtherCAT(登録商標)とする)、IEEE1588等の同期プロトコルが挙げられる。   As a time synchronization method using a network, NTP (Network Time Protocol), SNTP (Simple Network Time Protocol), IEC 61158, IEC 61784-2 Communication Profile Family 12 (hereinafter referred to as EtherCAT (Registered Trademark) E) 15, etc. A synchronization protocol is mentioned.

上記の同期プロトコルを利用して、ネットワーク上で時刻情報パケットを送受信し、通信装置間の通信遅延を計測することで、通信装置間の時刻を同期させることができる。時刻を同期させる際には、ネットワーク上で、基準となる時刻情報を提供する通信装置(以下、時刻マスタとする)を決定し、残りの通信装置(以下、時刻スレーブとする)を時刻マスタに同期させる。なお、時刻マスタ、時刻スレーブは固定的な機能ではなく、時刻同期の際の役割であるため、時刻同期プロトコルによって、各通信装置が動的に時刻マスタ、時刻スレーブのいずれにもなりうる。   By using the above synchronization protocol, time information packets are transmitted and received on the network, and the communication delay between the communication devices is measured, thereby synchronizing the time between the communication devices. When synchronizing the time, a communication device that provides reference time information (hereinafter referred to as a time master) is determined on the network, and the remaining communication devices (hereinafter referred to as time slaves) are designated as time masters. Synchronize. Note that the time master and the time slave are not fixed functions but play a role in time synchronization, so that each communication device can dynamically become either a time master or a time slave by a time synchronization protocol.

高可用性が求められる高信頼な制御システムにおいては、時刻マスタの障害によるシステム停止を防止することが求められる。一般的な対策としては、時刻マスタの二重化等の多重化が挙げられる。例えば、IEEE1588では、時刻マスタの障害時に他の通信装置が代替することができる。しかし、時刻マスタの障害を検出するまでに所定のタイムアウト期間を待機しなければならず、その間、通信装置間の同期処理が実行されない。さらに、時刻マスタが冗長化されていても、時刻スレーブが、時刻同期のための制御パラメータを初期化することによる過渡的な誤差が生じる可能性がある。   In a highly reliable control system that requires high availability, it is required to prevent the system from being stopped due to a time master failure. As a general measure, there is multiplexing such as duplication of time masters. For example, in IEEE 1588, another communication device can substitute for a time master failure. However, a predetermined time-out period must be waited until a time master failure is detected, and synchronization processing between communication devices is not executed during that time. Furthermore, even if the time master is made redundant, a transient error may occur due to the time slave initializing control parameters for time synchronization.

このように、制御システムの高信頼化のために時刻マスタを冗長化した場合、時刻マスタの切り替り時において、同期精度が悪化するという問題があった。そこで、特許文献1では、複数の時刻マスタを同時に機能させ、時刻スレーブでは、複数の時刻マスタからの時刻情報と、各時刻マスタまでの通信遅延を所定の方法で組み合わせて同期することにより、一つの時刻マスタの障害による影響を低減する技術が開示されている。   As described above, when the time master is made redundant for high reliability of the control system, there is a problem that the synchronization accuracy is deteriorated when the time master is switched. Therefore, in Patent Document 1, a plurality of time masters function simultaneously, and in a time slave, time information from a plurality of time masters and communication delays to the respective time masters are combined in a predetermined method and synchronized. A technique for reducing the influence of a failure of two time masters is disclosed.

特開2012−23654号公報JP 2012-23654 A

しかし、上記特許文献1では、複数の時刻マスタが同時に機能するために、時刻同期用のパケットによる通信量が増大し、制御システムでの有効な通信帯域を低下させるという問題があった。さらに、一般的な時刻同期プロトコルでは、このような動作は規定されておらず、これらの規格に準拠した端末装置でのシステム構成が困難であった。   However, since the plurality of time masters function simultaneously in Patent Document 1, there is a problem in that the amount of communication due to time synchronization packets increases and the effective communication bandwidth in the control system is reduced. Furthermore, in a general time synchronization protocol, such an operation is not defined, and it is difficult to configure a system with a terminal device that complies with these standards.

本発明は以上の点を考慮してなされたもので、既存の同期プロトコルを利用して時刻マスタ機能を冗長化し、時刻同期機能を高信頼化することが可能な通信制御装置及び通信システムを提案しようとするものである。   The present invention has been made in view of the above points, and proposes a communication control device and a communication system that can make a time master function redundant by using an existing synchronization protocol and make the time synchronization function highly reliable. It is something to try.

かかる課題を解決するために本発明においては、ネットワークを介して接続された1または2以上の通信装置と同期パケットを送受信して時刻同期する通信制御装置であって、第1の通信装置の第1の同期パケットを観測して得られたパラメータとして、前記第1の同期パケットのシーケンス番号を保存するパラメータ保存部と、前記第1の通信装置の異常が検知された場合に、前記パラメータとしての前記第1の同期パケットのシーケンス番号及び前記通信制御装置自身の時刻情報をもとに第2の同期パケットを生成するパケット生成部と、前記第2の同期パケットを前記第1の通信装置以外の他の通信装置に送信する通信部とを備えることを特徴とする、通信制御装置が提供される。 In order to solve such a problem, in the present invention, a communication control device that transmits and receives a synchronization packet to and synchronizes time with one or more communication devices connected via a network, As a parameter obtained by observing one synchronization packet, when a parameter storage unit that stores a sequence number of the first synchronization packet and an abnormality in the first communication device are detected , A packet generation unit that generates a second synchronization packet based on a sequence number of the first synchronization packet and time information of the communication control device itself; and a second synchronization packet other than the first communication device. There is provided a communication control device comprising a communication unit that transmits to another communication device.

かかる構成によれば、通信制御装置は、時刻マスタとして振る舞う第1の通信装置の第1の同期パケットを観測して得られたパラメータである第1の同期パケットのシーケンス番号を保存して、該通信装置の異常が検知された場合に、保存した第1の同期パケットのシーケンス番号及び通信制御装置自身の時刻情報をもとに第2の同期パケットを生成して、他の通信装置に送信する。これにより、時刻情報を提供するマスタ機能を冗長化し、さらにマスタ切り替り時の過渡的な同期精度の低下を防止することができる。 According to such a configuration, the communication control device saves the first first sequence number of the synchronization packet is a parameter obtained by observing the synchronization packets of a first communication device acting as a time master, the When an abnormality of the communication device is detected, a second synchronization packet is generated based on the stored sequence number of the first synchronization packet and the time information of the communication control device itself, and is transmitted to another communication device. . As a result, the master function for providing time information can be made redundant, and a transient decrease in synchronization accuracy during master switching can be prevented.

本発明によれば、既存の同期プロトコルを利用して時刻マスタ機能を冗長化し、時刻同期機能を高信頼化することができる。   According to the present invention, the time master function can be made redundant by using an existing synchronization protocol, and the time synchronization function can be made highly reliable.

本発明の第1の実施形態にかかる通信システムの構成を示すブロック図である。It is a block diagram which shows the structure of the communication system concerning the 1st Embodiment of this invention. 同実施形態にかかる通信制御装置の構成を示すブロック図である。It is a block diagram which shows the structure of the communication control apparatus concerning the embodiment. 同実施形態にかかる通信制御部の構成を示すブロック図である。It is a block diagram which shows the structure of the communication control part concerning the embodiment. 同実施形態にかかる通信装置間の通信遅延を説明する概念図である。It is a conceptual diagram explaining the communication delay between the communication apparatuses concerning the embodiment. 同実施形態にかかるEtherCATのパケット構成を示す概念図である。It is a conceptual diagram which shows the packet structure of EtherCAT concerning the embodiment. 同実施形態にかかる通信制御装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the communication control apparatus concerning the embodiment. 同実施形態にかかる通信制御装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the communication control apparatus concerning the embodiment. 同実施形態にかかる通信経路の変更を示す概念図である。It is a conceptual diagram which shows the change of the communication path concerning the embodiment. 同実施形態にかかる通信経路の変更を示す概念図である。It is a conceptual diagram which shows the change of the communication path concerning the embodiment. 本発明の第2の実施形態にかかる通信システムの構成を示すブロック図である。It is a block diagram which shows the structure of the communication system concerning the 2nd Embodiment of this invention. 同実施形態にかかる通信制御装置の構成を示すブロック図である。It is a block diagram which shows the structure of the communication control apparatus concerning the embodiment. 同実施形態にかかる通信制御装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the communication control apparatus concerning the embodiment. 同実施形態にかかる時刻同期プロトコルの実行手順を示すブロック図である。It is a block diagram which shows the execution procedure of the time synchronization protocol concerning the embodiment. 同実施形態にかかるマスタとスレーブとの間のメッセージ送受信を示すブロック図である。It is a block diagram which shows message transmission / reception between the master and slave concerning the embodiment. 同実施形態にかかる通信制御装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the communication control apparatus concerning the embodiment. 同実施形態にかかるIEEE1588のヘッダフォーマットを示す概念図である。It is a conceptual diagram which shows the header format of IEEE1588 concerning the embodiment. 同実施形態にかかる通信制御装置のパケット送信を説明する概念図である。It is a conceptual diagram explaining packet transmission of the communication control apparatus concerning the embodiment. 本発明の第3の実施形態にかかる通信システムの構成を示すブロック図である。It is a block diagram which shows the structure of the communication system concerning the 3rd Embodiment of this invention. 同実施形態にかかるBCの構成を示すブロック図である。It is a block diagram which shows the structure of BC concerning the embodiment. 同実施形態にかかるBCの機能構成を示すブロック図である。It is a block diagram which shows the function structure of BC concerning the embodiment.

以下図面について、本発明の一実施の形態を詳述する。   Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.

(1)第1の実施の形態
(1−1)ハードウェア構成
(1−1−1)通信システムの構成
まず、図1を参照して、通信システムの構成について説明する。図1に示すように、通信システムは、制御用計算機120と、複数の通信装置121a、121b、121c(以降、通信装置121a〜121cを通信装置121と総称して説明する場合もある。)と、通信制御装置123とから構成される。通信制御装置、制御用計算機120及び通信装置121は、ネットワーク122を介して通信可能に接続されている。
(1) First Embodiment (1-1) Hardware Configuration (1-1-1) Configuration of Communication System First, the configuration of a communication system will be described with reference to FIG. As shown in FIG. 1, the communication system includes a control computer 120 and a plurality of communication devices 121a, 121b, and 121c (hereinafter, communication devices 121a to 121c may be collectively referred to as communication device 121). And the communication control device 123. The communication control device, the control computer 120 and the communication device 121 are communicably connected via a network 122.

なお、本実施の形態では、通信制御装置123、制御用計算機120及び通信装置121は、EtherCATを利用して通信しているとして説明する。なお、本発明の効果はEtherCATに限定されるものではなく、同様の通信方式に有効である。本実施の形態は、EtherCATを例に、発明の効果を述べる。   In this embodiment, the communication control device 123, the control computer 120, and the communication device 121 are described as communicating using EtherCAT. The effects of the present invention are not limited to EtherCAT, but are effective for similar communication methods. In the present embodiment, the effects of the invention will be described using EtherCAT as an example.

制御用計算機120は、EtherCATのマスタ装置であり、通信制御装置123及び通信装置121に対して、通信パケットを送受信することにより、制御指令値の伝送、計測値の取得や各種設定を実行する。   The control computer 120 is an EtherCAT master device, and transmits and receives control command values, obtains measurement values, and performs various settings by transmitting and receiving communication packets to and from the communication control device 123 and the communication device 121.

通信装置121は、EtherCATのスレーブ装置であり、制御用計算機120の制御指令に基づく各種処理を実行したり、実行結果に伴う計測値を更新したりする。   The communication device 121 is an EtherCAT slave device, and executes various processes based on the control command of the control computer 120 and updates the measurement value according to the execution result.

通信制御装置123は、通信装置121と同様にEtherCATのスレーブ装置として振る舞う。一方で、本発明の通信制御装置として機能し、時刻マスタの冗長化機能を有する。時刻マスタの冗長化機能については後で詳細に説明する。   Similar to the communication device 121, the communication control device 123 behaves as an EtherCAT slave device. On the other hand, it functions as a communication control device of the present invention and has a time master redundancy function. The time master redundancy function will be described in detail later.

(1−1−2)通信制御装置のハードウェア構成
次に、図2を参照して、通信制御装置123のハードウェア構成について説明する。図2に示すように、通信制御装置123は、CPU101、PHY104、メモリ108、不揮発性記憶媒体109、バス110及び通信制御部111などから構成される。
(1-1-2) Hardware Configuration of Communication Control Device Next, a hardware configuration of the communication control device 123 will be described with reference to FIG. As shown in FIG. 2, the communication control device 123 includes a CPU 101, a PHY 104, a memory 108, a nonvolatile storage medium 109, a bus 110, a communication control unit 111, and the like.

CPU101は、演算処理装置および制御装置として機能し、不揮発性記憶媒体109に格納されているプログラムをメモリ108に転送して各種処理を実行させる。実行処理プログラムとしては、オペレーティングシステム(以下、OSと称す)やOS上で動作するアプリケーションプログラムなどが例示される。また、CPU101上で動作するプログラムは、通信制御部111の動作設定を行ったり、状態情報を取得したりする。   The CPU 101 functions as an arithmetic processing unit and a control unit, and transfers a program stored in the nonvolatile storage medium 109 to the memory 108 to execute various processes. Examples of the execution processing program include an operating system (hereinafter referred to as OS) and an application program operating on the OS. A program operating on the CPU 101 performs operation settings of the communication control unit 111 and acquires state information.

PHY104は、ネットワーク122との通信機能を備えた送受信機ICである。PHY104の提供する通信規格としては、IEEE802.3のPHY(物理層)チップが例示される。なお、図2では、PHY104と通信制御部111が接続している構成としているため、IEEE802.3のMAC(Media Access Control)層の処理は通信制御部111に含まれる。ただし、MAC機能を提供するICを通信制御部111とPHY104間に配置する構成や、MAC機能を提供するICとPHY104を組み合わせた通信用ICと通信制御部111を接続する構成としてもよい。また、PHY104は、通信制御部111に含まれていてもよい。また、図2では、4つのPHY104を示しているが、PHY104は、通信制御部111が対応する通信ポート数と同数で構成される。   The PHY 104 is a transceiver IC having a communication function with the network 122. As a communication standard provided by the PHY 104, an IEEE802.3 PHY (physical layer) chip is exemplified. In FIG. 2, since the PHY 104 and the communication control unit 111 are connected, processing of the IEEE 802.3 MAC (Media Access Control) layer is included in the communication control unit 111. However, an IC that provides the MAC function may be arranged between the communication control unit 111 and the PHY 104, or a communication IC that combines the IC that provides the MAC function and the PHY 104 may be connected to the communication control unit 111. The PHY 104 may be included in the communication control unit 111. In FIG. 2, four PHYs 104 are shown, but the number of PHYs 104 is the same as the number of communication ports supported by the communication control unit 111.

メモリ108は、CPU101が動作するための一時的な記憶領域であり、不揮発性記憶媒体109から転送されたOSや、アプリケーションプログラムなどが格納される。   The memory 108 is a temporary storage area for the CPU 101 to operate, and stores an OS, an application program, and the like transferred from the nonvolatile storage medium 109.

不揮発性記憶媒体109は、各種情報を記憶するための記憶媒体であって、OS、アプリケーション、デバイスドライバ等や、CPU101を動作させるためのプログラムが保存されたり、プログラムの実行結果が保存されたりする。不揮発性記憶媒体109としては、ハードディスクドライブ(HDD)やソリッドステートドライブ(SSD)、フラッシュメモリなどが例示される。また、取り外しが容易な外部記憶媒体として、フロッピー(登録商標)ディスク(FD)、CD、DVD、ブルーレイ(登録商標)、USBメモリ、コンパクトフラッシュ(登録商標)等を利用してもよい。   The non-volatile storage medium 109 is a storage medium for storing various types of information, and stores an OS, an application, a device driver, etc., a program for operating the CPU 101, and a program execution result. . Examples of the nonvolatile storage medium 109 include a hard disk drive (HDD), a solid state drive (SSD), and a flash memory. Further, as an external storage medium that can be easily removed, a floppy (registered trademark) disk (FD), CD, DVD, Blu-ray (registered trademark), USB memory, compact flash (registered trademark), or the like may be used.

バス110は、CPU101、通信制御部111、メモリ108、不揮発性記憶媒体109を相互に接続する。バス110としては、PCIバス、ISAバス、PCI Expressバス、システムバスまたはメモリバスなどが例示される。   The bus 110 connects the CPU 101, the communication control unit 111, the memory 108, and the nonvolatile storage medium 109 to each other. Examples of the bus 110 include a PCI bus, an ISA bus, a PCI Express bus, a system bus, or a memory bus.

通信制御部111は、EtherCATの通信機能を提供するICである。図3を参照して、通信制御部111のハードウェア構成について説明する。   The communication control unit 111 is an IC that provides an EtherCAT communication function. The hardware configuration of the communication control unit 111 will be described with reference to FIG.

図3に示すように、LAN102a〜d(以降、LAN102a〜dをLAN102と総称して説明する場合もある)は、ネットワーク122と送受信するための送受信機ICである。LAN102は、ネットワーク122を介して受信したパケットをEPU(EtherCAT Processor UNIT)103や他のLAN102へ伝送したり、EPU103や他のLAN102から伝送されたパケットをネットワーク122へ送信したりする。   As shown in FIG. 3, LANs 102 a to 102 d (hereinafter, LANs 102 a to d may be collectively referred to as LAN 102) are transceiver ICs for transmitting and receiving to and from a network 122. The LAN 102 transmits a packet received via the network 122 to an EPU (EtherCAT Processor UNIT) 103 or another LAN 102, or transmits a packet transmitted from the EPU 103 or another LAN 102 to the network 122.

LAN102としては、IEEE 802.3規格のMAC(Media Access Control)チップ、PHY(物理層)チップ、MACとPHYの複合チップ、FPGA(Field Programmable Gate Array)、CPLD(Complex Programmable Logic Device)、ASIC(Application Specific Integrated Circuit)、ゲートアレイ等のICを例示できる。なお、LAN102は、EPU103に含まれていてもよい。図3では、4つのLAN102を示しているが、かかる例に限定されず、複数のLAN102を備えていてもよい。   The LAN 102 includes IEEE 802.3 standard MAC (Media Access Control) chip, PHY (physical layer) chip, MAC and PHY composite chip, FPGA (Field Programmable Gate Array), CPLD (Complex Programmable Logic Device), ASIC (ASIC). Application Specific Integrated Circuit) and IC such as a gate array can be exemplified. Note that the LAN 102 may be included in the EPU 103. In FIG. 3, four LANs 102 are shown, but the present invention is not limited to this example, and a plurality of LANs 102 may be provided.

EPU103は、EtherCAT仕様に準拠して、通信処理を実行するICである。具体的に、EPU103は、EtherCAT規格に従い、受信したパケットを解析し、必要なパラメータを抽出したり、パラメータにしたがった処理を実行したり、パケットへの所定情報の書込みを実行したりする。EPU103としては、CPU、FPGA、CPLD、ASICまたはゲートアレイなどのICが例示される。   The EPU 103 is an IC that executes communication processing in accordance with the EtherCAT specification. Specifically, the EPU 103 analyzes the received packet according to the EtherCAT standard, extracts necessary parameters, executes processing according to the parameters, and writes predetermined information to the packets. As the EPU 103, an IC such as a CPU, FPGA, CPLD, ASIC, or gate array is exemplified.

ループバック機能部112は、接続するLAN102における通信の確立状況、あるいは設定に応じて、パケットの転送先をLAN102が接続するネットワークか、あるいは隣接するループバック機能部112とする。   The loopback function unit 112 sets the packet transfer destination to the network to which the LAN 102 is connected or an adjacent loopback function unit 112 according to the communication establishment status or setting in the LAN 102 to be connected.

(1−2)EtherCATの時刻同期機能
次に、図4を参照して、EtherCATにおける時刻同期の仕組みについて説明する。
(1-2) EtherCAT Time Synchronization Function Next, a mechanism of time synchronization in EtherCAT will be described with reference to FIG.

EtherCATの時刻同期機能は、スレーブ間の通信遅延計測、各スレーブの時計のオフセット補償、各スレーブが有する時計の進み具合のドリフト補償という3段階で構成されている。このうち、各スレーブ間の通信遅延の計測は、図4に示すアルゴリズムを基本としている。図4では、通信装置121aはスレーブAとして、通信装置121bはスレーブBとして、通信装置121cはスレーブCとして振る舞うとして以下説明する。   The EtherCAT time synchronization function is composed of three stages: communication delay measurement between slaves, offset compensation of each slave's clock, and drift compensation of the clock progress of each slave. Among these, the measurement of the communication delay between each slave is based on the algorithm shown in FIG. In FIG. 4, it will be described below that the communication device 121a behaves as a slave A, the communication device 121b behaves as a slave B, and the communication device 121c behaves as a slave C.

図4は、EtherCATのスレーブA、B、Cの各通信装置121において、パケットの通信経路と各スレーブの各ポートでの受信時刻を示している。EPU103(図中EtherCAT Processor Unitと表記)は、上記したように、EtherCAT仕様に準拠して、通信処理を実行するICである。   FIG. 4 shows the packet communication path and the reception time at each port of each slave in each of the communication devices 121 of EtherCAT slaves A, B, and C. As described above, the EPU 103 (denoted as EtherCAT Processor Unit in the figure) is an IC that executes communication processing in conformity with the EtherCAT specification.

図4のTa、Tb、Tc、Td及びTeは、時刻同期用の所定のパケット(時刻同期用パケット1とする)の各ポートにおける受信時刻で、tdiffAB、tdiffBC、tdiffCB及びtdiffBAはスレーブ間の通信遅延を示す。例えば、tdiffABは、スレーブAとスレーブB間の通信遅延を示す。tpは、EPU103の処理時間を示す。TAP、TBP及びTCPは、各スレーブA、B、CのEPU103における受信時刻である。   In FIG. 4, Ta, Tb, Tc, Td, and Te are reception times at predetermined ports for time synchronization (referred to as time synchronization packet 1), and tdiffAB, tdiffBC, tdiffCB, and tdiffBA are communication between slaves. Indicates delay. For example, tdiffAB indicates a communication delay between slave A and slave B. tp indicates the processing time of the EPU 103. TAP, TBP, and TCP are reception times at the EPU 103 of each of the slaves A, B, and C.

ここで、スレーブAに着目した場合、Ta及びTeは同じ通信装置121a上のクロックで計測しているが、通信装置121bとは、クロックのオフセットやドリフトが異なるため、Tb及びTdとそのまま比較することはできない。   Here, when paying attention to the slave A, Ta and Te are measured by the clock on the same communication apparatus 121a, but since the offset and drift of the clock are different from the communication apparatus 121b, they are directly compared with Tb and Td. It is not possible.

図4のTa〜Teが計測可能で、tpが既知であるとした場合、スレーブCとスレーブB間の通信遅延tdiffBCは、数式(1)で算出できる。   When Ta to Te in FIG. 4 can be measured and tp is known, the communication delay tdiffBC between the slave C and the slave B can be calculated by Expression (1).

tdiffBC =(Td−Tb)÷2 ・・・(1) tdiffBC = (Td−Tb) ÷ 2 (1)

ただし、tdiffBCとtdiffCBは等しいとする。なお、EtherCATスレーブのプロセッサユニットは同種のものを利用していると仮定している。もし、プロセッサユニットが異なる場合は、tpの違いを考慮する必要がある。   However, it is assumed that tdiffBC and tdiffCB are equal. It is assumed that the EtherCAT slave processor unit uses the same type. If the processor units are different, it is necessary to consider the difference in tp.

また、スレーブBとスレーブA間の通信遅延tdiffABは、数式(2)及び(3)で求められる。   Further, the communication delay tdiffAB between the slave B and the slave A can be obtained by Expressions (2) and (3).

tdiffAB =((Te−Ta)−(Td−Tb)−tp)÷2+tp・・・(2)
tdiffBA =tdiffAB−tp ・・・(3)
tdiffAB = ((Te−Ta) − (Td−Tb) −tp) ÷ 2 + tp (2)
tdiffBA = tdiffAB-tp (3)

なお、時刻同期機能に対応していないEtherCATスレーブは、単なる通信経路と見なされる。すなわち、時刻同期機能に対応していないEtherCATスレーブに対しては、予め設定された固定の通信遅延でパケットを転送する必要がある。   An EtherCAT slave that does not support the time synchronization function is regarded as a simple communication path. That is, it is necessary to transfer a packet with a preset fixed communication delay to an EtherCAT slave that does not support the time synchronization function.

このように時刻同期機能を実現する場合には、時刻同期用のパケットをリングネットワークで周回させる必要がある。すなわち、あるスレーブにおいて往路と復路におけるパケットの受信時刻をもとに通信遅延を計算する必要がある。   When realizing the time synchronization function in this way, it is necessary to circulate the packet for time synchronization on the ring network. That is, it is necessary to calculate the communication delay based on the reception time of the packet on the forward path and the return path in a certain slave.

このように、スレーブ間の通信遅延を求めた後、これらの通信遅延を積算して、各スレーブと基準時刻を有するスレーブ間の通信遅延を求めることができる。例えば、図4でスレーブAを基準とする場合、スレーブAとスレーブB間の通信遅延は、tdiffABとなり、スレーブAとスレーブC間の通信遅延tdiffACは、数式(4)で求められる。   Thus, after obtaining the communication delay between the slaves, these communication delays can be integrated to obtain the communication delay between each slave and the slave having the reference time. For example, when the slave A is used as a reference in FIG. 4, the communication delay between the slave A and the slave B is tdiffAB, and the communication delay tdiffAC between the slave A and the slave C is obtained by Expression (4).

tdiffAC=tdiffAB+tdiffBC・・・(4) tdiffAC = tdiffAB + tdiffBC (4)

これらの通信遅延を用いて、マスタは基準時刻となるスレーブAのTAPを、その他のスレーブに通知する。各スレーブは、各スレーブ自身のEPU103の受信時刻を用いて、基準時刻となるスレーブAとの時刻のオフセットを計算することができる。例えば、スレーブBにおけるスレーブAとの時刻のオフセットOffsetBは数式(5)で求められる。   Using these communication delays, the master notifies the slaves of the TAP of slave A that is the reference time. Each slave can calculate the time offset with respect to the slave A, which is the reference time, using the reception time of the EPU 103 of each slave. For example, the time offset OffsetB with respect to the slave A in the slave B is obtained by Expression (5).

OffsetB=TAP−TBP・・・(5) OffsetB = TAP-TBP (5)

各スレーブは、スレーブAとの通信遅延と、時刻のオフセットを用いて、自己の時刻を基準時刻と同期させることができる。   Each slave can synchronize its own time with the reference time by using a communication delay with the slave A and a time offset.

EtherCATにおいては、時刻同期に対応したスレーブの中で、マスタに最も近い(ホップ数の小さい)スレーブの時刻を基準時刻とする。図1では、通信装置121aを時刻マスタとしている。   In EtherCAT, the time of the slave closest to the master (small number of hops) among the slaves corresponding to time synchronization is set as the reference time. In FIG. 1, the communication device 121a is a time master.

次に、図5を参照して、EtherCATのパケット構成について説明する。EtherCATの通信内容は、Ethernet(登録商標)フレーム200のデータ領域202に格納される。EtherCATにおける、Ethernet(登録商標)ヘッダ201のTypeフィールドは0x88A4である。データが正しいか否かをFCS(Frame Check Sequence)203を用いて検査する。   Next, the EtherCAT packet configuration will be described with reference to FIG. The communication content of Ethernet CAT is stored in the data area 202 of the Ethernet (registered trademark) frame 200. In EtherCAT, the Type field of the Ethernet (registered trademark) header 201 is 0x88A4. Whether or not the data is correct is checked using an FCS (Frame Check Sequence) 203.

EtherCATのデータ構造は、EtherCATヘッダ204と、ひとつ、または複数のEtherCATテレグラム205で構成される。EtherCATテレグラム205は、テレグラムヘッダ206、テレグラムデータ207、ワーキングカウンタ208(WKC)から構成される。ワーキングカウンタ208は、そのテレグラムを処理すべきスレーブで正しく処理されるたびに、スレーブによって所定の数だけカウントアップされるフィールドである。   The EtherCAT data structure includes an EtherCAT header 204 and one or a plurality of EtherCAT telegrams 205. The EtherCAT telegram 205 includes a telegram header 206, telegram data 207, and a working counter 208 (WKC). The working counter 208 is a field that is counted up by a predetermined number by the slave every time the telegram is correctly processed by the slave that should process the telegram.

コマンド220は、EtherCAT仕様におけるコマンドを示す。識別子221は、データグラムの識別子である。アドレス222は、EtherCAT仕様におけるアドレスである。データサイズ223は、データ207のサイズである。C225は、フレームが巡回していることを示す。M226は、後続のテレグラムが存在することを示す。IRQ227は、スレーブからの所定事象の発生を制御用計算機120に通知するために用いられる。   A command 220 indicates a command in the EtherCAT specification. The identifier 221 is a datagram identifier. The address 222 is an address in the EtherCAT specification. The data size 223 is the size of the data 207. C225 indicates that the frame is circulating. M226 indicates that there is a subsequent telegram. The IRQ 227 is used to notify the control computer 120 of the occurrence of a predetermined event from the slave.

(1−3)通信制御装置の機能構成
次に、図6を参照して通信制御装置123の機能構成について説明する。図6に示すように、通信制御装置123は、パラメータ保存部130、通信部131a、131b(以降、通信部131と総称して説明する場合もある)、時刻マスタ障害判定部132及び時刻配信パケット更新部133などを備える。
(1-3) Functional Configuration of Communication Control Device Next, a functional configuration of the communication control device 123 will be described with reference to FIG. As illustrated in FIG. 6, the communication control device 123 includes a parameter storage unit 130, communication units 131a and 131b (hereinafter, may be collectively referred to as the communication unit 131), a time master failure determination unit 132, and a time distribution packet. An update unit 133 is provided.

パラメータ保存部130は、時刻同期処理に必要なパラメータを保存する機能を有する。これらのパラメータは、通信部131によって受信したパケット上のデータそのものであってもよいし、該データをもとに変形、あるいは所定の方法で算出したパラメータであってもよい。パラメータ保存部130が保存するパラメータとしては、例えば、時刻マスタとの通信遅延や、時刻マスタの時刻との誤差などを例示できる。パラメータ保存部130は、EPU103、メモリ108、不揮発性記憶媒体109、CPU101上で動作するOSのいずれか、または複数によって構成される。   The parameter storage unit 130 has a function of storing parameters necessary for time synchronization processing. These parameters may be the data itself in the packet received by the communication unit 131, or may be parameters that are modified based on the data or calculated by a predetermined method. Examples of parameters stored by the parameter storage unit 130 include a communication delay with the time master and an error from the time of the time master. The parameter storage unit 130 includes any one or more of the EPU 103, the memory 108, the nonvolatile storage medium 109, and the OS operating on the CPU 101.

通信部131は、パケットを送受信する機能を有する。通信部131は、LAN102、あるいは通信機能の一部がEPU103に含まれる場合は、LAN102とEPU103で構成される。図6では、2つの通信部131を示しているが、通信部131aはLAN102a、通信部131bはLAN102bに相当する。   The communication unit 131 has a function of transmitting and receiving packets. The communication unit 131 includes the LAN 102 or the EPU 103 when the communication function 131 is included in the EPU 103. In FIG. 6, two communication units 131 are shown. The communication unit 131a corresponds to the LAN 102a, and the communication unit 131b corresponds to the LAN 102b.

時刻マスタ障害判定部132は、通信部131で送受信されるパケットに含まれるデータや、送受信のタイミング等によって、時刻マスタの障害を判定する機能を有する。時刻マスタ障害判定部132は、EPU103、CPU101上で動作するソフトウェアプログラムのいずれか、または複数によって構成される。   The time master failure determination unit 132 has a function of determining a failure of the time master based on data included in a packet transmitted / received by the communication unit 131, transmission / reception timing, and the like. The time master failure determination unit 132 is configured by one or a plurality of software programs operating on the EPU 103 and the CPU 101.

時刻配信パケット更新部133は、時刻マスタ障害判定部132が時刻マスタの障害を検知した場合に、時刻配信パケット内のデータを更新すること等により、時刻マスタを代替する機能を有する。時刻配信パケット更新部133は、EPU103、CPU101上で動作するソフトウェアプログラムのいずれか、または複数によって構成される。   The time distribution packet update unit 133 has a function of substituting the time master by updating data in the time distribution packet when the time master failure determination unit 132 detects a failure of the time master. The time distribution packet update unit 133 is configured by one or a plurality of software programs operating on the EPU 103 and the CPU 101.

なお、別途、バス110上にFPGA、CPLD、ASIC等のICを設けて、パラメータ保存部130、時刻マスタ障害判定部132、時刻配信パケット更新部133のいずれか、または複数を構成してもよい。   Separately, an IC such as FPGA, CPLD, or ASIC may be provided on the bus 110 to configure one or more of the parameter storage unit 130, the time master failure determination unit 132, and the time distribution packet update unit 133. .

(1−4)通信制御装置の動作の詳細
次に、図7を参照して、通信制御装置123の動作の詳細を説明する。図7に示すように、通信制御装置123は、時刻情報の配信パケットを受信するまで待機する(S001)。なお、時刻情報の配信パケット以外のパケットは、通信装置121と同様に、通常のEtherCATスレーブとして処理する。
(1-4) Details of Operation of Communication Control Device Next, details of the operation of the communication control device 123 will be described with reference to FIG. As shown in FIG. 7, the communication control device 123 waits until a time information distribution packet is received (S001). Packets other than the time information distribution packet are processed as normal EtherCAT slaves in the same manner as the communication device 121.

ステップS001において、時刻情報の配信パケットを受信したと判定されると、時刻マスタ障害判定部132は、時刻マスタが異常かを判定する(S002)。上記したように、時刻マスタ障害判定部132は、ステップS001で受信した配信パケットに含まれるデータや、送受信のタイミングによって、時刻マスタが障害かを判定する。   If it is determined in step S001 that the time information distribution packet has been received, the time master failure determination unit 132 determines whether the time master is abnormal (S002). As described above, the time master failure determination unit 132 determines whether the time master is a failure based on the data included in the distribution packet received in step S001 and the transmission / reception timing.

ステップS002において、時刻マスタが異常であると判定された場合には、パラメータ保存部130が必要なパラメータを保存しているかを判定する(S003)。具体的に、パラメータ保存部130が保存するパラメータとは、時刻マスタとの通信遅延、時刻マスタとの時刻誤差である。これらのパラメータは、EtherCATの時刻同期手順において、制御用計算機120による初期手順で設定される。すなわち、パラメータ保存部130に必要なパラメータが保存されている場合には、時刻マスタである通信装置121aと通信制御装置123との時刻が同期されており、通信制御装置123が通信装置121aに代わって時刻マスタとして振る舞うことができることを意味している。   If it is determined in step S002 that the time master is abnormal, it is determined whether the parameter storage unit 130 stores necessary parameters (S003). Specifically, the parameters stored by the parameter storage unit 130 are a communication delay with the time master and a time error with the time master. These parameters are set in the initial procedure by the control computer 120 in the EtherCAT time synchronization procedure. That is, when necessary parameters are stored in the parameter storage unit 130, the time of the communication device 121a as the time master and the communication control device 123 are synchronized, and the communication control device 123 replaces the communication device 121a. This means that it can act as a time master.

パラメータ保存部130は、これらのパラメータが0ではないことから、必要なパラメータを保存していると判定してもよい。また、制御用計算機120からのパケットにおいて、遅延時刻、時刻誤差を保持するレジスタへのアクセスがあった場合に、これらのパラメータの更新があったとして、パラメータを保存していると判定してもよい。なお、これらのパラメータが0となるのは、時刻スレーブとして振る舞う通信装置のみである。   The parameter storage unit 130 may determine that the necessary parameters are stored because these parameters are not zero. Further, in the packet from the control computer 120, if there is an access to a register that holds a delay time and a time error, it may be determined that the parameters are stored, assuming that these parameters have been updated. Good. Note that these parameters are set to 0 only for a communication device that behaves as a time slave.

次に、S003において、パラメータ保存部130が必要なパラメータを保存していると判定された場合には、時刻配信パケット更新部133は、配信する時刻情報を更新する(S004)。このときに、更新する時刻情報は、通信制御装置123自身の時刻と、パラメータ保存部130で保持したパラメータをもとに決定する。具体的には数式(6)で求められる。   Next, when it is determined in S003 that the parameter storage unit 130 stores necessary parameters, the time distribution packet update unit 133 updates the time information to be distributed (S004). At this time, the time information to be updated is determined based on the time of the communication control device 123 itself and the parameters stored in the parameter storage unit 130. Specifically, it is obtained by Expression (6).

T=L−d+O・・・(6) T = L−d + O (6)

ここで、Tは更新した時刻情報、Lは通信制御装置123自身の時刻、dは時刻マスタと通信制御装置123間の通信遅延、Oは時刻マスタと通信制御装置123の時刻誤差である。   Here, T is the updated time information, L is the time of the communication control device 123 itself, d is a communication delay between the time master and the communication control device 123, and O is a time error between the time master and the communication control device 123.

また、通信制御装置123が時刻マスタに同期している時刻Sを用いて、数式(7)で計算してもよい。   Moreover, you may calculate by Numerical formula (7) using the time S which the communication control apparatus 123 is synchronizing with the time master.

T=S−d・・・(7) T = S−d (7)

なお、更新時刻Tを通信制御装置123自身の時刻Lとしてもよいが、もとの時刻マスタを代替し、過渡的な同期精度の低下を防止するためには、数式(6)または数式(7)による更新をするとよい。   Note that the update time T may be the time L of the communication control device 123 itself. However, in order to replace the original time master and prevent a transient decrease in synchronization accuracy, the formula (6) or the formula (7 ) It is recommended to update.

ステップS004を実行した後、通信部131bを用いてパケットを後段の通信装置121に転送する(S006)。   After executing step S004, the communication unit 131b is used to transfer the packet to the subsequent communication device 121 (S006).

一方、ステップS002において、時刻マスタが異常ではない、すなわち時刻マスタが障害を起こしていないと判定された場合には、通常のスレーブ同様にパケットを処理する(S005)。また、S003において、パラメータ保存部130に必要なパラメータを保存していないと判定された場合にも、通常のスレーブ同様にパケットを処理する(S005)。その後、通信部131bを用いてパケットを後段の通信装置121に転送する(S006)。   On the other hand, if it is determined in step S002 that the time master is not abnormal, that is, the time master has not failed, the packet is processed in the same manner as a normal slave (S005). If it is determined in S003 that the necessary parameters are not stored in the parameter storage unit 130, the packet is processed in the same manner as a normal slave (S005). Thereafter, the communication unit 131b is used to transfer the packet to the subsequent communication device 121 (S006).

次に、ステップS002における時刻マスタ障害判定部132による時刻マスタの障害判定方法について説明する。   Next, a time master failure determination method by the time master failure determination unit 132 in step S002 will be described.

EtherCATでは、制御用計算機120が送信するパケットによる所定アドレスへのアクセスにより、時刻マスタが自身の時刻情報をパケットに格納する。この時刻マスタの機能が正常に動作していなければ、通信制御装置123が受信するパケットの該当領域には異常な値が書き込まれる。異常な値としては、例えば0を例示できる。時刻マスタが正常であっても偶然に時刻情報として0となる場合がある。この場合に時刻マスタ障害判定部132が時刻マスタを異常と誤判定するが、図7のステップS004において、時刻マスタに同期した時刻に更新するため、同期精度は維持される。   In EtherCAT, the time master stores its time information in the packet by accessing a predetermined address by the packet transmitted by the control computer 120. If the time master function is not operating normally, an abnormal value is written in the corresponding area of the packet received by the communication control device 123. An example of an abnormal value is 0. Even if the time master is normal, it may happen to be zero as time information. In this case, the time master failure determination unit 132 erroneously determines that the time master is abnormal. However, in step S004 in FIG. 7, the time master failure determination unit 132 updates to the time synchronized with the time master, so the synchronization accuracy is maintained.

また、時刻配信パケットの受信間隔を通信制御装置123自身の時刻で計測し、時刻配信パケットに格納されている時刻情報の差分と比較することにより、時刻マスタの異常を判定してもよい。この判定基準を数式(8)で示す。   Alternatively, the time master packet abnormality may be determined by measuring the time interval of receiving the time distribution packet with the time of the communication control device 123 itself and comparing it with the difference in the time information stored in the time distribution packet. This determination criterion is expressed by Expression (8).

|(Li+1 − Li)−(Ti+1 − Ti)| > α・・・(8) | (Li + 1−Li) − (Ti + 1−Ti) |> α (8)

ここで、Liはi番目に受信した時の通信制御装置123の時刻であり、Tiはi番目に受信した時刻配信パケットに格納された時刻情報であり、αは異常と判定する閾値である。αは、時刻の進み具合の誤差に基づいて決定することが示される。例えば、時刻の進み具合の誤差から考えられる最大誤差以上とすることが示される。   Here, Li is the time of the communication control device 123 when it is received i-th, Ti is the time information stored in the i-th received time distribution packet, and α is a threshold value for determining an abnormality. It is shown that α is determined based on an error in time advancement. For example, it is indicated that the error is greater than or equal to the maximum error that can be considered from the error in the progress of time.

上記数式(8)は、連続して受信した時刻配信パケットを用いて判断しているが、数式(8)の条件を所定回数連続して満足した場合に異常と判定することや、数式(8)の(Li+1 − Li)−(Ti+1 − Ti)を所定回数計測して算出される統計値(平均値、分散、積分値、合計値等)と所定の閾値を比較することで、時刻マスタを異常と判定してもよい。   The above formula (8) is determined by using time distribution packets received continuously. However, when the condition of the formula (8) is continuously satisfied a predetermined number of times, it is determined that there is an abnormality, or the formula (8) ) (Li + 1−Li) − (Ti + 1−Ti) of a predetermined number of times, and a statistical value (average value, variance, integral value, total value, etc.) calculated by a predetermined number of times is compared with a predetermined threshold value. The time master may be determined to be abnormal.

これらの受信間隔に基づいて判定可能な異常の原因は、時刻マスタ自身の時刻の異常の他に、図8に示すように通信経路の変更による通信遅延の変化が含まれる。図8では、通信装置121aが時刻マスタであるとする。通信装置121aと通信制御装置123間の通信経路に異常が発生したとし、制御用計算機120からのパケットは通信装置121aを経由後、制御用計算機120に戻るとする。   The causes of the abnormality that can be determined based on these reception intervals include a change in communication delay due to a change in the communication path as shown in FIG. 8 in addition to the time abnormality of the time master itself. In FIG. 8, it is assumed that the communication device 121a is a time master. Assume that an abnormality has occurred in the communication path between the communication device 121a and the communication control device 123, and that packets from the control computer 120 return to the control computer 120 after passing through the communication device 121a.

上記したように、EtherCATのバケットには、各スレーブが処理した場合に所定の値が足されるカウンタ部分(ワーキングカウンタ208)が設けられている。制御用計算機120は、パケット上のカウンタが、全スレーブ数に基づく期待値と異なる場合に経路上の異常を検知する。また、パケットを送信した通信ポート(図8の通信ポート1)で該パケット受信したことで、経路上の異常を検知してもよい。   As described above, the EtherCAT bucket is provided with a counter portion (working counter 208) to which a predetermined value is added when each slave processes. The control computer 120 detects an abnormality on the path when the counter on the packet is different from the expected value based on the total number of slaves. Alternatively, an abnormality on the route may be detected by receiving the packet at the communication port (communication port 1 in FIG. 8) that transmitted the packet.

上記方法による経路上の異常を判定した制御用計算機120は、代替通信ポート(図8の通信ポート2)からパケットを送信する。なお、制御用計算機120は、通信経路の異常を判断せずに、両方の通信ポートから同じパケットを送信してもよい。   The control computer 120 that has determined an abnormality on the route by the above method transmits a packet from the alternative communication port (communication port 2 in FIG. 8). Note that the control computer 120 may transmit the same packet from both communication ports without determining the abnormality of the communication path.

このようにして、時刻配信パケットは、通信装置121aでパケットを受信後、再び、制御用計算機120に戻り、その後、通信制御装置123に転送される。この場合、通信装置121aで受信してから通信制御装置123で受信するまでの通信遅延が正常時よりも長くなるため、上記数式(8)等によって、時刻情報の異常を判定することができる。   In this way, the time distribution packet is returned to the control computer 120 again after being received by the communication device 121a, and then transferred to the communication control device 123. In this case, since the communication delay from the reception by the communication device 121a to the reception by the communication control device 123 becomes longer than that at the normal time, the abnormality of the time information can be determined by the above formula (8) or the like.

また、時刻マスタ障害判定部132が、時刻マスタである通信装置121aの異常を検知することができた場合には、自身の時刻と時刻マスタの情報から時刻情報を修正することができる(図7のステップS004)。これにより、他の通信装置121の時刻精度が低下することを防ぐことができる。   Further, when the time master failure determination unit 132 can detect an abnormality of the communication device 121a that is the time master, the time information can be corrected from the own time and the information of the time master (FIG. 7). Step S004). Thereby, it can prevent that the time precision of the other communication apparatus 121 falls.

また、図9に示すように時刻マスタである通信装置121a自身が障害でダウンする場合も考えられる。通信装置121a自身の障害は、通信装置121aの両端の通信経路の異常も含まれる。この場合、時刻配信パケットは通信装置121aを経由しないため、パケット上の時刻情報、ならびにワーキングカウンタ208の値は0となる。したがって、パケット上の時刻情報、ならびにワーキングカウンタ208の値が0の場合に、時刻マスタが異常であると判定することができる。   In addition, as shown in FIG. 9, there may be a case where the communication device 121a itself, which is the time master, goes down due to a failure. The failure of the communication device 121a itself includes an abnormality in the communication path at both ends of the communication device 121a. In this case, since the time distribution packet does not pass through the communication device 121a, the time information on the packet and the value of the working counter 208 are zero. Therefore, when the time information on the packet and the value of the working counter 208 are 0, it can be determined that the time master is abnormal.

また、EtherCATのオートインクリメントアドレスを用いて時刻マスタの異常を判定してもよい。オートインクリメントアドレスは、各スレーブがパケットを処理するごとにアドレス値を1ずつインクリメントし、受信した際のアドレス値が0であれば、そのデータグラムが自身に対するパケットと判定するアドレス体系である。データグラムはEtherCATパケットの構成単位であって、上記したデータ207である。時刻配信パケットでは、ARMWコマンド(Auto Increment Read Multiple Write)というオートインクリメントアドレスを用いたデータグラムによって時刻情報を配信する。   Also, the abnormality of the time master may be determined using the EtherCAT auto-increment address. The auto-increment address is an address system that increments the address value by 1 each time each slave processes a packet, and determines that the datagram is a packet for itself if the address value when received is 0. The datagram is a unit of EtherCAT packet and is the data 207 described above. In the time distribution packet, time information is distributed by a datagram using an auto increment address called ARMW command (Auto Increment Read Multiple Write).

図9のように、時刻配信パケットが通信装置121aを経由しない場合、ARMWコマンドのオートインクリメントアドレスは、1をインクリメントされずに通信制御装置123に転送される。したがって、通信制御装置123は時刻配信パケット記載のオートインクリメントアドレスを確認することにより、時刻マスタの異常を判定することができる。   As shown in FIG. 9, when the time distribution packet does not pass through the communication device 121a, the auto increment address of the ARMW command is transferred to the communication control device 123 without incrementing 1. Therefore, the communication control device 123 can determine the abnormality of the time master by confirming the auto increment address described in the time distribution packet.

正常時であれば、通信制御装置123が通信装置121aの隣のノードの場合、受信するパケットのオートインクリメントアドレスは1となる(通信装置121aが0)。通信制御装置123と通信装置121a間のホップ数をN(隣接する場合は1)として、受信したパケットのオートインクリメントアドレスがNでなければ、時刻マスタの異常と判定する。なお、時刻マスタ障害判定部132は時刻マスタである通信装置121aと通信制御装置123間のホップ数Nを、時刻同期の初期手順で受信したパケットのオートインクリメントアドレスから取得し、パラメータ保存部130に保持している。   If it is normal, when the communication control device 123 is a node adjacent to the communication device 121a, the auto-increment address of the received packet is 1 (the communication device 121a is 0). If the number of hops between the communication control device 123 and the communication device 121a is N (1 when adjacent) and the auto-increment address of the received packet is not N, it is determined that the time master is abnormal. The time master failure determination unit 132 obtains the hop count N between the communication device 121a as the time master and the communication control device 123 from the auto-increment address of the packet received in the initial procedure of time synchronization, and stores it in the parameter storage unit 130. keeping.

オートインクリメントアドレスが期待値Nでなかった場合、時刻配信パケット更新部133は、図7のS004の手順で時刻情報を更新する。さらに、該データグラムのオートインクリメントアドレスを数式(9)で求めた値に更新し、次の通信装置121に転送する。   When the auto increment address is not the expected value N, the time distribution packet update unit 133 updates the time information in the procedure of S004 in FIG. Further, the auto-increment address of the datagram is updated to the value obtained by Equation (9) and transferred to the next communication device 121.

AutoAddr=N+1・・・(9) AutoAddr = N + 1 (9)

ここで、AutoAddrはオートインクリメントアドレスである。   Here, AutoAddr is an auto increment address.

その他、時刻配信パケットを所定期間受信しなかった場合に、時刻マスタ障害判定部132は、時刻マスタを異常と判定してもよい。この所定期間の観測は、時刻同期手順の初期手順から開始してもよいし、時刻配信パケットを受信後に開始してもよい。また、時刻配信パケットの受信間隔の観測の開始を指示する所定のパケットを受信した後に、時刻配信パケットの受信間隔の観測を開始してもよい。また、通信制御装置123自身に所定の入力手段(キーボード、スイッチ、マイク等)を設けて、所定の信号を入力後に時刻配信パケットの受信間隔の観測を開始してもよい。   In addition, when the time distribution packet is not received for a predetermined period, the time master failure determination unit 132 may determine that the time master is abnormal. The observation of the predetermined period may be started from the initial procedure of the time synchronization procedure, or may be started after receiving the time distribution packet. Alternatively, the observation of the time distribution packet reception interval may be started after receiving a predetermined packet instructing the start of observation of the time distribution packet reception interval. Alternatively, the communication control device 123 itself may be provided with predetermined input means (keyboard, switch, microphone, etc.), and observation of the reception interval of the time distribution packet may be started after inputting a predetermined signal.

また、異常判定する時刻配信パケットの受信間隔の閾値は、予め、固定値を設定してもよいし、制御用計算機120から所定のフォーマットのパケットを受信して設定するようにしてもよい。また、通信制御装置123に設けた入力手段からの入力に応じて閾値を設定してもよい。また、受信間隔の閾値は、水晶振動子等の物理的な特性で決定される通信制御装置123自身の時刻の精度と、システムの要求する同期精度によって決定してもよい。すなわち、同期精度を実行しない期間でずれる精度誤差が、要求する同期精度より低下しないように実行周期を決定する。   In addition, a fixed value may be set in advance as the reception interval threshold of the time distribution packet for determining abnormality, or a packet in a predetermined format may be received from the control computer 120 and set. Further, a threshold value may be set according to an input from an input unit provided in the communication control device 123. The threshold value of the reception interval may be determined by the accuracy of the time of the communication control device 123 itself determined by physical characteristics such as a crystal resonator and the synchronization accuracy required by the system. In other words, the execution cycle is determined so that the accuracy error that shifts in the period when the synchronization accuracy is not performed does not fall below the required synchronization accuracy.

例えば、1秒間の同期処理を実行せずにF(時間)の同期精度誤差が生じる通信装置を用い、要求同期精度がPの場合、数式(10)より、同期処理を実行すべき周期Qが求まる。   For example, when using a communication device in which a synchronization accuracy error of F (time) is generated without executing the synchronization processing for 1 second and the required synchronization accuracy is P, the cycle Q at which the synchronization processing is to be executed is calculated from Equation (10). I want.

Q=1[単位:秒]×P/F・・・(10) Q = 1 [unit: second] × P / F (10)

例えば、F=100マイクロ秒、P=1マイクロ秒であれば、Q=1×1/100=10ミリ秒となる。   For example, if F = 100 microseconds and P = 1 microseconds, then Q = 1 × 1/100 = 10 milliseconds.

上記数式(10)により算出される周期Qは、制御用計算機120の時刻配信パケットの送信間隔について適用してもよい。この送信間隔は、ネットワーク122上の通信装置121、通信制御装置123の中で最も条件の厳しいノードにあわせる必要がある。   The period Q calculated by the equation (10) may be applied to the transmission interval of the time distribution packet of the control computer 120. This transmission interval needs to be matched to a node having the strictest conditions among the communication device 121 and the communication control device 123 on the network 122.

上記のように、時刻マスタ障害判定部132が時刻マスタの異常を検知した場合には、時刻配信パケットを受信することができないため、図7に示す手順を適用することができない。このような場合、通信制御装置123自身が時刻配信パケットを生成して、送信するようにしてもよい。このとき、時刻情報は、上記数式(6)または数式(7)のいずれかによって算出することができる。   As described above, when the time master failure determination unit 132 detects an abnormality of the time master, the time distribution packet cannot be received, and thus the procedure illustrated in FIG. 7 cannot be applied. In such a case, the communication control device 123 itself may generate and transmit a time distribution packet. At this time, the time information can be calculated by either the above formula (6) or formula (7).

また、オートインクリメントアドレスを用いる場合は、次の通信装置121に転送するデータグラムのオートインクリメントアドレスを数式(9)によって算出することができる。また、通信制御装置123が時刻配信パケットを送信するタイミングは、時刻マスタ障害判定部132が時刻マスタの異常を判定したタイミングでもよいし、所定の周期で送信してもよい。このときの周期は、上記数式(10)に基づいて決定してもよい。   In addition, when the auto increment address is used, the auto increment address of the datagram to be transferred to the next communication device 121 can be calculated by Expression (9). The timing at which the communication control device 123 transmits the time distribution packet may be the timing at which the time master failure determination unit 132 determines that the time master is abnormal, or may be transmitted at a predetermined cycle. The period at this time may be determined based on Equation (10).

また、本発明を適用した通信制御装置123を複数用いて、多段で構成してもよい。この場合、パケット上の時刻情報は、時刻マスタ障害判定部132が時刻マスタを異常と判定した通信制御装置123のうち、最後に時刻配信パケットを処理した通信制御装置123による時刻情報に更新される。   In addition, a plurality of communication control devices 123 to which the present invention is applied may be used and configured in multiple stages. In this case, the time information on the packet is updated to the time information by the communication control device 123 that last processed the time distribution packet among the communication control devices 123 that the time master failure determination unit 132 determined to be abnormal. .

または、通信制御装置123が時刻情報を更新したことをパケットに記録し、後段の通信制御装置123は、その記録を見て、時刻情報の更新処理を制御するようにしてもよい。   Alternatively, the fact that the communication control device 123 has updated the time information may be recorded in a packet, and the communication control device 123 at the subsequent stage may control the time information update process by looking at the record.

パケット上への更新処理の有無の記録方法としては、EtherCATパケットのデータグラムのヘッダ上の項目(例えば、IRQ:Interrupt ReQuest)を用いてもよいし、該情報を示す所定のデータグラムを付加してもよい。   As a recording method of whether or not update processing is performed on the packet, an item on the header of the datagram of the EtherCAT packet (for example, IRQ: Interrupt Request) may be used, or a predetermined datagram indicating the information is added. May be.

また、それらの記録の表現方法により、どの通信制御装置123が更新処理を実行したかを示すことができ、それをもとに、後段の通信制御装置123の制御を変更することができる。例えば、データグラムのヘッダのIRQを用いる場合は、ビット位置と通信制御装置123の識別情報とを対応づけるようにしてもよい。   In addition, it is possible to indicate which communication control device 123 has executed the update process by the representation method of those records, and based on this, the control of the communication control device 123 at the subsequent stage can be changed. For example, when the IRQ of the datagram header is used, the bit position may be associated with the identification information of the communication control device 123.

また、後段の通信制御装置123は、すでに更新処理を実行した通信制御装置123があれば、更新処理を実行しないようにしてもよい。また、複数の通信制御装置123の間で優先度を設定して、その優先度に基づいて更新処理の適用可否を決定してもよい。例えば、各通信制御装置123は、自身よりも優先度が高い通信制御装置123が時刻情報を更新している場合には自身の時刻情報を更新せず、自身よりも優先度の低い通信制御装置123が時刻情報を更新している場合には自身の時刻情報を更新するようにしてもよい。   Further, if there is a communication control apparatus 123 that has already executed the update process, the communication control apparatus 123 at the subsequent stage may not execute the update process. Alternatively, priority may be set between the plurality of communication control devices 123, and whether or not to apply the update process may be determined based on the priority. For example, each communication control device 123 does not update its own time information when the communication control device 123 having a higher priority than itself updates the time information, and has a lower priority than itself. If 123 is updating the time information, its own time information may be updated.

該優先度は、通信制御装置123の時刻精度や計算機機能に基づいて決定してもよい。計算機機能としては、CPU101の性能や、メモリ108、不揮発性記憶媒体109の容量、スループットなどが挙げられる。また、該優先度は、ネットワーク上における位置、通信帯域、単位時間あたりの通信量、通信遅延、通信媒体等をもとに算出した統計値(平均値、最小値、最大値、分散等)に基づいて決定してもよい。   The priority may be determined based on the time accuracy and computer function of the communication control device 123. Examples of the computer function include the performance of the CPU 101, the capacity of the memory 108 and the nonvolatile storage medium 109, and the throughput. In addition, the priority is a statistical value (average value, minimum value, maximum value, variance, etc.) calculated based on the position on the network, communication bandwidth, communication volume per unit time, communication delay, communication medium, etc. You may decide based on.

(1−5)本実施の形態の効果
以上のように、本実施の形態によれば、通信制御装置123は、時刻マスタとして振る舞う通信装置121の同期パケットを観測して得られたパラメータを保存して、該通信装置121の異常が検知された場合に、保存したパラメータ及び通信制御装置123自身の時刻情報をもとに同期パケットを生成して、他の通信装置に送信する。これにより、時刻情報を提供するマスタ機能を冗長化し、さらにマスタ切り替り時の過渡的な同期精度の低下を防止することができる。
(1-5) Effects of this Embodiment As described above, according to this embodiment, the communication control device 123 stores parameters obtained by observing the synchronization packet of the communication device 121 acting as a time master. When an abnormality is detected in the communication device 121, a synchronization packet is generated based on the saved parameters and the time information of the communication control device 123 itself, and is transmitted to another communication device. As a result, the master function for providing time information can be made redundant, and a transient decrease in synchronization accuracy during master switching can be prevented.

(2)第2の実施の形態
本実施の形態は、時刻同期プロトコルにIEEE1588を利用した場合について説明する。本実施の形態で使用する符号は、特に断りのない限り、第1の実施の形態で説明した機能や要素等と同一であることを意味する。なお、以下では、上記した第1の実施の形態と同様の構成については詳細な説明は省略し、第1の実施の形態と異なる構成について特に詳細に説明する。
(2) Second Embodiment In the present embodiment, a case where IEEE 1588 is used for the time synchronization protocol will be described. The reference numerals used in the present embodiment mean that they are the same as the functions and elements described in the first embodiment unless otherwise specified. In the following, detailed description of the same configuration as that of the first embodiment will be omitted, and a configuration different from that of the first embodiment will be described in detail.

(2−1)ハードウェア構成
(2−1−1)通信システムの構成
図10に本実施の形態の通信システムの構成を示す。図10に示すように、通信制御装置140は、IEEE1588の機能を備え、ネットワーク142を介して、他の通信装置141と通信する。
(2-1) Hardware Configuration (2-1-1) Configuration of Communication System FIG. 10 shows the configuration of the communication system according to the present embodiment. As shown in FIG. 10, the communication control device 140 has an IEEE 1588 function and communicates with another communication device 141 via the network 142.

通信装置141は、通信制御装置140と同様に、IEEE1588の機能を備え、ネットワーク142を介して、他の通信装置141、通信制御装置140と通信する。ネットワーク142としては、IEEE802.3や各種産業用ネットワークが例示される。   Similar to the communication control device 140, the communication device 141 has an IEEE 1588 function, and communicates with other communication devices 141 and the communication control device 140 via the network 142. Examples of the network 142 include IEEE 802.3 and various industrial networks.

ネットワーク142は、ブロードキャストドメインとし、ある通信制御装置140、通信装置141から送信されるブロードキャストパケット、マルチキャストパケットは、ネットワーク142に接続される各通信制御装置140、通信装置141に転送される。また、ネットワーク142は、ネットワークスイッチ、ブリッジ、ルータ、IEEE1588のTC(Transparent Clock)、OpenFlowスイッチ等の各種ネットワーク中継装置が含まれていてもよい。   The network 142 is a broadcast domain, and broadcast packets and multicast packets transmitted from a certain communication control device 140 and communication device 141 are transferred to each communication control device 140 and communication device 141 connected to the network 142. The network 142 may include various network relay devices such as a network switch, a bridge, a router, an IEEE 1588 TC (Transparent Clock), and an OpenFlow switch.

(2−1−2)通信制御装置のハードウェア構成
次に、図11を参照して、通信制御装置140のハードウェア構成について説明する。図11に示すように、通信制御装置140は、CPU101、LAN102、PHY104、メモリ108、不揮発性記憶媒体109及びバス110などから構成される。CPU101、LAN102、PHY104、メモリ108、不揮発性記憶媒体109及びバス110は、第1の実施の形態と同様のため、詳細な説明は省略する。
(2-1-2) Hardware Configuration of Communication Control Device Next, a hardware configuration of the communication control device 140 will be described with reference to FIG. As shown in FIG. 11, the communication control device 140 includes a CPU 101, a LAN 102, a PHY 104, a memory 108, a nonvolatile storage medium 109, a bus 110, and the like. Since the CPU 101, the LAN 102, the PHY 104, the memory 108, the non-volatile storage medium 109, and the bus 110 are the same as those in the first embodiment, detailed description thereof is omitted.

(2−2)通信制御装置の機能構成
次に、図12を参照して通信制御装置140の機能構成について説明する。図12に示すように、通信制御装置140は、パラメータ保存部130、通信部131、時刻マスタ異常判定部150、時刻マスタパラメータ動的抽出部151及び時刻マスタ代替部152から構成される。パラメータ保存部130及び通信部131は、第1の実施の形態と同様の機能を有するため、詳細な説明は省略する。
(2-2) Functional Configuration of Communication Control Device Next, a functional configuration of the communication control device 140 will be described with reference to FIG. As illustrated in FIG. 12, the communication control device 140 includes a parameter storage unit 130, a communication unit 131, a time master abnormality determination unit 150, a time master parameter dynamic extraction unit 151, and a time master substitution unit 152. Since the parameter storage unit 130 and the communication unit 131 have the same functions as those in the first embodiment, detailed description thereof is omitted.

時刻マスタ異常判定部150は、通信部131で送受信されるパケットに含まれるデータや、送受信のタイミング等によって、時刻マスタの異常を判定する機能を有する。時刻マスタ異常判定部150は、CPU101上で動作するソフトウェアプログラムによって構成される。   The time master abnormality determination unit 150 has a function of determining abnormality of the time master based on data included in a packet transmitted / received by the communication unit 131, transmission / reception timing, and the like. The time master abnormality determination unit 150 is configured by a software program that operates on the CPU 101.

時刻マスタパラメータ動的抽出部151は、IEEE1588において、時刻マスタとして振る舞う通信装置141から受信したパケット上のパラメータを抽出し、パラメータ保存部130に保存する機能を有する。   The time master parameter dynamic extraction unit 151 has a function of extracting a parameter on a packet received from the communication device 141 acting as a time master and storing the parameter in the parameter storage unit 130 in IEEE 1588.

時刻マスタ代替部152は、時刻マスタ異常判定部150が時刻マスタの異常を判定した場合に、時刻マスタ機能を代替する機能を有する。   The time master substitution unit 152 has a function of substituting the time master function when the time master abnormality determination unit 150 determines a time master abnormality.

(2−3)IEEE1588の時刻同期
ここで、図13を参照して、IEEE1588の時刻同期プロトコルの実行手順について説明する。IEEE1588においては、通信装置141がマスタ−スレーブ構成をとる。図14に、IEEE1588におけるマスタとスレーブとの間のメッセージの送受信を示す。
(2-3) IEEE 1588 Time Synchronization Here, with reference to FIG. 13, an execution procedure of the IEEE 1588 time synchronization protocol will be described. In IEEE 1588, the communication device 141 takes a master-slave configuration. FIG. 14 shows message transmission / reception between a master and a slave in IEEE 1588.

図13に示すように、はじめにマスタは、スレーブにSyncメッセージを送信する(S060)。このとき、マスタはSyncメッセージの送信時刻t1を記録する(S061)。そして、スレーブは、Syncメッセージを受信すると、その受信時刻t2を記録する(S062)。   As shown in FIG. 13, first, the master transmits a Sync message to the slave (S060). At this time, the master records the transmission time t1 of the Sync message (S061). Then, when receiving the Sync message, the slave records the reception time t2 (S062).

そして、マスタは次のいずれかの手段でt1をスレーブに通知する(S063)。第1の手段は、Syncメッセージにt1の情報をのせる方法である。第2の手段は、Syncメッセージに続くFollow_Upメッセージにt1の情報をのせる方法である。   Then, the master notifies the slave of t1 by one of the following means (S063). The first means is a method of putting t1 information in the Sync message. The second means is a method of putting t1 information in the Follow_Up message following the Sync message.

続いて、スレーブは、マスタにDelay_Reqメッセージを送信する(S064)。このとき、スレーブはDelay_Reqメッセージの送信時刻t3を記録する(S065)。マスタは、Delay_Reqメッセージを受信すると、その受信時刻t4を記録する(S066)。   Subsequently, the slave transmits a Delay_Req message to the master (S064). At this time, the slave records the transmission time t3 of the Delay_Req message (S065). When receiving the Delay_Req message, the master records the reception time t4 (S066).

そして、マスタはDelay_Respメッセージにt4の情報をのせ、t4をスレーブに通知する(S067)。Delay_Respメッセージを受信したスレーブは、t1、t2、t3及びt4から、マスタとスレーブとの間の通信遅延及び時刻の差分を計算する(S068)。   Then, the master puts the information of t4 on the Delay_Resp message and notifies the slave of t4 (S067). The slave that has received the Delay_Resp message calculates a communication delay and a time difference between the master and the slave from t1, t2, t3, and t4 (S068).

通信遅延の計算には、マスタとスレーブとの間の通信遅延が往復路で等しいことを前提としている。したがって、片道の通信遅延tdは、数式(11)で算出される。   The calculation of the communication delay is based on the premise that the communication delay between the master and the slave is equal in the round trip path. Therefore, the one-way communication delay td is calculated by Expression (11).

td=((t4−t3)+(t2−t1))/2・・・(11) td = ((t4−t3) + (t2−t1)) / 2 (11)

また、マスタとスレーブの時刻の差分tdiffは、数式(12)で算出される。   Further, the difference tdiff between the master and slave times is calculated by Equation (12).

tdiff={(t4−t3)−(t2−t1)}/2・・・(12) tdiff = {(t4-t3)-(t2-t1)} / 2 (12)

上記数式(12)で算出されたtdiffを用いて、マスタ及びスレーブは時刻を同期することができる。   The master and the slave can synchronize time by using tdiff calculated by the above equation (12).

(2−4)通信制御装置の動作の詳細
次に、図15を参照して、本実施の形態にかかる通信制御装置140の動作の詳細を説明する。
(2-4) Details of Operation of Communication Control Device Next, details of the operation of the communication control device 140 according to the present embodiment will be described with reference to FIG.

IEEE 1588では、BMC(Best Master Clock)アルゴリズム、あるいは静的な設定により、各通信制御装置140及び通信装置141の各ポートにおいて、上記したマスタ及びスレーブの役割を決定する。このとき、通信制御装置140は、時刻マスタの障害時に、時刻マスタの代替機能を達成することとするため、スレーブとなるものとする。以下では、説明の便宜上、通信装置141aをマスタとなるものとする。マスタとなった通信装置141aは、定期的に、Syncパケットをネットワーク142に対してマルチキャスト送信する。   In IEEE 1588, the roles of the master and slave described above are determined in each port of each communication control device 140 and communication device 141 by a BMC (Best Master Clock) algorithm or static setting. At this time, it is assumed that the communication control device 140 becomes a slave in order to achieve an alternative function of the time master when the time master fails. Hereinafter, for convenience of explanation, it is assumed that the communication device 141a is a master. The communication device 141a that becomes the master periodically multicasts Sync packets to the network 142.

まず、時刻マスタ異常判定部150は、時刻マスタが正常かを判定する(S010)。ステップS010において、時刻マスタが正常であると判定された場合には、通信制御装置140は、パケットの受信を待機し(S011)、受信したパケットがSyncであるか判定する(S012)。   First, the time master abnormality determination unit 150 determines whether the time master is normal (S010). If it is determined in step S010 that the time master is normal, the communication control apparatus 140 waits for reception of a packet (S011), and determines whether the received packet is a sync (S012).

ステップS012において、受信したパケットがSyncであると判定された場合には、通信制御装置140は、マスタとして認識した通信装置141aの識別子とシーケンスID、ドメイン番号を記録し(S013)、通常のスレーブと同様にSyncパケットの受信時刻を記録する(S014)。   If it is determined in step S012 that the received packet is a sync, the communication control device 140 records the identifier, sequence ID, and domain number of the communication device 141a recognized as the master (S013), and a normal slave Similarly, the reception time of the Sync packet is recorded (S014).

ここで、通信制御装置140が記録するパラメータについて説明するため、図16を参照して、IEEE1588のヘッダフォーマットについて説明する。   Here, in order to describe the parameters recorded by the communication control apparatus 140, the header format of IEEE 1588 will be described with reference to FIG.

図16に示すように、通信装置141aの識別子は、sourcePortIdentity168であり、シーケンス番号はsequenceId169であり、ドメイン番号はdomainNumber165である。   As illustrated in FIG. 16, the identifier of the communication device 141 a is sourcePortIdentity 168, the sequence number is sequenceId 169, and the domain number is domainNumber 165.

通信制御装置140では、Syncパケットを受信するたびに、時刻マスタパラメータ動的抽出部151がこれらのパラメータを抽出し、パラメータ保存部130に保存する。   In the communication control device 140, every time a Sync packet is received, the time master parameter dynamic extraction unit 151 extracts these parameters and stores them in the parameter storage unit 130.

図15のステップS010において、時刻マスタ異常判定部150が時刻マスタ機能の異常を検知した場合(S010のN)、時刻マスタ代替部152は、パラメータ保存部130に保存されたパラメータを用いて、Syncパケットを生成し(S015)、以降、マスタ機能を代替する(S016)。   In step S010 of FIG. 15, when the time master abnormality determination unit 150 detects an abnormality of the time master function (N in S010), the time master substitution unit 152 uses the parameters stored in the parameter storage unit 130 to perform synchronization. A packet is generated (S015), and thereafter, the master function is replaced (S016).

具体的には、ステップS015において、パラメータ保存部130に保存したsourcePortIdentity168とdomainNumber165を用いてSyncパケットが生成される。また、IEEE1588ではsequenceId169は1ずつインクリメントした数字でなければならないため、時刻マスタパラメータ動的抽出部151が最後に抽出してパラメータ保存部130に保存したsequenceId169の値に1を足した値を用いてSyncパケットを生成する。   Specifically, in step S015, a Sync packet is generated using the source PortIdentity 168 and domainNumber 165 stored in the parameter storage unit 130. Also, in IEEE 1588, sequenceId 169 must be a number incremented by one, so the value obtained by adding 1 to the value of sequenceId 169 last extracted by time master parameter dynamic extraction unit 151 and stored in parameter storage unit 130 is used. Generate a Sync packet.

図15に示す処理は、定期的に実行してもよいし、時刻マスタ異常判定部150が、時刻マスタの判定状態を変更したタイミングで実行してもよい。   The process shown in FIG. 15 may be executed periodically, or may be executed at a timing when the time master abnormality determination unit 150 changes the determination state of the time master.

次に、時刻マスタ異常判定部150の判定基準について説明する。時刻マスタ異常判定部150が時刻マスタを異常と判定する一つの基準は、IEEE1588で規定されている、Announceメーセージを所定周期受信しなかったタイムアウトによって異常と判定してもよい。ただし、この方法は他の通信装置141(スレーブ)でも同様にタイムアウトが発生し、同期用の制御パラメータを初期化し、過渡的な精度低下が発生する可能性がある。   Next, the determination criteria of the time master abnormality determination unit 150 will be described. One criterion by which the time master abnormality determination unit 150 determines that the time master is abnormal may be determined to be abnormal due to a timeout that is defined in IEEE 1588 and has not been received for a predetermined period. However, in this method, a timeout may occur in the other communication device 141 (slave) as well, and the synchronization control parameter may be initialized, resulting in a transient decrease in accuracy.

したがって、Announceメッセージのタイムアウトではなく、Syncパケットを所定期間、あるいは所定周期受信しなかった場合、あるいは所定期間あたりの受信数が所定の閾値以下の場合に異常と判定するようにしてもよい。   Therefore, it may be determined that there is an abnormality when the Sync packet is not received for a predetermined period or a predetermined period, or when the number of receptions per predetermined period is equal to or less than a predetermined threshold instead of the timeout of the Announce message.

または、通信制御装置140から、時刻マスタである通信装置141aにPing等のパケットを通信し、返信がなかった場合、または所定回数連続して受信がなかった場合、または所定期間中の変換回数が所定の閾値以下の場合に異常と判定してもよい。   Alternatively, the communication control device 140 communicates a packet such as Ping to the communication device 141a which is the time master, and when there is no reply, when there is no continuous reception for a predetermined number of times, or the number of conversions during a predetermined period is You may determine with abnormality when it is below a predetermined threshold value.

また、上記数式(8)と同様に、時刻配信パケット(Sync)の受信間隔と、時刻配信パケット上の時刻情報の差分をもとに時刻マスタの異常を判定してもよい。数式(8)は連続して受信した時刻配信パケットを用いて判断しているが、数式(8)の条件を所定回数連続して満足した場合や、(式8)の(Li+1 − Li)−(Ti+1 − Ti)を所定回数計測して算出される統計値(平均値、分散、積分値、合計値等)と所定の閾値を比較することで、時刻マスタを異常と判定してもよい。   Similarly to Equation (8) above, the abnormality of the time master may be determined based on the difference between the reception interval of the time distribution packet (Sync) and the time information on the time distribution packet. Formula (8) is determined using time distribution packets received continuously, but when the condition of Formula (8) is continuously satisfied a predetermined number of times, or (Li + 1−Li of Formula 8). )-(Ti + 1-Ti) is measured a predetermined number of times, and the time master is determined to be abnormal by comparing a statistical value (average value, variance, integral value, total value, etc.) calculated with a predetermined threshold value. May be.

ただし、数式(8)に基づいて判定する場合は通信制御装置140自身の時刻が異常となっている場合もありうる。そのような場合を防止するため、通信制御装置140を多重化し、それぞれの通信制御装置140の判定結果をネットワーク142にブロードキャスト、あるいは通信制御装置140のグループを含めたマルチキャストグループにマルチキャストするようにしてもよい。ブロードキャストまたはマルチキャストされるパケットには、少なくとも判定結果が含まれ、判定した通信制御装置140の識別子が含められてもよい。   However, when determining based on Formula (8), the time of the communication control apparatus 140 itself may be abnormal. In order to prevent such a case, the communication control devices 140 are multiplexed, and the determination result of each communication control device 140 is broadcast to the network 142 or multicast to the multicast group including the group of the communication control devices 140. Also good. The broadcast or multicast packet includes at least the determination result, and may include the identifier of the determined communication control device 140.

また、通信制御装置140ごとに優先度(重み付け)を付与し、該優先度に応じた度合いを点数化して、該パケットに含めてもよい。この優先度は、各通信制御装置140の信頼性設計の度合い(ソフトウェアやハードウェアの冗長度、故障率の組み合わせ等)に基づいて決定してもよい。また、通信制御装置140の(CPU101の性能、メモリ108、不揮発性記憶媒体109の容量、スループットなどの計算機性能に基づいて決定してもよい。また、ネットワーク142中の位置、時刻マスタまでのホップ数、通信遅延、通信帯域、通信媒体をもとに算出した統計値(平均値、最小値、最大値、分散等)に基づいて決定してもよい。また、通信制御装置140が判定した異常要因に点数に反映してもよい。   Further, priority (weighting) may be given to each communication control device 140, and the degree according to the priority may be scored and included in the packet. This priority may be determined based on the degree of reliability design of each communication control device 140 (a combination of software and hardware redundancy, failure rate, etc.). Further, it may be determined based on the computer performance of the communication control device 140 (the performance of the CPU 101, the capacity of the memory 108, the nonvolatile storage medium 109, the throughput, etc. Further, the position in the network 142 and the hop to the time master It may be determined based on statistical values (average value, minimum value, maximum value, variance, etc.) calculated based on the number, communication delay, communication band, communication medium, and the abnormality determined by the communication control device 140 The factor may be reflected in the score.

該パケットを受信した通信制御装置140は、上記の点数が所定の閾値よりも大きい場合、あるいは所定の通信制御装置140が異常と判定した場合、時刻マスタを異常と判定する。   The communication control apparatus 140 that has received the packet determines that the time master is abnormal when the above score is greater than a predetermined threshold value or when the predetermined communication control apparatus 140 determines that the abnormality is abnormal.

上記による時刻マスタの異常判定の場合、通信装置141aは同期パケットを継続して送信し得る。各通信装置141、通信制御装置140が複数の同期パケット(Sync)を受信することを防止するため、通信制御装置140が通信装置141aの送信を停止するように構成してもよい。例えば、同期パケットの送信を停止するmanagementメッセージや独自のTLV(Tag Length Value)メッセージを通信装置141aに送信する。これらのメッセージには、少なくとも同期パケットの送信を停止する内容を含めるようにしてもよい。   In the case of the time master abnormality determination as described above, the communication device 141a can continuously transmit the synchronization packet. In order to prevent each communication device 141 and communication control device 140 from receiving a plurality of synchronization packets (Sync), the communication control device 140 may be configured to stop transmission of the communication device 141a. For example, a management message for stopping the transmission of the synchronization packet or a unique TLV (Tag Length Value) message is transmitted to the communication device 141a. These messages may include at least contents for stopping the transmission of the synchronization packet.

また、SNMP(Simple Network Management Protocol)や、VLAN、IEEE802.1Q等の機能を備えたネットワーク中継装置を用いて(図示なし)、通信装置141aを送信不可とするようにネットワーク中継装置を設定してもよい。また、該ネットワーク中継装置を用いて、時刻配信パケット(Sync)のみをフィルタし、他の通信装置に転送しないように設定してもよい。   In addition, the network relay device is set so that the communication device 141a cannot be transmitted using a network relay device (not shown) having functions such as SNMP (Simple Network Management Protocol), VLAN, IEEE802.1Q, etc. Also good. Alternatively, the network relay device may be used to filter only the time distribution packet (Sync) and not to transfer it to another communication device.

同様に、複数の通信制御装置140を用いて、複数の通信制御装置140が時刻マスタの異常を検知した場合、複数の同期パケット(Sync)が送信される可能性がある。
このような場合を防止するため、上記したように、複数の通信制御装置140に優先度を設け、最も優先度の高い通信制御装置140のみが同期パケットを送信するようにしてもよい。または、優先度の最も高い通信制御装置140がネットワーク中継装置を設定し、他の通信制御装置140が時刻配信パケット(Sync)を送信できないように設定してもよい。このとき、優先度の判定基準として、異常を判定した時刻の早さが考えられ、最も早く時刻マスタの異常を判定した通信制御装置140に最も高い優先度を与えてもよい。
Similarly, when a plurality of communication control devices 140 detect a time master abnormality using a plurality of communication control devices 140, a plurality of synchronization packets (Sync) may be transmitted.
In order to prevent such a case, as described above, priority may be provided to the plurality of communication control devices 140, and only the communication control device 140 with the highest priority may transmit the synchronization packet. Alternatively, the communication control device 140 with the highest priority may set the network relay device, and other communication control devices 140 may be set so that the time distribution packet (Sync) cannot be transmitted. At this time, as a criterion for determining the priority, the time at which the abnormality is determined may be earlier, and the highest priority may be given to the communication control device 140 that has determined the abnormality of the time master earliest.

または、Syncの送信周期、あるいはAnnounceメッセージの送信周期等に基づく所定周期内で、架空のタイムスロットを各通信制御装置140に割り当てる方法が例示される。具体的には、各通信制御装置140が時刻マスタの異常を判定した際に、自身が割り当てられたタイムスロットよりも前のタイムスロットで、他の通信制御装置140が同期パケットを送信していれば、自身は、同期パケットを送信しない。また、他の通信制御装置140が同期パケットを送信していない場合は、自身が同期パケットを送信するようにしてもよい。   Alternatively, a method of allocating a fictitious time slot to each communication control device 140 within a predetermined period based on the transmission period of the Sync or the transmission period of the Announce message is exemplified. Specifically, when each communication control device 140 determines that the time master is abnormal, another communication control device 140 may transmit a synchronization packet in a time slot before the time slot to which it is assigned. For example, it does not send a synchronization packet. Moreover, when the other communication control apparatus 140 is not transmitting the synchronous packet, you may make it transmit a synchronous packet itself.

次に、図17を参照して、通信制御装置140a〜dを用いた場合の動作について説明する。通信制御装置140dに着目した場合、図17(a)では、通信制御装置140bがSyncパケットを送信しているため、通信制御装置140d自身は時刻マスタの異常を判定したとしても同期パケットを送信しない。   Next, with reference to FIG. 17, an operation when the communication control devices 140a to 140d are used will be described. When attention is paid to the communication control device 140d, since the communication control device 140b transmits a Sync packet in FIG. 17A, the communication control device 140d itself does not transmit a synchronization packet even if it determines that the time master is abnormal. .

一方、図17(b)の場合は、通信制御装置140dより前に他の通信制御装置140がSyncパケットを送信していないため、通信制御装置140dが時刻マスタを異常と判定した場合は、通信制御装置140dがSyncパケットを送信する。   On the other hand, in the case of FIG. 17B, since the other communication control device 140 has not transmitted the Sync packet before the communication control device 140d, the communication control device 140d determines that the time master is abnormal. The control device 140d transmits a Sync packet.

なお、タイムスロットの割り当てには、上記した優先度を用いてもよい。また、優先度の決定には動的な基準も含まれるため、図17に示すタイムスロットは動的に構成し、各通信制御装置140に割り当てたタイムスロットを通信してもよい。このようなタイムスロットは、通信制御装置140のいずれかが実行してもよいし、専用の通信装置141が実行してもよい。   The priorities described above may be used for time slot allocation. In addition, since the determination of the priority includes a dynamic reference, the time slots shown in FIG. 17 may be dynamically configured, and the time slots assigned to the communication control devices 140 may be communicated. Such a time slot may be executed by one of the communication control devices 140 or may be executed by a dedicated communication device 141.

なお、各通信制御装置140は、IEEE1588等の時刻同期プロトコルによって同期しているため、図17に示すような同期は、任意のタイミングで開始することができる。したがって、タイムスロットの割り当てを実行する通信装置は、周期の開始時、あるいは、周期の長さを各通信制御装置140に通知する。   Since each communication control device 140 is synchronized by a time synchronization protocol such as IEEE 1588, synchronization as shown in FIG. 17 can be started at an arbitrary timing. Therefore, the communication device that performs time slot allocation notifies each communication control device 140 of the start of the cycle or the length of the cycle.

また、通信制御装置140は、図15のステップS013において、通信装置141a(時刻マスタ)の必要なパラメータを保存した後、常に所定周期でSyncパケットを送信してもよい。このような場合、2つの同一のSyncパケットを受信した通信装置141は、2つのパケットを両方用いてもよいし、片方のみ(例えば、後着廃棄)を用いてもよい。   Further, the communication control apparatus 140 may always transmit the Sync packet at a predetermined cycle after storing necessary parameters of the communication apparatus 141a (time master) in step S013 of FIG. In such a case, the communication device 141 that has received two identical Sync packets may use both of the two packets, or may use only one (for example, late arrival discard).

また、時刻マスタを異常と判定した後に、再び時刻マスタを正常と判定する場合がある。そのような場合、通信制御装置140は、自身の同期パケットの送信を停止してもよいし、継続して同期パケットを送信してもよい。また、時刻マスタ異常判定部150が時刻マスタを正常と判定している間に、時刻マスタに同期してもよい。このように構成することにより、時刻マスタが異常となり、通信制御装置140が代替した場合であっても、同期精度の低下を阻止することができる。   Further, after determining that the time master is abnormal, it may be determined that the time master is normal again. In such a case, the communication control device 140 may stop transmitting its own synchronization packet or may continue to transmit the synchronization packet. The time master abnormality determination unit 150 may synchronize with the time master while the time master is determined to be normal. With this configuration, even if the time master becomes abnormal and the communication control device 140 is substituted, it is possible to prevent a decrease in synchronization accuracy.

また、通信制御装置140は図12に示す機能構成を有するが、通信部131と組み合わせて、時刻マスタ異常判定部150、時刻マスタパラメータ保存部151、パラメータ保存部130、時刻マスタ代替部152のいずれか、または複数を、別の通信装置として構成してもよい。この場合、機能部間の関係や、要求、情報の通知は、ネットワーク142と、ネットワーク142上のパケットとなって実現される。例えば、時刻マスタ異常判定部150の判定結果は、所定のパケットフォーマットとなって、時刻マスタ代替部152となる通信装置に転送される。   The communication control device 140 has the functional configuration shown in FIG. 12, but in combination with the communication unit 131, any one of the time master abnormality determination unit 150, the time master parameter storage unit 151, the parameter storage unit 130, and the time master substitution unit 152. Or more than one may be configured as separate communication devices. In this case, the relationship between the functional units, the request, and the notification of information are realized as a network 142 and a packet on the network 142. For example, the determination result of the time master abnormality determination unit 150 becomes a predetermined packet format and is transferred to the communication device serving as the time master substitution unit 152.

上記したように構成し、例えば、時刻マスタ異常判定部150を複数配置することで、時刻マスタの異常検知率、精度を向上させたり、部分的な機能を専用の高性能装置、あるいは低性能装置に実装させたりすることができ、性能とコストの最適化を調整することができる。   Constructed as described above, for example, by arranging a plurality of time master abnormality determination units 150, the abnormality detection rate and accuracy of the time master are improved, or a partial function is a dedicated high-performance device or a low-performance device. And can optimize performance and cost optimization.

また、複数階層のブロードキャストドメインで構成する場合も、ドメインをまたいで時刻マスタを代替することができる。この場合、各機能部を表す通信装置をドメインごとに管理する。   In addition, even in the case of a multi-level broadcast domain, the time master can be replaced across domains. In this case, the communication device representing each functional unit is managed for each domain.

また、通信制御装置140は、通信装置141a(時刻マスタ)が配信していたAnnounceメッセージを、時刻マスタの代わりに送信してもよい。この場合、時刻マスタ異常判定部150が時刻マスタを正常と判定している間に、通信装置141aより配信されていたAnnounceメッセージを解析し、必要なパラメータをパラメータ保存部130に保存してもよい。   Moreover, the communication control apparatus 140 may transmit the Announce message distributed by the communication apparatus 141a (time master) instead of the time master. In this case, while the time master abnormality determination unit 150 determines that the time master is normal, the Announce message distributed from the communication device 141a may be analyzed and necessary parameters may be stored in the parameter storage unit 130. .

なお、通信制御装置140にGPS(Global Positioning System)を接続し、GPSの時刻を同期させる時刻の基準としてもよい。また、ネットワーク142は任意のトポロジの適用が可能であり、ライントポロジ、スタートポロジやリングトポロジでもよい。リングトポロジの場合は、IEC62439−3のHSR(High Availability Seamless Redundancy)の適用が例示される。   Note that a GPS (Global Positioning System) may be connected to the communication control device 140 and used as a time reference for synchronizing the GPS time. The network 142 can be applied with any topology, and may be a line topology, a star topology, or a ring topology. In the case of a ring topology, application of IEC62439-3 HSR (High Availability Seamless Redundancy) is exemplified.

(2−5)本実施の形態の効果
以上のように、本実施の形態によれば、通信制御装置140を用いて、時刻マスタ機能を冗長化して、時刻同期機能を高信頼化することができる。さらに、時刻マスタの異常を検知して時刻マスタを代替することにより、過渡的な同期精度低下を防止することができる。さらに、動的に時刻マスタが変更する場であっても、時刻マスタ機能を冗長化することができ、通信制御装置140を多重化することにより、代替機能の信頼性を向上させることもできる。
(2-5) Effects of the present embodiment As described above, according to the present embodiment, the time master function can be made redundant by using the communication control device 140 to make the time synchronization function highly reliable. it can. Furthermore, by detecting an abnormality of the time master and substituting the time master, it is possible to prevent a transient decrease in synchronization accuracy. Further, even when the time master is dynamically changed, the time master function can be made redundant, and the reliability of the alternative function can be improved by multiplexing the communication control devices 140.

(3)第3の実施の形態
本実施の形態では、時刻同期プロトコルIEEE1588のBoundary Clock(以下、BCと称して説明する)を用いて、IEEE1588のマスタ、スレーブが複数階層にまたがる場合について説明する。本実施の形態に使用する符号は、特に断りのない限り、上記した第1の実施の形態及び第2の実施の形態で説明した機能や要素等と同一であることを意味する。
(3) Third Embodiment In this embodiment, a case will be described in which the IEEE 1588 master and slaves span multiple hierarchies using the Boundary Clock (hereinafter referred to as BC) of the time synchronization protocol IEEE 1588. . Unless otherwise specified, the reference numerals used in the present embodiment mean the same functions and elements as those described in the first embodiment and the second embodiment described above.

(3−1)ハードウェア構成
(3−1−1)通信システムの構成
図18に、本実施の形態のBC180を用いたシステム構成を示す。図18では、通信装置141aがグランドマスタ(IEEE1588のマスタ、スレーブ階層の最上位のマスタ)であるとする。
(3-1) Hardware Configuration (3-1-1) Communication System Configuration FIG. 18 shows a system configuration using the BC 180 of the present embodiment. In FIG. 18, it is assumed that the communication device 141a is a grand master (an IEEE 1588 master, the highest master in the slave hierarchy).

BC180は、IEEE1588のBCの機能を有し、各通信ポートにBMCアルゴリズム、またはBMCアルゴリズム相当によって、IEEE1588のマスタ、スレーブ等の状態を決定し、時刻同期パケットを通信する。   The BC 180 has an IEEE 1588 BC function, and determines the status of the IEEE 1588 master, slave, etc. to each communication port according to the BMC algorithm or the BMC algorithm, and communicates the time synchronization packet.

ネットワーク中継装置181は、ネットワークスイッチ、ブリッジ、ルータ、IEEE1588のTC(Transparent Clock)、IEEE1588のBC、OpenFlowスイッチ等の各種ネットワーク中継装置である。なお、本実施の形態にかかるBC180を用いてもよい。   The network relay device 181 is various network relay devices such as a network switch, a bridge, a router, an IEEE 1588 TC (Transparent Clock), an IEEE 1588 BC, and an OpenFlow switch. In addition, you may use BC180 concerning this Embodiment.

(3−1−2)Boundary Clockのハードウェア構成
次に、図19を参照して、BC180のハードウェア構成について説明する。図19に示すように、BC180は、CPU101、PHY104、メモリ108、不揮発性記憶媒体109、バス110及び経路制御IC190などから構成される。CPU101、PHY104、メモリ108、不揮発性記憶媒体109及びバス110は、第1の実施の形態と同様のため、詳細な説明は省略する。
(3-1-2) Hardware Configuration of Boundary Clock Next, the hardware configuration of the BC 180 will be described with reference to FIG. As shown in FIG. 19, the BC 180 includes a CPU 101, a PHY 104, a memory 108, a nonvolatile storage medium 109, a bus 110, a path control IC 190, and the like. Since the CPU 101, the PHY 104, the memory 108, the nonvolatile storage medium 109, and the bus 110 are the same as those in the first embodiment, detailed description thereof is omitted.

経路制御IC190は、ネットワークパケットの転送、中継機能を有するとともに、IEEE1588のBC機能を備え、通信ポートごとの状態決定、時刻同期パケットの送受信、タイムスタンプの取得、設定などを実行する。また、PHY104の数は、BC180が備える通信ポートの数だけ必要である。   The route control IC 190 has a network packet transfer and relay function, and also has an IEEE 1588 BC function, and executes state determination for each communication port, transmission / reception of a time synchronization packet, acquisition of a time stamp, setting, and the like. Further, the number of PHYs 104 is required by the number of communication ports included in the BC 180.

(3−2)Boundary Clockの機能構成
次に、図20を参照して、BC180の機能構成について説明する。図20に示すように、BC180は、パラメータ保存部130、通信部131、時刻マスタ異常判定部150、時刻マスタパラメータ動的抽出部151及び時刻マスタ代替部152などから構成される。
(3-2) Functional Configuration of Boundary Clock Next, the functional configuration of the BC 180 will be described with reference to FIG. As shown in FIG. 20, the BC 180 includes a parameter storage unit 130, a communication unit 131, a time master abnormality determination unit 150, a time master parameter dynamic extraction unit 151, a time master substitution unit 152, and the like.

パラメータ保存部130及び通信部131は、第1の実施の形態と同様の機能を有するため、詳細な説明は省略する。なお、通信部131は、図19のPHY104の数と同数である。   Since the parameter storage unit 130 and the communication unit 131 have the same functions as those in the first embodiment, detailed description thereof is omitted. Note that the number of communication units 131 is the same as the number of PHYs 104 in FIG.

BC180では、BMCまたはBMC相当のアルゴリズムにより、ある一つの通信ポートがスレーブとなり、他の通信ポートはマスタとなる。通信部131のうち、グランドマスタ通信装置141aと接続する通信部131がスレーブポートとなる。   In the BC 180, one communication port becomes a slave and the other communication port becomes a master by BMC or an algorithm equivalent to BMC. Of the communication units 131, the communication unit 131 connected to the grand master communication device 141a is a slave port.

時刻マスタパラメータ動的抽出部151は、該通信部131から受信するマスタのパケットから必要なパラメータを抽出して、パラメータ保存部130に依存する。   The time master parameter dynamic extraction unit 151 extracts necessary parameters from the master packet received from the communication unit 131 and depends on the parameter storage unit 130.

時刻マスタ異常判定部150が、通信装置141aを異常と判定した場合、BMCアルゴリズムの再実行により、グランドマスタが他の通信装置となって、過渡的な時刻精度の悪化が発生する可能性がある。そのような場合を防ぐため、時刻マスタ代替部152は、通信装置141aが正常である場合と同様のAnnounceパケットを生成し、通信部131から送信する。また、通信装置141aと同期していた自身の時刻をもとに各ポートのマスタ処理を継続する。   When the time master abnormality determination unit 150 determines that the communication device 141a is abnormal, the grand master may become another communication device due to re-execution of the BMC algorithm, which may cause a transient deterioration in time accuracy. . In order to prevent such a case, the time master substitution unit 152 generates an Announce packet similar to that when the communication device 141a is normal and transmits it from the communication unit 131. Further, the master processing of each port is continued based on the own time synchronized with the communication device 141a.

(3−3)本実施の形態の効果
以上のように、本実施の形態によれば、BC180を複数用いて、IEEE1588のネットワークを階層化した場合であっても、時刻マスタ機能を冗長化して、高信頼化することが可能となる。
(3-3) Effects of this Embodiment As described above, according to this embodiment, even when a plurality of BCs 180 are used and the IEEE 1588 network is hierarchized, the time master function is made redundant. High reliability can be achieved.

120 制御用計算機
121 通信装置
123 通信制御装置
101 CPU
104 PHY
108 メモリ
109 不揮発性記憶媒体
110 バス
111 通信制御部
130 パラメータ保存部
131 通信部
132 時刻マスタ障害判定部
133 時刻配信パケット更新部
120 Computer for Control 121 Communication Device 123 Communication Control Device 101 CPU
104 PHY
DESCRIPTION OF SYMBOLS 108 Memory 109 Nonvolatile storage medium 110 Bus 111 Communication control part 130 Parameter preservation | save part 131 Communication part 132 Time master failure determination part 133 Time distribution packet update part

Claims (20)

ネットワークを介して接続された1または2以上の通信装置と同期パケットを送受信して時刻同期する通信制御装置であって、
第1の通信装置の第1の同期パケットを観測して得られたパラメータとして、前記第1の同期パケットのシーケンス番号を保存するパラメータ保存部と、
前記第1の通信装置の異常が検知された場合に、前記パラメータとしての前記第1の同期パケットのシーケンス番号及び前記通信制御装置自身の時刻情報をもとに第2の同期パケットを生成するパケット生成部と、
前記第2の同期パケットを前記第1の通信装置以外の通信装置に送信する通信部と
を備えることを特徴とする、通信制御装置。
A communication control device that transmits and receives a synchronization packet to and synchronizes time with one or more communication devices connected via a network,
A parameter storage unit that stores a sequence number of the first synchronization packet as a parameter obtained by observing the first synchronization packet of the first communication device;
Packet that generates a second synchronization packet based on the sequence number of the first synchronization packet as the parameter and the time information of the communication control device itself when an abnormality of the first communication device is detected A generator,
A communication control device comprising: a communication unit that transmits the second synchronization packet to a communication device other than the first communication device.
前記パケット生成部は、
前記第1の通信装置の同期した時刻情報をもとに前記第2の同期パケットの時刻情報を生成する
ことを特徴とする、請求項1に記載の通信制御装置。
The packet generator is
2. The communication control device according to claim 1, wherein the time information of the second synchronization packet is generated based on the synchronized time information of the first communication device. 3.
前記第1の通信装置に障害が発生しているかを判定する障害判定部を備え、
前記障害判定部は、
前記第1の同期パケットに含まれる時刻情報が0である場合に、前記第1の通信装置に障害が発生していると判定し、前記第1の通信装置の異常を検知する
ことを特徴とする、請求項1に記載の通信制御装置。
A failure determination unit for determining whether a failure has occurred in the first communication device;
The failure determination unit
When the time information included in the first synchronization packet is 0, it is determined that a failure has occurred in the first communication device, and an abnormality of the first communication device is detected. The communication control device according to claim 1.
前記第1の通信装置に障害が発生しているかを判定する障害判定部を備え、
前記障害判定部は、
前記第1の通信装置が連続して受信する前記第1の同期パケットの受信間隔と、前記第1の同期パケットに含まれる時刻情報の間隔をもとに、前記第1の通信装置の異常を検知する
ことを特徴とする、請求項1に記載の通信制御装置。
A failure determination unit for determining whether a failure has occurred in the first communication device;
The failure determination unit
A reception interval of the first synchronization packet, wherein the first communication apparatus continuously receives, based on the interval of the first time information included in the synchronization packet, the first communication device The communication control device according to claim 1, wherein an abnormality is detected.
前記第1の通信装置に障害が発生しているかを判定する障害判定部を備え、
前記障害判定部は、
前記第1の通信装置が連続して受信する前記第1の同期パケットの受信間隔が、前記第1の同期パケットに含まれる時刻情報の間隔よりも所定の値大きい場合に、前記第1の通信装置の異常を検知する
ことを特徴とする、請求項1に記載の通信制御装置。
A failure determination unit for determining whether a failure has occurred in the first communication device;
The failure determination unit
When the reception interval of said first synchronization packet for a first communication device continuously receives the predetermined value greater than the spacing of the time information included in the first synchronization packet, wherein the first The communication control device according to claim 1, wherein an abnormality of the communication device is detected.
前記第1の通信装置に障害が発生しているかを判定する障害判定部を備え、
前記障害判定部は、
前記第1の同期パケットに含まれる前記パラメータが、所定の期待値と異なる場合に、前記第1の通信装置の異常を検知する
ことを特徴とする、請求項1に記載の通信制御装置。
A failure determination unit for determining whether a failure has occurred in the first communication device;
The failure determination unit
The communication control device according to claim 1, wherein an abnormality of the first communication device is detected when the parameter included in the first synchronization packet is different from a predetermined expected value.
前記第1の通信装置に障害が発生しているかを判定する障害判定部を備え、
前記障害判定部は、
前記第1の同期パケットを所定期間受信しなかった場合に、前記第1の通信装置の異常を検知する
ことを特徴とする、請求項1に記載の通信制御装置。
A failure determination unit for determining whether a failure has occurred in the first communication device;
The failure determination unit
The communication control device according to claim 1, wherein an abnormality of the first communication device is detected when the first synchronization packet is not received for a predetermined period.
前記第1の通信装置に障害が発生しているかを判定する障害判定部を備え、
前記障害判定部は、
前記通信部による前記第1の通信装置との通信結果に基づいて、の通信装置の異常を検知する
ことを特徴とする、請求項1に記載の通信制御装置。
A failure determination unit for determining whether a failure has occurred in the first communication device;
The failure determination unit
The communication control device according to claim 1, wherein an abnormality of another communication device is detected based on a result of communication with the first communication device by the communication unit.
前記障害判定部は、
前記通信部による前記第1の通信装置との通信結果により、前記第1の通信装置からの返信がない場合に、の通信装置の異常を検知する
ことを特徴とする、請求項に記載の通信制御装置。
The failure determination unit
The communication result between the first communication device by the communication unit, when there is no reply from the first communication device, and detecting an abnormality of another communication device, according to claim 8 Communication control device.
前記第1の通信装置に障害が発生しているかを判定する障害判定部を備え、
前記障害判定部により前記第1の通信装置の異常が検知された場合に、
前記通信部は、前記第1の同期パケットを送信不可とする
ことを特徴とする、請求項1に記載の通信制御装置。
A failure determination unit for determining whether a failure has occurred in the first communication device;
When an abnormality of the first communication device is detected by the failure determination unit,
The communication control device according to claim 1, wherein the communication unit disables transmission of the first synchronization packet.
前記第1の通信装置に障害が発生しているかを判定する障害判定部を備え、
前記障害判定部により異常が検知された前記第1の通信装置が正常状態となったと判定された場合に、
前記通信部は、前記第2の同期パケットの送信を停止する
ことを特徴とする、請求項1に記載の通信制御装置。
A failure determination unit for determining whether a failure has occurred in the first communication device;
When it is determined that the first communication device in which an abnormality is detected by the failure determination unit is in a normal state,
The communication control apparatus according to claim 1, wherein the communication unit stops transmission of the second synchronization packet.
前記第1の通信装置に障害が発生しているかを判定する障害判定部を備え、
前記障害判定部により前記第1の通信装置の異常が検知された場合に、
前記通信部は、前記第1の通信装置に代わって前記第1の通信装置との通信遅延、時刻誤差を含む時刻の属性情報を送信する
ことを特徴とする、請求項1に記載の通信制御装置。
A failure determination unit for determining whether a failure has occurred in the first communication device;
When an abnormality of the first communication device is detected by the failure determination unit,
The communication control according to claim 1, wherein the communication unit transmits time attribute information including a communication delay and a time error with the first communication device instead of the first communication device. apparatus.
前記通信部は、
前記第2の同期パケットを所定の周期で送信する
ことを特徴とする、請求項1に記載の通信制御装置。
The communication unit is
The communication control apparatus according to claim 1, wherein the second synchronization packet is transmitted at a predetermined cycle.
前記パケット生成部は、
前記通信制御装置が前記第2の同期パケットを生成したことを示す生成情報を前記第2の同期パケットに含める
ことを特徴とする、請求項1に記載の通信制御装置。
The packet generator is
The communication control device according to claim 1, wherein generation information indicating that the communication control device has generated the second synchronization packet is included in the second synchronization packet.
前記パケット生成部は、
前記第2の同期パケットに前記通信制御装置を識別する識別情報を前記第2の同期パケットに含める
ことを特徴とする、請求項1に記載の通信制御装置。
The packet generator is
The communication control device according to claim 1, wherein identification information for identifying the communication control device is included in the second synchronization packet in the second synchronization packet.
前記通信制御装置は、他の複数の通信制御装置とネットワークを介して接続され、
前記パケット生成部は、
前記他の複数の通信制御装置のうちいずれかの通信制御装置が前記第1の同期パケットを生成した場合に、前記第2の同期パケットを生成しない
ことを特徴とする、請求項1に記載の通信制御装置。
The communication control device is connected to a plurality of other communication control devices via a network,
The packet generator is
The second synchronization packet is not generated when any one of the plurality of other communication control devices generates the first synchronization packet. Communication control device.
前記他の複数の通信制御装置に優先度が設定されている場合に、
前記通信部は、前記設定された優先度が最も高い場合に、前記第2の同期パケットを送信する
ことを特徴とする、請求項1に記載の通信制御装置。
When priority is set for the other plurality of communication control devices,
The communication control apparatus according to claim 1, wherein the communication unit transmits the second synchronization packet when the set priority is the highest.
前記通信部は、前記設定された優先度に基づいて、前記第2の同期パケットを時分割に送信する
ことを特徴とする、請求項17に記載の通信制御装置。
The communication control device according to claim 17 , wherein the communication unit transmits the second synchronization packet in a time division manner based on the set priority.
ネットワーク中継装置を備え、
前記通信部は、前記ネットワーク中継装置を設定して、前記第1の同期パケットを通信不可とする
ことを特徴とする、請求項1に記載の通信制御装置。
A network relay device,
The communication control device according to claim 1, wherein the communication unit sets the network relay device to disable communication of the first synchronization packet.
少なくとも2つの通信装置がネットワークを介して時刻同期する通信システムであって、
一の通信装置の第1の同期パケットを観測して得られたパラメータとして、前記第1の同期パケットのシーケンス番号を保存し、
前記一の通信装置の異常が検知された場合に、他の通信装置が、前記パラメータとしての前記第1の同期パケットのシーケンス番号及び前記他の通信装置の時刻情報をもとに第2の同期パケットを生成し、
前記他の通信装置が前記第2の同期パケットを送信する
ことを特徴とする、通信システム。
A communication system in which at least two communication devices synchronize time via a network,
Storing a sequence number of the first synchronization packet as a parameter obtained by observing the first synchronization packet of one communication device;
When an abnormality of the one communication device is detected, another communication device performs second synchronization based on the sequence number of the first synchronization packet as the parameter and the time information of the other communication device. Generate packets,
The communication system, wherein the other communication device transmits the second synchronization packet.
JP2013055383A 2013-03-18 2013-03-18 Communication control device and communication system Active JP6045950B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013055383A JP6045950B2 (en) 2013-03-18 2013-03-18 Communication control device and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013055383A JP6045950B2 (en) 2013-03-18 2013-03-18 Communication control device and communication system

Publications (2)

Publication Number Publication Date
JP2014183386A JP2014183386A (en) 2014-09-29
JP6045950B2 true JP6045950B2 (en) 2016-12-14

Family

ID=51701731

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013055383A Active JP6045950B2 (en) 2013-03-18 2013-03-18 Communication control device and communication system

Country Status (1)

Country Link
JP (1) JP6045950B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016119616A (en) * 2014-12-22 2016-06-30 富士電機株式会社 Ring type network system, and master node thereof
JP6728842B2 (en) * 2016-03-24 2020-07-22 オムロン株式会社 Optical measuring device
JP2019153941A (en) * 2018-03-02 2019-09-12 株式会社日立製作所 Communication control device and communication control system
JP7304801B2 (en) * 2019-12-12 2023-07-07 三菱電機株式会社 Repeater and communication system
KR102182494B1 (en) * 2020-06-22 2020-11-24 주식회사 플로소프트 EtherCAT network system with noise discrimination function and noise discriminating method of EtherCAT network system
JPWO2023073970A1 (en) * 2021-10-29 2023-05-04

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0630009A (en) * 1992-07-06 1994-02-04 Toshiba Corp Master back-up system for ring-shaped lan
JP5332421B2 (en) * 2008-09-05 2013-11-06 横河電機株式会社 Measurement recorder system
JP5394283B2 (en) * 2010-02-25 2014-01-22 株式会社日立産機システム Information processing apparatus and control network system
JP5649505B2 (en) * 2011-04-19 2015-01-07 株式会社東芝 Synchronous control system
CN102325019B (en) * 2011-08-23 2014-10-15 西安电子科技大学 Clock synchronization method of real-time industrial Ethernet EtherCAT redundant system

Also Published As

Publication number Publication date
JP2014183386A (en) 2014-09-29

Similar Documents

Publication Publication Date Title
JP6045950B2 (en) Communication control device and communication system
US11496235B2 (en) Symmetric path/link over LAG interface using LLDP for time synchronization between two nodes using PTP
JP5923430B2 (en) Communication control device
US20130227008A1 (en) Clock synchronization based on predefined grandmaster
EP3163786B1 (en) Clock synchronization method and apparatus
JP7423249B2 (en) Control device and distributed control system
JP5891086B2 (en) Communication control system, communication control device, and controlled device
JP5127482B2 (en) Timing synchronization method, synchronization apparatus, synchronization system, and synchronization program
JP2013104772A (en) Frame transmission device and synchronization method
JP6709086B2 (en) Communication control device and communication control method
JP5120097B2 (en) Time synchronization system and time synchronization apparatus
JP6231453B2 (en) Communication control device
JP2014127887A (en) Communication control device
WO2016002367A1 (en) Communication system, communication method, and communication program
WO2019167415A1 (en) Communication control device and communication control system
US11916768B2 (en) Information sharing method and apparatus in redundancy network, and computer storage medium
EP2698949B1 (en) METHOD AND SYSTEM FOR SETTING DETECTION FRAME TIMEOUT DURATION OF ETHERNET NODEs
CN214627023U (en) Switching equipment compatible with definable deterministic communication Ethernet
JP7330329B2 (en) Communication control device and communication control system
JP7451721B2 (en) Clock port attribute recovery methods, devices, and systems
JP2019110410A (en) Network device
JP6326474B2 (en) Communication control device
JP2016165034A (en) Synchronous network, communication device, synchronization method, and synchronization program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150310

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160329

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160523

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: 20161101

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161116

R150 Certificate of patent or registration of utility model

Ref document number: 6045950

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150