JP7330329B2 - Communication control device and communication control system - Google Patents

Communication control device and communication control system Download PDF

Info

Publication number
JP7330329B2
JP7330329B2 JP2022081517A JP2022081517A JP7330329B2 JP 7330329 B2 JP7330329 B2 JP 7330329B2 JP 2022081517 A JP2022081517 A JP 2022081517A JP 2022081517 A JP2022081517 A JP 2022081517A JP 7330329 B2 JP7330329 B2 JP 7330329B2
Authority
JP
Japan
Prior art keywords
communication
packet
transmission
synchronization
transmitting
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
JP2022081517A
Other languages
Japanese (ja)
Other versions
JP2022103347A (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
Priority claimed from JP2018038104A external-priority patent/JP2019153941A/en
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2022081517A priority Critical patent/JP7330329B2/en
Publication of JP2022103347A publication Critical patent/JP2022103347A/en
Application granted granted Critical
Publication of JP7330329B2 publication Critical patent/JP7330329B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、通信制御装置及び通信制御システムに関する。 The present invention relates to a communication control device and a communication control system.

制御システムとして、制御用計算機が、ネットワークを介して単一または複数の制御対象を制御する構成がある。このような制御システムにおいては、実現するアプリケーションに応じて、接続装置間の時刻を同期することが求められる場合がある。ネットワークで接続された分散制御システムの場合は、ネットワークを介した時刻同期パケットの送受信によって、時刻を同期することができる。 As a control system, there is a configuration in which a control computer controls a single or a plurality of controlled objects via a network. In such a control system, it may be required to synchronize the time between connected devices according to the application to be implemented. In the case of a distributed control system connected by a network, the time can be synchronized by sending and receiving time synchronization packets over the network.

電力系統の監視制御装置や保護制御装置を例にとれば、電流差動保護方式では複数点での同時刻の電流値を比較して事故判定するため、時刻同期が求められる。地絡事故の発生箇所を特定する故障点標定装置においても同様である。産業用製造装置の場合、ロボットアーム、チップマウンタ、工作機械テーブル等の制御対象を複数のサーボモータで動作させる。制御対象に所望の動作をさせるためには、それらの複数のサーボモータを同期して制御する必要がある。この他にも、時刻同期の応用としては、計測、測定の分野や、マルチメディア、無線通信等の基地局がある。 Taking the monitoring control device and the protection control device of an electric power system as an example, time synchronization is required in the current differential protection method because the current value at the same time at a plurality of points is compared to determine an accident. The same applies to the failure point locating device that identifies the location of the ground fault. In the case of industrial manufacturing equipment, a robot arm, a chip mounter, a machine tool table, and other objects to be controlled are operated by a plurality of servomotors. In order to cause a controlled object to perform a desired operation, it is necessary to synchronously control the plurality of servomotors. Other applications of time synchronization include the fields of measurement and measurement, and base stations for multimedia and wireless communications.

ネットワークを用いた時刻同期方式として、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), IEC61158, Communication Profile Family 12 of IEC61784-2 (hereinafter referred to as EtherCAT (registered trademark)), IEEE1588, etc. list be done.

これらのプロトコルに共通する点は、ネットワーク上で時刻情報パケットをやりとりすることで、通信装置間の通信遅延を計測し、時刻を同期するものである。このとき、ネットワーク上で、基準となる時刻情報を提供する通信装置(以下、時刻マスタとする)を決め、残りの通信装置(以下、時刻スレーブとする)が時刻マスタへ同期する。なお、時刻マスタ、時刻スレーブは役割であって、時刻同期プロトコルによって、通信装置は動的に時刻マスタ、時刻スレーブのいずれにもなりうる。 What these protocols have in common is that time information packets are exchanged over a network to measure communication delays between communication devices and synchronize time. At this time, a communication device (hereinafter referred to as a time master) that provides reference time information is determined on the network, and the remaining communication devices (hereinafter referred to as time slaves) synchronize with the time master. Note that the time master and the time slave are roles, and the communication device can dynamically become either the time master or the time slave according to the time synchronization protocol.

同時に、このようなネットワークで接続される制御システムは、制御処理を高信頼に実行するために通信経路の冗長化がなされることがある。特に異常発生時に制御処理が正しく実行されないことで多大な被害を及ぼす場合は、このような処置がなされる。通信経路の異常としては、通信ケーブルの断線や接触不良、コネクタ、ケーブルの脱離が例示される。 At the same time, a control system connected by such a network may have redundant communication paths in order to perform control processing with high reliability. In particular, such measures are taken when a large amount of damage is caused by the control processing not being executed correctly when an abnormality occurs. An abnormality in the communication path is exemplified by disconnection or poor contact of the communication cable, and detachment of the connector or cable.

冗長化した経路の利用方法は、障害発生時に冗長経路を利用する方式と、冗長経路を常時用いる方式がある。 Methods of using redundant routes include a method of using a redundant route when a failure occurs and a method of using a redundant route all the time.

前者の一例としては、IEEE802.17のRPR(Resilient Packet Ring)方式があり、後者の例としては、IEC62439-3におけるHSR(High availability Seamless Ring)、PRP(Parallel Redundancy Protocol)と呼ばれる方式がある。IEEE802.17は、障害復帰時間が0ではないが、効率よくネットワーク回線の帯域を利用できる。一方、PRPとHSRは、常時、冗長経路を利用するため、通信帯域の利用効率は下がるが、障害復帰時間が0である。障害復帰時間が0であるため、PRP、HSRは制御システムに適している。RPR、HSRは、ネットワークを構成するノードがリングトポロジを構成するリングネットワークである。 An example of the former is the RPR (Resilient Packet Ring) system of IEEE802.17, and an example of the latter is a system called HSR (High Availability Seamless Ring) and PRP (Parallel Redundancy Protocol) in IEC62439-3. Although IEEE 802.17 does not have a failure recovery time of 0, it can efficiently use the bandwidth of the network line. On the other hand, since the PRP and HSR always use redundant paths, the communication band utilization efficiency decreases, but the failure recovery time is zero. Since the failure recovery time is 0, PRP, HSR are suitable for control systems. RPR and HSR are ring networks in which nodes forming a network form a ring topology.

これらのネットワークは、製造装置、工作機械、プラントにおける制御装置(コントローラ)、PLC(Programmable Logic Controller)、電力系統におけるIED(Intelligent Electronic Device)や保護制御装置を含め、通信機器を接続するネットワークに適用可能である。 These networks are applied to networks that connect communication devices, including manufacturing equipment, machine tools, control devices (controllers) in plants, PLCs (Programmable Logic Controllers), IEDs (Intelligent Electronic Devices) in electric power systems, and protective control devices. It is possible.

例えば、リアルタイムEthernetであるEtherCAT(登録商標:IEC61784パート2のCommunication Profile Family 12)について説明する。EtherCATでは、制御用計算機であるマスタと制御対象に備え付けられるスレーブデバイス(以下、スレーブとする)でリングトポロジを構成する。一般に、スレーブでは2つのEthernetポートを有し、これを接続していくことでリングトポロジを構成する。加えて、マスタにEthernetの通信ポートを2つ持たせることで、リングトポロジへの接続を冗長化させる方式がとられる。物理的にEtherCATマスタに2つの通信ポートを持たせた場合、冗長化の方法として2つの通信ポートの両方から同一のパケットを送信する。なお、時刻同期に関する技術として、特許文献1が挙げられ、ネットワークシステムに関する技術として、特許文献2が挙げられる。 For example, EtherCAT (registered trademark: Communication Profile Family 12 of IEC61784 Part 2), which is a real-time Ethernet, will be described. In EtherCAT, a ring topology is configured with a master, which is a computer for control, and a slave device (hereinafter referred to as a slave) provided to a controlled object. In general, a slave has two Ethernet ports, which are connected to form a ring topology. In addition, a method is adopted in which the master has two Ethernet communication ports to make the connection to the ring topology redundant. When the EtherCAT master is physically provided with two communication ports, the same packet is transmitted from both of the two communication ports as a redundancy method. In addition, Patent Literature 1 is cited as a technology related to time synchronization, and Patent Literature 2 is cited as a technology related to a network system.

特開2012-023654号公報JP 2012-023654 A 特開2015-103978号公報JP 2015-103978 A

しかしながら、一般に時刻同期と経路冗長化の両立は困難である。これは、ネットワークを用いた時刻同期プロトコルにおいて、通信遅延が特定の通信経路に依存する一方で、通信経路の冗長化は、経路異常発生時に代替経路を用いるため、通信経路の遅延が変化するためである。 However, it is generally difficult to achieve both time synchronization and path redundancy. This is because in a time synchronization protocol using a network, while communication delays depend on specific communication routes, communication route redundancy uses an alternative route in the event of a route abnormality, so communication route delays change. is.

特許文献1は、マスタを複数用意することで時刻同期システムを高信頼化している。全てのスレーブ装置において、マスタの優先度を決定する変更が必要であり、IEEE 1588等の標準規格準拠機器を用いる場合よりもシステム構築において高コストとなる。 Patent Literature 1 makes the time synchronization system highly reliable by preparing a plurality of masters. All slave devices need to be changed to determine the priority of the master, and the cost of system construction is higher than when standard compliant devices such as IEEE 1588 are used.

特許文献2は、IEC 62439-3に対して、中継装置を用いて通信経路を冗長化することが示されている。中継装置が時刻同期プロトコルに対応している場合や、中継装置の通過遅延が一定、あるいは同期の要求精度に対して極めて短いとみなせる場合は時刻同期が可能である。しかしながら、冗長経路を用いて、かつ、中継装置に汎用機器(IEEE 1588未対応)を用いた場合に変化する通信遅延が補正されないため、同期精度が低下する懸念がある。 Patent Literature 2 discloses that a communication path is made redundant using a relay device for IEC 62439-3. Time synchronization is possible when the relay device supports a time synchronization protocol, or when the passage delay of the relay device is constant or can be regarded as extremely short relative to the accuracy required for synchronization. However, since the communication delay that changes when a redundant path is used and a general-purpose device (not compatible with IEEE 1588) is used as a relay device is not corrected, there is a concern that the synchronization accuracy may deteriorate.

本発明の目的は、経路冗長化により高信頼化が実現されるネットワークであっても、時刻同期が可能になる通信制御装置及び通信制御システムを提供することにある。 SUMMARY OF THE INVENTION An object of the present invention is to provide a communication control device and a communication control system that enable time synchronization even in a network in which high reliability is achieved by path redundancy.

本発明は、上記課題を解決するために、時刻情報を含む同期パケットの通信経路を構成するネットワークの状況を監視し、前記同期パケットの通信経路として、少なくとも第一の通信経路に対して冗長化された第二の通信経路を含む場合、前記第一の通信経路を前記同期パケットが通信する際の第一の通信遅延と、前記第二の通信経路を前記同期パケットが通信する際の第二の通信遅延との遅延変化分を基に前記同期パケットに属する前記時刻情報を補正し、前記送受信手段のうち前記第一の通信経路に接続される第一の送受信手段の受信した前記同期パケットを判別して経路異常と判定した場合、前記第一の送受信手段の受信した前記同期パケットに属する前記時刻情報を、前記遅延変化分を基に補正し、補正された前記時刻情報を含む前記同期パケットを前記第二の通信経路に接続される第二の送受信手段を介して前記第二の通信経路に送信し、計時の要否と、前記第一の送受信手段での受信後の前記同期パケットの転送先と、前記第二の送受信手段での受信後の前記同期パケットの転送先と、前記第二の送受信手段による送信の要否をそれぞれ識別する識別子を前記同期パケットに関連づけて記憶し、前記第一の送受信手段又は前記第二の送受信手段が前記同期パケットを受信した際に、前記識別子に基づいて、前記同期パケットの受信、前記同期パケットの破棄或いは前記同期パケットの転送のうち少なくとも一つの処理を実行することを特徴とする。 In order to solve the above problems, the present invention monitors the status of a network that constitutes a communication path for a synchronous packet containing time information, and provides redundancy for at least a first communication path as the communication path for the synchronous packet. when the second communication path is included, a first communication delay when the synchronization packet communicates over the first communication path and a second communication delay when the synchronization packet communicates over the second communication path correcting the time information belonging to the synchronous packet based on the delay change from the communication delay of , and correcting the synchronous packet received by the first transmitting/receiving means connected to the first communication path among the transmitting/receiving means When it is determined that there is a path abnormality, the time information belonging to the synchronization packet received by the first transmitting/receiving means is corrected based on the delay variation, and the synchronization packet containing the corrected time information. is transmitted to the second communication path via the second transmission/reception means connected to the second communication path, and whether timing is necessary and whether the synchronization packet after reception by the first transmission/reception means a transfer destination, a transfer destination of the synchronous packet after reception by the second transmitting/receiving means, and an identifier for identifying each of the necessity of transmission by the second transmitting/receiving means, are associated with the synchronous packet and stored; When the first transmitting/receiving means or the second transmitting/receiving means receives the synchronization packet, at least one of reception of the synchronization packet, discarding of the synchronization packet, or transfer of the synchronization packet is performed based on the identifier. It is characterized by executing processing.

本発明によれば、経路冗長化により高信頼化が実現されるネットワークであっても、時刻同期が可能になる通信制御装置及び通信制御システムを提供できる。 According to the present invention, it is possible to provide a communication control device and a communication control system that enable time synchronization even in a network in which high reliability is achieved by path redundancy.

本発明の第一実施例におけるシステム構成図である。1 is a system configuration diagram in a first embodiment of the present invention; FIG. 本発明の第一実施例でのハードウェア構成図である。It is a hardware block diagram in 1st Example of this invention. 本発明の第一実施例を示す機能構成図である。1 is a functional configuration diagram showing a first embodiment of the present invention; FIG. 本発明の第一実施例におけるネットワーク中継装置の設定を示した説明図である。FIG. 4 is an explanatory diagram showing settings of a network relay device according to the first embodiment of the present invention; 本発明の第一実施例における通信装置の設定を示した説明図である。FIG. 4 is an explanatory diagram showing settings of the communication device in the first embodiment of the present invention; 本発明の第一実施例における実行手順を示したフローチャートである。It is the flowchart which showed the execution procedure in 1st Example of this invention. 本発明の第一実施例における実行手順を示したフローチャートである。It is the flowchart which showed the execution procedure in 1st Example of this invention. 本発明の第一実施例におけるネットワーク中継装置の設定を示した説明図である。FIG. 4 is an explanatory diagram showing settings of a network relay device according to the first embodiment of the present invention; 本発明の第一実施例におけるネットワーク中継装置の設定を示した説明図である。FIG. 4 is an explanatory diagram showing settings of a network relay device according to the first embodiment of the present invention; 本発明の第一実施例の動作を示した説明図である。FIG. 4 is an explanatory diagram showing the operation of the first embodiment of the present invention; IEEE 1588メッセージを示した構成図である。1 is a configuration diagram showing an IEEE 1588 message; FIG. 本発明の第二実施例を用いたシステム構成図である。It is a system block diagram using the 2nd Example of this invention. 本発明の第二実施例でのハードウェア構成図である。It is a hardware block diagram in 2nd Example of this invention. 本発明の第二実施例を示す機能構成図である。It is a functional block diagram which shows 2nd Example of this invention. EtherCATスレーブのハードウェア構成図である。3 is a hardware configuration diagram of an EtherCAT slave; FIG. EtherCATのスレーブICの機能構成図である。1 is a functional configuration diagram of an EtherCAT slave IC; FIG. 時刻同期における通信遅延の計測方法を示した説明図である。It is explanatory drawing which showed the measuring method of the communication delay in time synchronization. 本発明の第二実施例におけるパケットの通信経路を示した説明図である。FIG. 9 is an explanatory diagram showing communication paths of packets in the second embodiment of the present invention; 本発明の第二実施例におけるパケットの通信経路を示した説明図である。FIG. 9 is an explanatory diagram showing communication paths of packets in the second embodiment of the present invention; EtherCATフレームのフォーマットを示した構成図である。1 is a configuration diagram showing a format of an EtherCAT frame; FIG. 本発明の第二実施例におけるパケットへの識別子を示した説明図である。FIG. 9 is an explanatory diagram showing identifiers for packets in the second embodiment of the present invention; 本発明の第二実施例の動作を示した図であって、(a)は、主ポートでの受信時の説明図、(b)は、冗長ポートでの受信時の説明図である。FIG. 10 is a diagram showing the operation of the second embodiment of the present invention, where (a) is an explanatory diagram for reception at the main port, and (b) is an explanatory diagram for reception at the redundant port; 本発明の第二実施例におけるパケットの通信経路を示した説明図である。FIG. 9 is an explanatory diagram showing communication paths of packets in the second embodiment of the present invention; 本発明の第二実施例の動作を示した説明図である。FIG. 5 is an explanatory diagram showing the operation of the second embodiment of the present invention; 本発明の第三実施例におけるパケットの通信経路を示した説明図である。FIG. 11 is an explanatory diagram showing communication paths of packets in the third embodiment of the present invention; 本発明の第四実施例におけるシステム構成図である。It is a system block diagram in the 4th Example of this invention. 本発明の第四実施例におけるパケットの通信経路を示した説明図である。FIG. 12 is an explanatory diagram showing communication paths of packets in the fourth embodiment of the present invention; 本発明の第五実施例におけるシステム構成図である。It is a system block diagram in the 5th Example of this invention.

制御用ネットワークに接続された制御用計算機。 A control computer connected to a control network.

(システム例)
本発明を適用した第一実施例におけるシステム構成を図1に示す。通信装置120a~120l(以下、通信装置120a~120lを総称して通信装置120と称することがある。)は、ネットワーク122、ネットワーク中継装置121a~121h(以下、ネットワーク中継装置121a~121hを総称してネットワーク中継装置121と称することがある。)を介して、他の通信装置120と接続し、通信する。
(System example)
FIG. 1 shows the system configuration in the first embodiment to which the present invention is applied. Communication devices 120a to 120l (hereinbelow, communication devices 120a to 120l may be collectively referred to as communication device 120), network 122, network relay devices 121a to 121h (hereinafter, network relay devices 121a to 121h are collectively referred to as communication device 120). (hereinafter sometimes referred to as a network relay device 121).

通信装置120は、IEC62439-3で定義されるHSRノード(DANH:Double attached node implementing HSR)を一例として、本発明の効果を説明する。 The communication device 120 will be described with an HSR node (DANH: Double attached node implementing HSR) defined by IEC62439-3 as an example.

通信装置120は、HSRに対応した装置であり、他の通信装置120に対して、パケットを送受信することにより、制御指令値の伝送、計測値の取得や各種設定を実行する。 The communication device 120 is a device compatible with HSR, and by transmitting and receiving packets to and from other communication devices 120, transmits control command values, acquires measurement values, and performs various settings.

通信装置120は、電力系統の保護制御装置のように、各制御システム内のサンプリングデータや、制御指令、状態信号をやりとりすることが例示される。同一制御システム内のデータをパケット内に格納してもよい。 The communication device 120 is exemplified by exchanging sampling data, control commands, and state signals in each control system, like a protection control device for a power system. Data within the same control system may be stored in packets.

通信装置120として、専用コントローラ、産業用パソコン、制御用計算機、IED(Intelligent Electronic Device)、保護制御装置が例示される。 Examples of the communication device 120 include a dedicated controller, an industrial personal computer, a control computer, an IED (Intelligent Electronic Device), and a protection control device.

ネットワーク中継装置121は、ネットワーク122における中継装置であり、通信装置120やネットワーク中継装置121の通信する同期パケット(以下、パケットと称することもある。)を経路制御し、転送する。ネットワーク中継装置121として、L2スイッチ、L3スイッチを含むネットワークスイッチ、ブリッジ、ルータ、IEEE 1588のTC(Transparent Clock)、BC(Boundary Clock)、OpenFlowスイッチ、IEC 62439-3で定義されるRedBox、QuadBox、光スイッチ、光合波器、光分波器等の各種ネットワーク中継装置が例示される。通信装置120とネットワーク中継装置121は、後述するように、いずれも、同期パケットを送受信する1又は2以上の送受信手段と、送受信手段の受信した同期パケットを処理する処理手段とを有する通信制御装置としての機能を有している。 The network relay device 121 is a relay device in the network 122, and routes and transfers synchronous packets (hereinafter also referred to as packets) communicated by the communication device 120 and the network relay device 121. FIG. As the network relay device 121, network switches including L2 switches and L3 switches, bridges, routers, IEEE 1588 TC (Transparent Clock), BC (Boundary Clock), OpenFlow switches, RedBox defined by IEC 62439-3, QuadBox, Examples include various network repeaters such as optical switches, optical multiplexers, and optical demultiplexers. As will be described later, each of the communication device 120 and the network relay device 121 is a communication control device having one or more transmitting/receiving means for transmitting/receiving synchronous packets and processing means for processing the synchronous packets received by the transmitting/receiving means. It has a function as

ネットワーク122は、時刻情報を含む同期パケットの通信経路を構成するネットワークであって、通信装置120、ネットワーク中継装置121を接続するネットワークであり、IEEE 802.3(Ethernet)、IEC61784、IEC61158で定義される制御用ネットワークを含む各種産業用ネットワーク、リングネットワーク、IEEE802.17等を含む。 The network 122 is a network that constitutes a communication path of a synchronous packet containing time information, is a network that connects the communication device 120 and the network relay device 121, and is defined by IEEE 802.3 (Ethernet), IEC61784, and IEC61158. various industrial networks including control networks, ring networks, IEEE802.17, etc.

なお、図1では、ネットワーク中継装置121間に3つの通信装置120を接続しているが、異なる数でもよいし、各中継装置121間の通信装置120の数が拠点ごとに異なっていてもよい。例えば、ネットワーク中継装置121aとネットワーク中継装置121hの間は、通信装置120が1台、ネットワーク中継装置121bとネットワーク中継装置121cの間が4台であってもよい。 Although three communication devices 120 are connected between the network relay devices 121 in FIG. 1, the number may be different, and the number of communication devices 120 between the relay devices 121 may be different for each site. . For example, one communication device 120 may be provided between the network relay devices 121a and 121h, and four communication devices may be provided between the network relay devices 121b and 121c.

また、図1では、リングネットワークを構成する通信装置120間を2つのネットワーク中継装置121で接続している(例えば、通信装置120aと通信装置120c間をネットワーク中継装置121aとネットワーク中継装置121hで接続)が、ネットワーク中継装置121の数は一つでも、複数でもよい。 Also, in FIG. 1, two network relay devices 121 connect the communication devices 120 forming the ring network (for example, the network relay device 121a and the network relay device 121h connect the communication device 120a and the communication device 120c). ), the number of network relay devices 121 may be one or plural.

図1に示すシステム構成として、電力分野の監視制御・保護制御システムや、産業用機器、半導体製造装置、車載システム、建設機械や鉄道車両内の制御システム、鉄道地上信号システム、航空機内の制御システムなどの通信制御システムが例示される。あるいは、ネットワーク122を介して収集した情報をもとに、通信装置120あるいは、図示していないクラウドやコンピュータ上で人工知能にて解析し、制御システムの性能向上を図るIoT(Internet of Things)システムなどが例示される。 The system configuration shown in FIG. 1 includes supervisory control and protection control systems in the electric power field, industrial equipment, semiconductor manufacturing equipment, vehicle-mounted systems, control systems in construction machinery and railway vehicles, railway ground signal systems, and control systems in aircraft. and other communication control systems are exemplified. Alternatively, based on information collected via the network 122, an IoT (Internet of Things) system that analyzes with artificial intelligence on the communication device 120 or a cloud or computer (not shown) to improve the performance of the control system. etc. are exemplified.

(ハード構成)
図2に通信装置120のハードウェア構成を示す。
(hardware configuration)
FIG. 2 shows the hardware configuration of the communication device 120. As shown in FIG.

通信装置120は、CPU(Central Processing Unit)101、通信制御部102、複数の送受信機(以下、PHYと称することがある。)103、メモリ104、不揮発性記憶媒体105、バス106から構成される。CPU101、須通信制御部102、メモリ104、不揮発性記憶媒体105は、処理手段に属する要素として構成され、複数のPHY103は、送受信手段に属する要素として構成される。 The communication device 120 includes a CPU (Central Processing Unit) 101, a communication control unit 102, a plurality of transceivers (hereinafter sometimes referred to as PHY) 103, a memory 104, a nonvolatile storage medium 105, and a bus 106. . The CPU 101, the communication control unit 102, the memory 104, and the non-volatile storage medium 105 are configured as elements belonging to the processing means, and the plurality of PHYs 103 are configured as elements belonging to the transmitting/receiving means.

CPU101は、不揮発性記憶媒体105からプログラムをメモリ104に転送して実行する。実行処理プログラムとしては、オペレーティングシステム(以下、OSと称す)やOS上で動作するアプリケーションプログラムが例示される。CPU101上で動作するプログラムは、通信制御部102の動作設定や、状態情報を取得する。 The CPU 101 transfers the program from the nonvolatile storage medium 105 to the memory 104 and executes it. Examples of the execution processing program include an operating system (hereinafter referred to as OS) and an application program that runs on the OS. A program running on the CPU 101 acquires operation settings and status information of the communication control unit 102 .

通信制御部102は、IEC62439-3のHSRの通信機能を提供するIC(Integrated Circuit)である。 The communication control unit 102 is an IC (Integrated Circuit) that provides the HSR communication function of IEC62439-3.

PHY103は、ネットワーク122との通信機能を実装した送受信機ICである。PHY103の提供する通信規格としてIEEE 802.3のPHY(物理層)チップが例示される。なお、図2の構成では、PHY103と通信制御部102が接続しているので、IEEE 802.3のMAC(Media Access Control)層の処理は通信制御部102に含まれる。ただし、MAC機能を提供するICを通信制御部102とPHY103間に配置する構成や、MAC機能を提供するICとPHY103を組み合わせた通信用ICと通信制御部102を接続する構成においても、本発明の効果は失われるものではない。なお、PHY103は、通信制御部102に含まれていてもよい。 The PHY 103 is a transmitter/receiver IC that implements a communication function with the network 122 . An IEEE 802.3 PHY (physical layer) chip is exemplified as a communication standard provided by the PHY 103 . In the configuration of FIG. 2 , the PHY 103 and the communication control unit 102 are connected, so the processing of the MAC (Media Access Control) layer of IEEE 802.3 is included in the communication control unit 102 . However, in a configuration in which an IC that provides the MAC function is arranged between the communication control unit 102 and the PHY 103, or in a configuration in which the communication IC that combines the IC that provides the MAC function and the PHY 103 is connected to the communication control unit 102, the present invention can be applied. effect is not lost. PHY 103 may be included in communication control unit 102 .

メモリ104は、CPU101が動作するための一時的な記憶領域であり、不揮発性記憶媒体105から転送したOS、アプリケーションプログラム等が格納される。また、図2の構成では、PHY103を2つ示しているが、PHY103の数は、通信制御部102が対応する通信ポート数と同じである。 The memory 104 is a temporary storage area for the CPU 101 to operate, and stores the OS, application programs, etc. transferred from the non-volatile storage medium 105 . Also, although two PHYs 103 are shown in the configuration of FIG.

不揮発性記憶媒体105は、情報の記憶媒体で、OS、アプリケーション、デバイスドライバ等や、CPU101を動作させるためのプログラムの保存、プログラムの実行結果の保存に利用される。不揮発性記憶媒体105として、ハードディスクドライブ(HDD)やソリッドステートドライブ(SSD)、フラッシュメモリが例示される。また、取り外しが容易な外部記憶媒体として、フロッピーディスク(FD)、CD(Compact Disc)、DVD(Digital Video Disc)、ブルーレイ(登録商標)、USB(Universal Serial Bus)メモリ、コンパクトフラッシュ(登録商標)等の利用が例示される。 The nonvolatile storage medium 105 is an information storage medium, and is used to store the OS, applications, device drivers, programs for operating the CPU 101, and the execution results of the programs. Examples of the nonvolatile storage medium 105 include a hard disk drive (HDD), solid state drive (SSD), and flash memory. In addition, external storage media that can be easily removed include a floppy disk (FD), a CD (Compact Disc), a DVD (Digital Video Disc), a Blu-ray (registered trademark), a USB (Universal Serial Bus) memory, and a compact flash (registered trademark). etc. is exemplified.

バス106は、CPU101、通信制御部102、メモリ104、不揮発性記憶媒体105をそれぞれ接続する。バス106としては、PCI(Peripheral Component Interconnect)バス、ISA(Industry Standard Architecture)バス、PCI Expressバス、システムバス、メモリバス等が例示される。 A bus 106 connects the CPU 101, the communication control unit 102, the memory 104, and the nonvolatile storage medium 105, respectively. Examples of the bus 106 include a PCI (Peripheral Component Interconnect) bus, an ISA (Industry Standard Architecture) bus, a PCI Express bus, a system bus, a memory bus, and the like.

(HSR機能ブロックの構成)
通信制御部102の機能構成を図3に示す。
(Configuration of HSR function block)
FIG. 3 shows the functional configuration of the communication control unit 102. As shown in FIG.

通信制御部102は、送信制御部130、受信制御部131、送信部132(132a、132b)、受信部133(133a、133b)、マルチプレクサ(MUX)136(136a、136b)、システム識別子137、システム識別子変換部138、ネットワーク中継装置設定部139、グループ位置識別子140を備え、送信制御部130がマルチプレクサ(MUX)136(136a、136b)及びバス134に接続され、受信制御部131がマルチプレクサ(MUX)136(136a、136b)と受信部133(133a、133b)及バス135に接続され、マルチプレクサ(MUX)136(136a、136b)が送信部132a又は送信部132bに接続されている。この際、送信制御部130と受信制御部131が、時刻補正部として機能する。 The communication control unit 102 includes a transmission control unit 130, a reception control unit 131, a transmission unit 132 (132a, 132b), a reception unit 133 (133a, 133b), a multiplexer (MUX) 136 (136a, 136b), a system identifier 137, a system Identifier conversion unit 138, network relay device setting unit 139, group location identifier 140, transmission control unit 130 is connected to multiplexer (MUX) 136 (136a, 136b) and bus 134, reception control unit 131 is connected to multiplexer (MUX) 136 (136a, 136b), the receivers 133 (133a, 133b) and the bus 135, and multiplexers (MUX) 136 (136a, 136b) are connected to the transmitters 132a and 132b. At this time, the transmission control section 130 and the reception control section 131 function as a time correction section.

送信制御部130は、バス134から通知されたデータ、あるいはパケットを加工し、送信部132a、送信部132bのいずれか、または両方へ送信する。送信制御部130の加工処理は、データからフレームを生成する処理や、データまたはパケットの複製、所定のタグを追加することや、CRC(Cyclic Redundancy Check)などの異常診断データの計算と付加が例示される。 The transmission control unit 130 processes data or packets notified from the bus 134 and transmits them to either or both of the transmission unit 132a and the transmission unit 132b. Examples of processing by the transmission control unit 130 include processing to generate a frame from data, duplication of data or packets, addition of a predetermined tag, and calculation and addition of abnormality diagnosis data such as CRC (Cyclic Redundancy Check). be done.

送信制御部130が付加するタグとして、IEC62439-3で定義されるHSRタグ、PRPタグが例示される。 Examples of tags added by the transmission control unit 130 include HSR tags and PRP tags defined in IEC62439-3.

送信制御部130は、通信制御部102またはCPU101上のソフトウェアのいずれか、または両方で実装することが例示される。 The transmission control unit 130 is exemplified by being implemented by either or both of software on the communication control unit 102 or the CPU 101 .

受信制御部131は、受信部133a、受信部133bから受信したデータを加工し、所定の規則に従ってバス135、または送信部132a、送信部132bへ転送する。受信制御部131の加工処理としては、パケットに付加されたタグの除去やデータの抽出が例示される。 The reception control unit 131 processes the data received from the reception unit 133a and the reception unit 133b, and transfers the data to the bus 135 or the transmission unit 132a and the transmission unit 132b according to a predetermined rule. Examples of processing performed by the reception control unit 131 include removal of tags added to packets and extraction of data.

受信制御部131がパケットを転送する規則としては、パケットに付与された宛先アドレス、送信元アドレス、パケット種別、IEEE 802.1Qで定義されるVLAN(Virtual Local Area Network)グループ、優先度、シーケンス番号などに基づくことが例示される。アドレス体系としては、IEEE 802.3のMACアドレス、IP(Internet Protocol)アドレスが例示される。例えば、IEC62439-3のHSRでは、受信部133aから受信したパケットの送信元MACアドレスとシーケンス番号で判別されるパケットが最初の受信であれば、送信部132bへ転送し、2回目以降のパケットであれば破棄する。パケットの宛先アドレスがマルチキャスト、またはブロードキャストである場合は、他の通信ポートだけでなく、バス135へ転送する場合もあり得る。 Rules for the reception control unit 131 to transfer packets include the destination address, source address, packet type, VLAN (Virtual Local Area Network) group defined by IEEE 802.1Q, priority, and sequence number assigned to the packet. and the like are exemplified. Examples of address systems include IEEE 802.3 MAC addresses and IP (Internet Protocol) addresses. For example, in the HSR of IEC62439-3, if the packet received from the receiver 133a and determined by the source MAC address and sequence number is the first packet received, it is transferred to the transmitter 132b, and the second and subsequent packets Discard if any. If the destination address of the packet is multicast or broadcast, it may be transferred to the bus 135 as well as other communication ports.

受信制御部131は、処理したパケットの情報を一定期間記憶するために情報記憶手段を有し、処理したパケットの情報(例えば、送信元アドレス、シーケンス番号)を記憶する。 The reception control unit 131 has information storage means for storing information of processed packets for a certain period of time, and stores information of processed packets (for example, source address, sequence number).

受信制御部131は、通信制御部102またはCPU101上のソフトウェアのいずれか、または両方で実装することが例示される。 The reception control unit 131 is exemplified by being implemented by either or both of software on the communication control unit 102 or the CPU 101 .

送信部132は、PHY103と接続して、PHY103に対して、パケット、データを送信する機能部である。PHY103で説明したとおり、送信部132がMAC機能を有することが例示され、通信制御部102で実装することが例示される。 The transmission unit 132 is a functional unit that connects to the PHY 103 and transmits packets and data to the PHY 103 . As described in the PHY 103, the transmission unit 132 has the MAC function, and the communication control unit 102 implements it.

受信部133は、PHY103と接続して、PHY103からパケット、データを受信する機能部である。PHY103で説明したとおり、受信部133がMAC機能を有することが例示され、通信制御部102で実装することが例示される。 The receiving unit 133 is a functional unit that connects to the PHY 103 and receives packets and data from the PHY 103 . As described in the PHY 103, the receiving unit 133 has the MAC function, and the communication control unit 102 implements it.

バス134は、通信装置120のバス106に接続し、バス106からデータを受信する。バス135は、バス106に接続し、バス106へデータを転送する。バス134、バス135を分離して記載しているが、これは論理的なデータの流れを示すためであって、物理的にバス106と同じである。送信部132、受信部133がバス106への接続機能を提供することが例示される。 Bus 134 connects to bus 106 of communication device 120 and receives data from bus 106 . Bus 135 connects to bus 106 and transfers data to bus 106 . Although the buses 134 and 135 are described separately, this is to show the logical data flow, and they are physically the same as the bus 106 . It is exemplified that the transmission unit 132 and the reception unit 133 provide connection functions to the bus 106 .

マルチプレクサ(MUX)136は、複数のデータ入力から、1つのデータ出力を生成する機能であって、複数入力から1入力を選択してもよいし、結合、あるいは多重化してもよい。 A multiplexer (MUX) 136 is a function that generates one data output from multiple data inputs, and may select one input from multiple inputs, or may combine or multiplex.

マルチプレクサ(MUX)136は、通信制御部102で実装することが例示される。 A multiplexer (MUX) 136 is exemplified to be implemented in the communication control unit 102 .

システム識別子137は、通信装置120が所属するシステムの識別子である。 The system identifier 137 is the identifier of the system to which the communication device 120 belongs.

システム識別子変換部138は、システム識別子137をネットワークプロトコル上での識別子に変換する。これにより、システム識別子137は、数字、文字列といった種類の情報を設定でき、システム識別子変換部138により、VLANのVID(仮想LAN用タグのVLAN識別子)、HSRタグのパス識別子(PathId)、プロトコルアドレス(IPアドレス、IEEE 802.3のMACアドレス等)のユニキャストアドレス、マルチキャストアドレス、ブロードキャストアドレスに変換することができる。 The system identifier converter 138 converts the system identifier 137 into an identifier on the network protocol. As a result, the system identifier 137 can be set to information of types such as numbers and character strings. Addresses (IP addresses, IEEE 802.3 MAC addresses, etc.) can be converted into unicast addresses, multicast addresses, and broadcast addresses.

システム識別子変換部138は、通信制御部102またはCPU101上で動作するソフトウェアのいずれか、または両方で実装することが例示される。 The system identifier conversion unit 138 is exemplified by being implemented by either or both of software operating on the communication control unit 102 or the CPU 101 .

ネットワーク中継装置設定部139は、システム識別子変換部138が作成したネットワークプロトコル上の識別子を用いて、ネットワーク中継装置121の論理ネットワーク構築に関して設定する。 The network relay device setting unit 139 uses the network protocol identifier created by the system identifier conversion unit 138 to set the logical network construction of the network relay device 121 .

図4では、通信装置120がネットワーク中継装置121に対して、タグVLANを設定する。例えば、通信装置120aは、4つの通信ポート190a~190d、通信ポート190e~190hを有するネットワーク中継装置121h、121aに対して、論理ネットワークに対する宛先ポートを設定する。例えば、ネットワーク中継装置121hにおいて、タグ1をある論理ネットワークに割り当て、タグ2を別の論理ネットワークに割り当てる。 In FIG. 4 , the communication device 120 sets a tagged VLAN for the network relay device 121 . For example, the communication device 120a sets destination ports for the logical network for the network relay devices 121h and 121a having four communication ports 190a to 190d and communication ports 190e to 190h. For example, in the network relay device 121h, tag 1 is assigned to one logical network and tag 2 is assigned to another logical network.

なお、ネットワーク中継装置121における論理ネットワークの設定は、図3のネットワーク中継装置設定部139を用いずに、ネットワーク中継装置121の提供する設定手段を用いて設定してもよい。また、図4のネットワーク中継装置121の通信ポート190a~190d、190e~190hの数は、4つで例示しているが、4以外の数でも構わない。 Note that the setting of the logical network in the network relay device 121 may be performed using setting means provided by the network relay device 121 without using the network relay device setting unit 139 of FIG. Also, the number of communication ports 190a to 190d and 190e to 190h of the network relay device 121 in FIG.

ネットワーク中継装置設定部139は、通信制御部102またはCPU101上で動作するソフトウェアのいずれか、または両方で実装することが例示される。 The network relay device setting unit 139 is exemplified by being implemented by either or both of software operating on the communication control unit 102 or the CPU 101 .

なお、システム識別子137、システム識別子変換部138、ネットワーク中継装置設定部139を通信装置120の機能部として示したが、CPU101におけるソフトウェアとして実装してもよい。その際、通信装置120内には、システム識別子変換部138の生成した識別子の保持手段をもうけることが例示され、システム識別子137、システム識別子変換部138となるソフトウェアはバス106経由で、該保持手段に識別子を設定することが例示される。 Although the system identifier 137 , the system identifier conversion unit 138 , and the network relay device setting unit 139 are shown as functional units of the communication device 120 , they may be implemented as software in the CPU 101 . At this time, it is exemplified that holding means for the identifier generated by the system identifier conversion section 138 is provided in the communication device 120. is exemplified.

グループ位置識別子140は、通信装置120が位置する拠点を表す識別子である。例えば、図5におけるグループ位置200aといったグループ位置を表す。システム識別子137の情報として、グループ位置識別子140を含めることが例示される。例えば、グループ位置識別子140をシステム識別子137の一部とする。また、ネットワーク中継装置設定部139は、グループ位置識別子140を用いてネットワーク中継装置121を設定してもよい。 The group location identifier 140 is an identifier representing the site where the communication device 120 is located. For example, it represents a group position such as group position 200a in FIG. The inclusion of the group location identifier 140 as information of the system identifier 137 is exemplified. For example, group location identifier 140 is part of system identifier 137 . Also, the network relay device setting unit 139 may set the network relay device 121 using the group location identifier 140 .

(動作手順)
通信装置120aの送信に関する動作手順を図6に示す。
(Operating procedure)
FIG. 6 shows an operation procedure for transmission of the communication device 120a.

はじめに、CPU101上で動作するアプリケーションが通信制御部102に対して、データを用意し、バス106、バス134を用いて、送信するデータを伝送する(S001)。データを受け取った通信制御部102では、送信制御部130がデータを複製し(S002)、複製したデータそれぞれに対して加工する(S003)。送信制御部130が実行する加工は、HSRタグの付加や、VLANタグの付加、CRCの計算、付加、パケットへの成形が例示される。 First, an application running on the CPU 101 prepares data for the communication control unit 102 and transmits the data to be transmitted using the buses 106 and 134 (S001). In the communication control unit 102 that received the data, the transmission control unit 130 duplicates the data (S002), and processes each of the duplicated data (S003). The processing executed by the transmission control unit 130 is exemplified by adding an HSR tag, adding a VLAN tag, calculating and adding a CRC, and forming into a packet.

送信制御部130で加工された各データは送信部132へ伝送され、送信部132、PHY103を用いて、ネットワーク122へ送信される(S004)。 Each data processed by the transmission control unit 130 is transmitted to the transmission unit 132 and transmitted to the network 122 using the transmission unit 132 and the PHY 103 (S004).

パケットを受信した通信装置120における転送処理を図7に示す。 FIG. 7 shows transfer processing in the communication device 120 that has received a packet.

はじめに、通信制御部102に接続される受信部133(受信部133a、133b)は、パケットを受信したか否かを判定し、パケットを受信するまで待機する(S010)。受信部133は、パケットを受信したら、受信パケットの識別子を保持し(S011)、受信したパケットを受信制御部131へ転送する(S012)。受信制御部131は、最初に受信したパケット(先着パケット)かどうかを判定する(S013)。先着パケットであれば、受信制御部131は、この通信装置120宛のパケットかどうかを判定する(S014)。S013で、先着パケットでなければ、受信制御部131は、受信したパケットを破棄する(S015)。 First, the receiving unit 133 (receiving units 133a and 133b) connected to the communication control unit 102 determines whether or not a packet has been received, and waits until the packet is received (S010). Upon receiving the packet, the receiving unit 133 holds the identifier of the received packet (S011), and transfers the received packet to the reception control unit 131 (S012). The reception control unit 131 determines whether it is the first received packet (first-arrival packet) (S013). If it is a first-arriving packet, the reception control unit 131 determines whether the packet is addressed to this communication device 120 (S014). In S013, if the received packet is not the first-arrival packet, the reception control unit 131 discards the received packet (S015).

S014で、この通信装置120宛のパケットであれば、受信制御部131は、パケットを通信装置120で受信するために、バス135、バス106を用いて、パケットをCPU101に伝送する(S016)。S014で、この通信装置120宛のパケットでない場合、あるいはS016の処理後に、受信制御部131は、このパケットを転送すべきかどうかを判定する(S017)。パケットを転送すべきかどうかは、パケットの宛先がマルチキャストアドレスかブロードキャストアドレスである場合が例示される。 In S014, if the packet is addressed to the communication device 120, the reception control unit 131 transmits the packet to the CPU 101 using the buses 135 and 106 so that the communication device 120 receives the packet (S016). In S014, if the packet is not addressed to this communication device 120, or after the process of S016, the reception control unit 131 determines whether or not this packet should be transferred (S017). Whether the packet should be forwarded is exemplified when the destination of the packet is a multicast address or a broadcast address.

受信パケットが転送すべきパケットである場合、受信制御部131は、パケットを受信した通信ポート以外の通信ポートの送信部132(送信部132a又は132b)からパケットを送信する(S018)。 If the received packet should be transferred, the reception control unit 131 transmits the packet from the transmission unit 132 (transmission unit 132a or 132b) of the communication port other than the communication port that received the packet (S018).

なお、S013で、先着パケットかどうかを判定するために、受信制御部131は、処理したパケットの情報を一定期間記憶するために情報記憶手段を有し、処理したパケットの情報(例えば、送信元アドレス、シーケンス番号)を記憶する(図7のS011)。なお、HSRでは、該情報記憶手段において、一定期間後に記憶されている情報は消去される。そのため、同じ識別子を有するパケットであっても、該情報記憶手段に識別子が保持されていなければ、S013において、先着パケットであると判定する。 In S013, in order to determine whether the packet is the first-arriving packet, the reception control unit 131 has information storage means for storing information of the processed packet for a certain period of time. address, sequence number) are stored (S011 in FIG. 7). In HSR, the information stored in the information storage means is erased after a certain period of time. Therefore, even if the packet has the same identifier, if the identifier is not held in the information storage means, the packet is determined to be the first-arrival packet in S013.

(パケット受信処理)
通信装置120におけるパケット受信処理は、図7と同様の手順をとり、S016における受信処理によって、パケットを受信する。
(packet reception processing)
Packet reception processing in the communication device 120 follows the same procedure as in FIG. 7, and packets are received by the reception processing in S016.

(システム識別子の利用)
送信制御部130は、図6のS003のデータ加工処理において、システム識別子変換部138の生成した識別子を用いることができる。例えば、システム識別子変換部138の生成したVIDを用いてVLANタグを生成することやEthernetヘッダの宛先アドレスを設定することが例示される。
(Use of system identifiers)
The transmission control unit 130 can use the identifier generated by the system identifier conversion unit 138 in the data processing in S003 of FIG. For example, generating a VLAN tag using the VID generated by the system identifier conversion unit 138 and setting the destination address of the Ethernet header are exemplified.

受信制御部131は、システム識別子変換部138の生成した識別子を用いて、受信、転送を制御することができる。例えば、受信パケットのVLANタグのVIDが、パケットを受信した通信装置120の所属するVIDと異なれば、図7のS014の判断において、パケットを受信しないことが例示される。 The reception control unit 131 can use the identifier generated by the system identifier conversion unit 138 to control reception and transfer. For example, if the VID of the VLAN tag of the received packet is different from the VID to which the communication device 120 that received the packet belongs, the packet will not be received in the determination of S014 in FIG.

(冗長経路の利用)
図1のネットワーク中継装置121h、121a、通信装置120a、120b、120cに着目して、ネットワーク中継装置121の設定例を図8に示す。図8におけるネットワーク中継装置121の設定は、転送先の宛先ポートを複数設定している。図8に示すようにタグ1を有するパケット150が、通信ポート190a~190dを有するネットワーク中継装置121hに入力されると、ネットワーク中継装置121hから、パケット150の宛先となる宛先の通信装置120aに対して、通信経路160、161、162を経由して、パケット150が伝送される。したがって、通信経路160、161、162のいずれかに障害が起きた場合であっても、パケット150が宛先の通信装置120に到達することができる。同様に、パケット150の宛先がネットワーク中継装置121aの先に接続している場合も通信装置120a、120b、120cを経由する3つの通信経路160、161、162を通って伝送することができる。
(Use of redundant routes)
Focusing on the network relay devices 121h and 121a and the communication devices 120a, 120b, and 120c in FIG. 1, FIG. 8 shows a setting example of the network relay device 121. In FIG. The setting of the network relay device 121 in FIG. 8 sets a plurality of transfer destination ports. As shown in FIG. 8, when a packet 150 having tag 1 is input to the network relay device 121h having communication ports 190a to 190d, the network relay device 121h sends the packet 150 to the destination communication device 120a. Packet 150 is transmitted via communication paths 160 , 161 , 162 . Therefore, even if any of the communication paths 160 , 161 , 162 fails, the packet 150 can still reach the destination communication device 120 . Similarly, when the destination of packet 150 is connected beyond network relay device 121a, it can be transmitted through three communication paths 160, 161 and 162 via communication devices 120a, 120b and 120c.

経路数(通信経路の数)の制御は、ポートベースVLANとタグVLANを組み合せて設定してもよい。 The control of the number of paths (the number of communication paths) may be set by combining port-based VLAN and tagged VLAN.

なお、転送経路の数(各タグに対する転送ポート)は、システムの重要性や、通信装置120の演算能力、計算機資源の性能によって決定してもよい。 Note that the number of transfer paths (transfer ports for each tag) may be determined according to the importance of the system, the computing power of the communication device 120, and the performance of computer resources.

(通信装置によるVIDの変更)
あるいは、通信装置120がVLANタグのVIDを変更して経路数を制御してもよい。
(VID change by communication device)
Alternatively, the communication device 120 may change the VID of the VLAN tag to control the number of routes.

図9は、各通信装置120において、VLANタグのVIDを変更する処理を示す。例えば、通信装置120aにおいて、VLANのVIDを2に変更し、ネットワーク中継装置121aにおいて、VIDが2であるパケットに対して、通信ポート190e、190hに転送するように設定している。このような設定により、冗長化する経路数を制御することができる。 FIG. 9 shows the process of changing the VID of the VLAN tag in each communication device 120. As shown in FIG. For example, in the communication device 120a, the VID of VLAN is changed to 2, and in the network relay device 121a, packets with VID 2 are set to be transferred to the communication ports 190e and 190h. With such a setting, the number of redundant paths can be controlled.

(所属システム、グループ位置に基づいた転送制御)
加えて、リングネットワーク内での位置情報を考慮したパケット転送制御を、図5を用いて説明する。
(Transfer control based on affiliation system and group position)
In addition, packet transfer control in consideration of position information within the ring network will be explained using FIG.

各通信装置120は、所属する制御システムの識別子(例、1、2、3)とともに、グループ位置(例、200a、200b、200c、200d)を有する。制御システムの情報とグループ位置情報をパケット上に反映し、各通信装置120は該情報にしたがって転送制御することが例示される。 Each communication device 120 has a group position (eg 200a, 200b, 200c, 200d) along with the identifier of the control system to which it belongs (eg 1, 2, 3). It is exemplified that control system information and group position information are reflected on packets, and each communication device 120 performs transfer control according to the information.

バケットへの制御システム情報とグループ位置情報の反映方法は、例えば、マルチキャストアドレス、VLANのVID、HSRタグ、IPアドレス、その他のプロトコルヘッダに反映することが例示される。例えば、HSRで利用可能なマルチキャストアドレスの範囲01-15-4E-00-01-XXのうち、最後の1オクテットのうち、上位4ビットをシステム識別子、下位4ビットをグループ位置とすることが例示される。例えば、01-15-4E-00-01-12は、制御システム1(12の”1”)に所属し、グループ位置200b(グループ位置200aをMACアドレス1、グループ位置200bをMACアドレス2に割り当てるとする。12の“2”)に位置する通信装置120を表すとする。 A method of reflecting the control system information and the group location information in the bucket is exemplified by reflecting in multicast addresses, VLAN VIDs, HSR tags, IP addresses, and other protocol headers, for example. For example, in the range of multicast addresses 01-15-4E-00-01-XX available in HSR, the last 1 octet is exemplified by using the upper 4 bits as the system identifier and the lower 4 bits as the group position. be done. For example, 01-15-4E-00-01-12 belongs to control system 1 ("1" in 12) and group position 200b (group position 200a is assigned MAC address 1 and group position 200b is assigned MAC address 2). Let be the communication device 120 located at "2" in 12).

通信装置120で受信したパケットから取得した制御システム情報、グループ位置情報と、経路制御ルール220を利用して制御する。 The control system information and group location information acquired from the packet received by the communication device 120 and the route control rule 220 are used for control.

経路制御ルール220は、受信パケットから得られる制御システム情報、グループ位置情報と、パケットを受信した通信装置120の制御システム情報、グループ位置情報との比較による経路制御である。 The route control rule 220 is route control by comparing the control system information and group position information obtained from the received packet with the control system information and group position information of the communication device 120 that received the packet.

制御システムが同じで、グループ位置が同じであれば、パケットを受信する。制御システムが同じで、グループ位置が異なれば、パケットを転送する。制御システムが異なり、グループ位置が同じであれば、パケットを転送する。制御システムが異なり、グループ位置が異なれば、パケットを転送する。このような設定であれば、冗長経路を利用し、高信頼化できる。 If the control system is the same and the group position is the same, the packet will be received. If the control system is the same and the group positions are different, the packets are forwarded. If the control system is different and the group position is the same, the packet is forwarded. Different control systems and different group locations forward packets. With such a setting, high reliability can be achieved by using redundant paths.

なお、送信制御部130や受信制御部131は、経路の状態に応じて、動的に経路制御ルール220を変更してもよい。例えば、受信パケット数が少ない場合は、通信量の増加を許容できるため、多経路にパケットを転送して高信頼を図ることができる。同様に通信装置120の処理負荷が低い場合は、転送処理による負荷の影響が低いと考えられるため、多経路にパケットを転送して高信頼を図ることができる。 Note that the transmission control unit 130 and the reception control unit 131 may dynamically change the route control rule 220 according to the state of the route. For example, when the number of received packets is small, an increase in communication traffic can be tolerated, so packets can be transferred to multiple routes to achieve high reliability. Similarly, when the processing load of the communication device 120 is low, the effect of the load due to transfer processing is considered to be low, so high reliability can be achieved by transferring packets to multiple routes.

これらの転送制御は通信装置120ごとに異なっていてもよい。 These transfer controls may be different for each communication device 120 .

(時刻情報の補正)
ここで、図10を用いて冗長経路を利用する場合の時刻の補正について述べる。
(Correction of time information)
Here, the time correction when using redundant paths will be described with reference to FIG.

通信装置120aに対する同期パケット(例えば、IEEE 1588のSyncメッセージ)を対象とした場合、例えば、通信装置120lからネットワーク中継装置121hを介して通信装置120aにパケット150を送信する場合、本来の通信経路160ではなく、通信装置120bを経由する場合は、冗長経路となる通信経路161を通るため、通信遅延が異なる。したがって、この遅延(遅延時間)を補正する必要がある。 When targeting a synchronization packet (for example, an IEEE 1588 Sync message) for the communication device 120a, for example, when transmitting a packet 150 from the communication device 120l to the communication device 120a via the network relay device 121h, the original communication path 160 However, when passing through the communication device 120b, the communication delay differs because the communication route 161, which is a redundant route, is passed. Therefore, it is necessary to correct this delay (delay time).

通信装置120b、通信装置120a及びネットワーク中継装置121aがIEEE 1588のpeer delayメカニズムに対応している場合は、事前に接続経路における対向装置間の遅延を計測している(通信装置120aとネットワーク中継装置121h間、通信装置120bとネットワーク中継装置121h間、通信装置120aとネットワーク中継装置121a間、通信装置120bとネットワーク中継装置121a間の経路の遅延)。IEEE 1588のpeer delayの時刻補正においては、事前に計測した遅延を入力経路とする装置が補正するため、例えば、通信装置120aとネットワーク中継装置121h間の経路遅延は通信装置120aがSyncメッセージを受信した際に、Syncメッセージ上のcorrection field(図11のIEEE 1588のパケットフォーマット中のcorrectionField178)を補正する。 If the communication device 120b, the communication device 120a, and the network relay device 121a support the peer delay mechanism of IEEE 1588, the delay between the opposite devices on the connection path is measured in advance (the communication device 120a and the network relay device 121h, between communication device 120b and network relay device 121h, between communication device 120a and network relay device 121a, and between communication device 120b and network relay device 121a). In IEEE 1588 peer delay time correction, the delay measured in advance is corrected by a device whose input route is delayed. At this time, the correction field on the Sync message (correction field 178 in the packet format of IEEE 1588 in FIG. 11) is corrected.

(Correction Fieldの補正)
なお、ネットワーク中継装置121がIEEE 1588に対応しない場合について説明する。
(Correction of Correction Field)
A case where the network relay device 121 does not support IEEE 1588 will be described.

このとき、本来、通信装置120aへの通信経路は、通信装置120lからの通信経路231か、通信装置120kからの通信経路232、通信経路160があり得る。これが通信装置120bを経由する通信経路161となるため、その遅延を補正する必要がある。 At this time, originally, the communication path to the communication device 120a can be the communication path 231 from the communication device 120l, or the communication path 232 or the communication path 160 from the communication device 120k. Since this becomes the communication path 161 passing through the communication device 120b, it is necessary to correct the delay.

このとき、遅延を補正する装置は、通信装置120bと通信装置120aがあり得る。通信装置120aが補正する場合は、通信経路231または通信経路232の遅延を通信装置120aにて補正する場合である。 At this time, devices that correct the delay may be the communication device 120b and the communication device 120a. The case where the communication device 120a corrects is the case where the communication device 120a corrects the delay of the communication path 231 or the communication path 232 .

この場合は、通信装置120aによる補正を考慮して、通信装置120bで通信経路161の遅延を補正する。 In this case, the communication device 120b corrects the delay of the communication path 161 in consideration of the correction by the communication device 120a.

通信経路(第一の通信経路)160での遅延(第一の通信経路を同期パケットが通信する際の第一の通信遅延)をD1、通信経路(第二の通信経路)161での遅延(第二の通信経路を同期パケットが通信する際の第二の通信遅延)をD2とすると、通信装置120bでの補正遅延(遅延変化分)は、D2-D1となる。 The delay in the communication path (first communication path) 160 (the first communication delay when the synchronization packet communicates on the first communication path) is D1, and the delay in the communication path (second communication path) 161 ( Assuming that D2 is the second communication delay when the synchronization packet communicates through the second communication path, the corrected delay (delay change) in the communication device 120b is D2-D1.

パケット上の遅延補正対象はタイムスタンプ、またはcorrectionFieldであり、通信装置120bにおける受信時のcorrectionFieldをCFold、補正後のcorrectionFieldをCFnewとすると、補正は以下の(1)式となる。 A delay correction target on a packet is a timestamp or a correction field, and if the correction field at the time of reception in the communication device 120b is CFold and the correction field after correction is CFnew, the correction is expressed by the following equation (1).

CFnew=CFold+(D2-D1) ・・・(1) CFnew=CFold+(D2-D1) (1)

タイムスタンプを補正する場合、通信装置120bにおける受信時のタイムスタンプをTSold、補正後のタイムスタンプをTSnewとすると、補正は以下の(2)式となる。 When correcting the time stamp, the time stamp at the time of reception in the communication device 120b is TSold, and the time stamp after correction is TSnew.

TSnew=TSold+(D2-D1) ・・・(2) TSnew=TSold+(D2-D1) (2)

このように補正すれば、通信装置120aでは従来どおりの計算方法で同期することができる。 By correcting in this way, the communication device 120a can synchronize with a conventional calculation method.

具体例を用いて説明する。
今、ネットワーク中継装置121hの出力ポートでSyncメッセージを出力する瞬間を仮定する。このとき送信元が格納したタイムスタンプ(図11のoriginTimestamp183)TSが10秒000で、correctionField(図11のcorrectionField178)CFoldが10マイクロ秒であったとする。通信経路160の遅延D1を10マイクロ秒、通信経路161の遅延D2を20マイクロ秒とする。また、その瞬間の通信装置120aの時刻Ca1を11秒10マイクロ秒とする。
A specific example will be used for explanation.
Assume now the moment of outputting the Sync message at the output port of the network relay device 121h. Assume that the time stamp (originTimestamp 183 in FIG. 11) TS stored by the sender at this time is 10 seconds 000, and the correctionField (correctionField 178 in FIG. 11) CFold is 10 microseconds. Assume that the delay D1 of the communication path 160 is 10 microseconds and the delay D2 of the communication path 161 is 20 microseconds. Also, the time Ca1 of the communication device 120a at that instant is assumed to be 11 seconds and 10 microseconds.

経路異常がなく、通信装置120aが通信経路160を介して、Syncメッセージを受信したとすると、通信装置120aの時刻Ca2は11秒20マイクロ秒(Ca1+D1)である。このとき、Syncメッセージの送信元の時刻Cs2は10秒20マイクロ秒(TS+CFold+D1)である。したがって、送信元の通信装置120と通信装置120aの時刻オフセットOffsetは次の(3)式となる。 Assuming that the communication device 120a receives the Sync message via the communication path 160 without path failure, the time Ca2 of the communication device 120a is 11 seconds and 20 microseconds (Ca1+D1). At this time, the time Cs2 of the transmission source of the Sync message is 10 seconds and 20 microseconds (TS+CFold+D1). Therefore, the time offset Offset between the transmission source communication device 120 and the communication device 120a is given by the following equation (3).

Offset = Cs2 - Ca2
= 10秒20マイクロ秒 - 11秒20マイクロ秒
= -1秒 ・・・(3)
Offset = Cs2 - Ca2
= 10 seconds 20 microseconds - 11 seconds 20 microseconds
= -1 second (3)

したがって、通信装置120aにおける同期時刻Crefは通信装置120aにおける時刻Caと時刻オフセットOffsetを用いて、次の(4)式で求まる。 Therefore, the synchronization time Cref in the communication device 120a is obtained by the following equation (4) using the time Ca and the time offset Offset in the communication device 120a.

Cref = Ca + Offset ・・・(4) Cref=Ca+Offset (4)

通信経路160で経路異常が発生したとして、correctionFieldを補正する場合は、通信装置120bにて、次の(5)式を実行する。 If the correctionField is to be corrected assuming that a path abnormality has occurred in the communication path 160, the following equation (5) is executed in the communication device 120b.

CFnew = CFold +(D2 - D1)
= 10マイクロ秒 + (20マイクロ秒 ― 10マイクロ秒)
= 20マイクロ秒 ・・・(5)
CFnew = CFold + (D2 - D1)
= 10 microseconds + (20 microseconds - 10 microseconds)
= 20 microseconds (5)

通信装置120bを経由した場合、通信装置120aでSyncメッセージを受信した時刻Ca3は11秒30マイクロ秒(Ca1+D2)となる。 In the case of passing through the communication device 120b, the time Ca3 at which the Sync message is received by the communication device 120a is 11 seconds and 30 microseconds (Ca1+D2).

このとき、Syncメッセージの送信元の時刻Cs3は10秒30マイクロ秒(TS+CFold+D2)である。通信装置120aは、従来どおり、通信経路160の遅延D1を用いて、送信元の通信装置120の時刻を推定する。したがって、送信元の通信装置120と通信装置120aの時刻オフセットOffsetは次の(6)式となる。 At this time, the time Cs3 of the transmission source of the Sync message is 10 seconds and 30 microseconds (TS+CFold+D2). The communication device 120a uses the delay D1 of the communication path 160 to estimate the time of the transmission source communication device 120 as in the conventional art. Therefore, the time offset Offset between the transmission source communication device 120 and the communication device 120a is given by the following equation (6).

Offset = Cs3 - Ca3
= 10秒30マイクロ秒 - 11秒30マイクロ秒
= -1秒 ・・・(6)
Offset = Cs3-Ca3
= 10 seconds 30 microseconds - 11 seconds 30 microseconds
= -1 second (6)

したがって、通信装置120aは、自身が保持している遅延D1の情報をそのまま利用し、従来どおり、送信元の通信装置120との時刻同期を実行することができる。 Therefore, the communication device 120a can use the information of the delay D1 held by itself as it is, and can perform time synchronization with the communication device 120 of the transmission source as in the past.

通信装置120aではなく、通信装置120lまたは通信装置120kが通信経路231または通信経路232及び通信経路160の遅延を補正する場合は、同様に通信装置120bにて、(1)式または(2)式によってD2とD1との差分(遅延変化分)を基に、同期パケットに付加される時刻情報を補正することが例示される。 When the communication device 120l or the communication device 120k, not the communication device 120a, corrects the delay of the communication path 231 or the communication path 232 and the communication path 160, similarly, the communication device 120b uses formula (1) or formula (2) correcting the time information added to the synchronization packet based on the difference (delay change) between D2 and D1.

以上の仕組みを実現するための構成を述べる。
通信装置120aでcorrectionFieldを補正する場合は、本来の通信経路と、その通信遅延を把握する必要がある。加えて、通信装置120bにおいては、どの通信装置120への通信であるか(今回の場合は通信装置120a)とその際の遅延(D2)が必要となる。
A configuration for realizing the above mechanism will be described.
When correcting the correction field in the communication device 120a, it is necessary to grasp the original communication path and its communication delay. In addition, the communication device 120b needs to know which communication device 120 the communication is to (communication device 120a in this case) and the delay (D2) at that time.

送信元の通信装置120l、通信装置120kの情報についてはパケット上に該通信装置120の識別子を格納する方法が例示される。これは通信装置120l、通信装置120kの識別子でもよいし、通信装置120lまたは通信装置120kが所属するシステム識別子でもよい。なお、VLANを用いてシステム識別子を表現する場合は、パケット上のVLAN IDをそのままシステム識別子として利用できない可能性があることに注意しなければならない。これは通信装置120a宛のパケットが通信装置120bを通るように、通信装置120l、通信装置120kにおいても異なるグループの経路を通る場合があるためである。 As for the information on the transmission source communication device 120l and the communication device 120k, a method of storing the identifier of the communication device 120 on the packet is exemplified. This may be an identifier of the communication device 120l or the communication device 120k, or may be a system identifier to which the communication device 120l or the communication device 120k belongs. It should be noted that when the VLAN is used to express the system identifier, there is a possibility that the VLAN ID on the packet cannot be used as the system identifier as it is. This is because, just as a packet addressed to the communication device 120a passes through the communication device 120b, the communication devices 120l and 120k may also pass through different groups of routes.

また、経路遅延D1、D2の計測は、ネットワーク中継装置121aを介したDelay Request Responseメカニズムやpeer delayメカニズムなどを用いた遅延計測を実行することが例示される。これは制御システムの動作実行前に計測してもよいし、動作中に継続的に計測してもよい。 Also, the measurement of the path delays D1 and D2 is exemplified by executing delay measurement using a Delay Request Response mechanism or a peer delay mechanism via the network relay device 121a. This may be measured prior to execution of the control system operation, or may be measured continuously during operation.

なお、通信装置120b内のパケットの滞留時間(転送時間)は、通信装置120bにて計測し、correctionFieldまたはタイムスタンプを補正することが例示される。なお、補正対象はFollow_Upメッセージでもよい。 Note that the packet retention time (transfer time) in the communication device 120b is measured by the communication device 120b, and correctionField or time stamp is corrected. Note that the target of correction may be a Follow_Up message.

また、隣接するネットワーク中継装置121間が複数の経路となるように構成してもよく(例えば、図1のネットワーク中継装置121aとネットワーク中継装置121bを複数経路で接続する)、どの経路を通るかという情報をパケット上に含め、通信装置120bにおいて、利用する経路に応じた遅延を補正してもよい。補正の方法は、(1)式、(2)式と同様である。また通信装置120ではなく、correctionFieldまたはタイムスタンプの補正はネットワーク中継装置121が実行してもよい。 Further, it may be configured such that there are multiple routes between the adjacent network relay devices 121 (for example, the network relay devices 121a and 121b in FIG. 1 are connected by multiple routes). may be included in the packet, and the communication device 120b may correct the delay according to the path used. The correction method is the same as in formulas (1) and (2). Also, instead of the communication device 120, the network relay device 121 may correct the correction field or the time stamp.

以上のタイムスタンプまたはcorrectionFieldの補正を含む、補正に係わる処理は受信制御部131または送信制御部130で実行することが例示される。 It is exemplified that the reception control unit 131 or the transmission control unit 130 executes processing related to correction, including correction of the above time stamp or correction field.

なお、冗長経路を有する二重系ネットワークにおいて、経路異常後に冗長経路を利用する場合は、通信装置120において、事前あるいは動的に冗長経路上の通信遅延を計測しておき、冗長経路へ切り替え時に同期パケット上の時刻情報を、遅延変化分を用いて補正してもよい。 In addition, in a duplex network having a redundant route, when using a redundant route after a route failure, the communication device 120 measures the communication delay on the redundant route in advance or dynamically, and when switching to the redundant route The time information on the synchronization packet may be corrected using the delay variation.

これはネットワーク122上の一部の通信装置120が対応している状況でも構わない。この場合は、最終宛先ノードへの遅延を事前に計測しておく必要があるが、時刻の補正回数を削減できるため、補正処理時間にともなう同期誤差を低減でき、かつ、高速に転送できる。 It does not matter if some communication devices 120 on the network 122 support this. In this case, it is necessary to measure the delay to the final destination node in advance, but since the number of time corrections can be reduced, the synchronization error associated with the correction processing time can be reduced, and high-speed transfer can be achieved.

本実施例によれば、時刻同期と経路冗長化が両立するので、経路冗長化により高信頼化が実現されるネットワークであっても、時刻同期が可能になる。また、HSR、PRPでは二重化までしか対応できないが、本実施例では、多重化したシステムの数だけの経路を利用することができ、より高信頼化できる。さらに、通信経路が冗長化されても、冗長化された通信経路中の通信装置やネットワーク中継装置で遅延変化分を基に同期パケットに属する時刻情報が補正され、同期パケットの受信側で遅延変化分を考慮して時刻情報を補正する必要がないので、受信側の通信装置が多くなる程、通信制御システム全体のコストを低減することができる。 According to this embodiment, since time synchronization and path redundancy are compatible, time synchronization is possible even in a network in which high reliability is achieved by path redundancy. Also, HSR and PRP can only handle up to duplication, but in this embodiment, as many routes as the number of multiplexed systems can be used, and higher reliability can be achieved. Furthermore, even if the communication path is made redundant, the time information belonging to the synchronization packet is corrected based on the delay change in the communication device or network relay device in the redundant communication path, and the delay change on the receiving side of the synchronization packet is corrected. Since there is no need to correct the time information in consideration of the minute, the cost of the entire communication control system can be reduced as the number of communication devices on the receiving side increases.

図12は、本発明を適用した制御用計算機240を用いて構成するシステム例である。 FIG. 12 shows an example of a system configured using a control computer 240 to which the present invention is applied.

制御用計算機240は、制御用ネットワーク242を介して、複数の被制御装置241(241a~241d)と接続し、各被制御装置241を制御する。制御用計算機240は、2つの通信ポートを有し、制御用ネットワーク242と接続する。制御用計算機240として、専用コントローラ、産業用パソコン、制御用計算機、PLC(Programmable Logic Controller)、IED(Intelligent Electronic Device)、保護制御装置が例示される。 The control computer 240 is connected to a plurality of controlled devices 241 (241a to 241d) via a control network 242 and controls each controlled device 241. FIG. The control computer 240 has two communication ports and connects with the control network 242 . Examples of the control computer 240 include a dedicated controller, an industrial personal computer, a control computer, a PLC (Programmable Logic Controller), an IED (Intelligent Electronic Device), and a protection control device.

被制御装置241は、制御用計算機240からの制御指令を受けて動作する。被制御装置241から動作情報を制御用計算機240へ提供してもよい。被制御装置241として、MU(Merging Unit)、電力分野の主機(遮断器等)、インバータ、モータ、サーボアンプとサーボモータによる構成が例示される。なお、制御用計算機240と被制御装置241は、後述するように、いずれも、同期パケットを送受信する1又は2以上の送受信手段と、送受信手段の受信した同期パケットを処理する処理手段とを有する通信制御装置としての機能を有している。 The controlled device 241 operates upon receiving a control command from the control computer 240 . Operation information may be provided from the controlled device 241 to the control computer 240 . Examples of the controlled device 241 include a MU (Merging Unit), a main machine (circuit breaker, etc.) in the power field, an inverter, a motor, a servo amplifier, and a servo motor. As will be described later, each of the control computer 240 and the controlled device 241 has one or more transmitting/receiving means for transmitting/receiving synchronous packets, and processing means for processing the synchronous packets received by the transmitting/receiving means. It has a function as a communication control device.

制御用ネットワーク242として、Ethernet(登録商標:IEEE802.3)、各種産業用ネットワーク、IEC 61784、IEC 61158、IEC 61850(IEC 61850-90-3含む)、IEC 62439、IEC 61850-7-420、IEC 60870-5-104、DNP(Distributed Network Protocol)3、IEC 61970、IEEE 802.1 AVB、CAN(Controller Area Network:登録商標)、DeviceNet、RS-232C、RS-422、RS-485、ZigBee(登録商標)、Bluetooth(登録商標)、IEEE 802.15、IEEE 802.1、モバイル通信、OpenADR、ECHONET Lite(登録商標)、OpenFlow(登録商標)等が例示される。 As the control network 242, Ethernet (registered trademark: IEEE802.3), various industrial networks, IEC 61784, IEC 61158, IEC 61850 (including IEC 61850-90-3), IEC 62439, IEC 61850-7-420, IEC 60870-5-104, DNP (Distributed Network Protocol) 3, IEC 61970, IEEE 802.1 AVB, CAN (Controller Area Network: registered trademark), DeviceNet, RS-232C, RS-422, RS-485, ZigBee (registration trademark), Bluetooth (registered trademark), IEEE 802.15, IEEE 802.1, mobile communication, OpenADR, ECHONET Lite (registered trademark), OpenFlow (registered trademark), and the like.

図13は、本発明を適用した制御用計算機240のハードウェア構成の一実施例である。 FIG. 13 shows an example of the hardware configuration of the control computer 240 to which the present invention is applied.

制御用計算機240は、CPU101、冗長化通信制御部250、PHY103(103a、PHY103b)、メモリ104、不揮発性記憶媒体105、バス106を備えている。CPU101、冗長化通信制御部250、メモリ104、不揮発性記憶媒体105は、処理手段に属する要素として構成され、PHY103a、PHY103bは、送受信手段に属する要素として構成される。 The control computer 240 includes a CPU 101 , redundant communication control section 250 , PHY 103 ( 103 a, PHY 103 b ), memory 104 , nonvolatile storage medium 105 and bus 106 . The CPU 101, the redundant communication control unit 250, the memory 104, and the non-volatile storage medium 105 are configured as elements belonging to the processing means, and the PHY 103a and PHY 103b are configured as elements belonging to the transmitting/receiving means.

冗長化通信制御部250は、CPU101上で動作するプログラムから通信要求を受け取り、PHY103(PHY103a又は103b)を用いて制御用ネットワーク242(242a又は242b)に対して通信する。冗長化通信制御部250の実装例としては、FPGA、CPLD、ASIC、ゲートアレイ等のICが例示される。なお、冗長化通信制御部250は、CPU101に含まれていてもよい。 The redundant communication control unit 250 receives a communication request from a program running on the CPU 101 and communicates with the control network 242 (242a or 242b) using the PHY 103 (PHY 103a or 103b). Implementation examples of the redundant communication control unit 250 include ICs such as FPGAs, CPLDs, ASICs, and gate arrays. Note that the redundant communication control unit 250 may be included in the CPU 101 .

(各機能部の説明)
図14に本発明を適用した冗長化通信制御部250の機能構成図を示す。
(Description of each functional part)
FIG. 14 shows a functional configuration diagram of the redundant communication control unit 250 to which the present invention is applied.

冗長化通信制御部250は、出力選択部260(出力選択部260a、260b)、入力選択部261(入力選択部261a、261b)、経路制御部262、時刻補正部263、バス264(バス264a、264b、264c、264d、264e)、計時部265、通信遅延記憶部266、送信部132(132a、132b)、受信部133(133a、133b)を備えている。 The redundant communication control unit 250 includes an output selection unit 260 (output selection units 260a and 260b), an input selection unit 261 (input selection units 261a and 261b), a route control unit 262, a time correction unit 263, a bus 264 (bus 264a, 264b, 264c, 264d, 264e), a timer 265, a communication delay storage 266, a transmitter 132 (132a, 132b), and a receiver 133 (133a, 133b).

説明の便宜上、送信部132aと受信部133aを主ポート、送信部132bと受信部133bを冗長ポートとして以下説明する。 For convenience of explanation, the following description assumes that the transmitter 132a and receiver 133a are main ports, and the transmitter 132b and receiver 133b are redundant ports.

出力選択部260は、バス264aからのデータ入力に対して、2つの出力のいずれに転送するかを決定する。これは、CPU101上のソフトウェアから冗長化通信制御部250に対して設定してもよいし、出力先の通信経路の状態から判定してもよい。例えば、出力選択部260aにおいて、送信部132aがPHY103aと接続し、制御用ネットワーク242aとの通信が確立している場合は、データを送信部132aへと出力し、制御用ネットワーク242aにて何らかの異常があり、通信が確立していない場合は、データを入力選択部261aへと出力することが例示される。 The output selection unit 260 determines to which of two outputs the data input from the bus 264a is transferred. This may be set in the redundant communication control unit 250 from software on the CPU 101, or may be determined from the state of the communication path of the output destination. For example, in the output selection unit 260a, when the transmission unit 132a is connected to the PHY 103a and the communication with the control network 242a is established, the data is output to the transmission unit 132a, and some abnormality is detected in the control network 242a. , and communication is not established, outputting data to the input selection unit 261a is exemplified.

入力選択部261は、2つのデータ入力に対して、どちらを出力するかを決定する。出力するデータ入力の選択は、CPU101上のソフトウェアから冗長化通信制御部250に対して設定してもよいし、タイムスロット通信方式を採用して時間帯ごとに入力先を選択してもよい。選択されていない入力(データ)は廃棄してもよいし、バッファを用いて保持してもよい。バッファに保持されたデータは、該入力データが出力として選択された場合に出力してもよいし、所定時間経過で廃棄してもよい。またバッファが満杯になった場合には、新しい入力(データ)を廃棄してもよいし、古いデータから廃棄してもよい。また入力選択部261はバッファリングにともなう処理時間を計時、記憶しておくことが例示される。あるいはバッファリングにともなう処理時間をデータ内に含めてもよいし(例えば図11のcorrectionField178)、あるいはデータの前後のいずれかに付加してもよい。 The input selection unit 261 determines which of two data inputs is to be output. The data input to be output may be selected from the software on the CPU 101 to the redundant communication control unit 250, or the time slot communication method may be employed to select the input destination for each time zone. Unselected inputs (data) may be discarded or retained using a buffer. The data held in the buffer may be output when the input data is selected as output, or may be discarded after a predetermined period of time. Also, when the buffer becomes full, the new input (data) may be discarded, or the oldest data may be discarded. Further, the input selection unit 261 measures and stores the processing time associated with buffering. Alternatively, the processing time associated with buffering may be included in the data (for example, correctionField 178 in FIG. 11), or may be added before or after the data.

また、2つの入力(データ入力)が同時にあった場合は、事前に、あるいは冗長化通信制御部250に対して設定済みの入力を常に選択してもよいし、それぞれの入力データの内容に基づいて選択してもよい。選択されない入力は廃棄してもよいし、バッファを用いて保持してもよい。バッファに保持されたデータの扱いは上記と同様である。 Also, when there are two inputs (data inputs) at the same time, the input set in advance or for the redundant communication control unit 250 may always be selected, or based on the content of each input data. can be selected. Unselected inputs may be discarded or retained using a buffer. The handling of data held in the buffer is the same as above.

経路制御部262は、バス264c、バス264eから入力されたデータをバス264b、バス264dの一方もしくは両方に出力する。これは入力データの内容または制御用ネットワーク242との接続状態、バス106との接続状態に基づいて制御する。 The path control unit 262 outputs data input from the buses 264c and 264e to one or both of the buses 264b and 264d. This is controlled based on the contents of the input data, the state of connection with the control network 242, and the state of connection with the bus 106. FIG.

時刻補正部263は、経路制御部262から入力されたデータ上の時刻情報を補正する。 The time corrector 263 corrects the time information on the data input from the route controller 262 .

バス264は、機能部、ハードウェア間を接続するバスである。バス264aとバス264bは、バス106であるが、説明の便宜上、バス106と区別して示している。 A bus 264 is a bus that connects the functional units and the hardware. Although the bus 264a and the bus 264b are the bus 106, they are shown separately from the bus 106 for convenience of explanation.

計時部265は、所定の事象の発生時または発生期間を計時する機能部である。実装として、タイマと、少なくとも所定事象を受けた時点のタイマ値の記憶手段から構成される。 The clock unit 265 is a functional unit that clocks the occurrence of a predetermined event or the occurrence period. As an implementation, it is composed of a timer and storage means for at least the timer value at the time when a predetermined event is received.

所定の事象とは、特定のパケット、データグラムの送信時、または受信時や、各機能部へのEthernetフレームまたはデータグラムの入力、出力等が例示される。 The predetermined event is exemplified by transmission or reception of a specific packet or datagram, input or output of an Ethernet frame or datagram to each functional unit, and the like.

通信遅延記憶部266は、通信遅延に異常が発生して、変更された通信経路にかかわる情報を記憶する。それは、通信遅延そのものであってもよいし、変更後の通信遅延を算出可能な値であってもよい。また、変更前の正常時の通信遅延を記憶していてもよい。 The communication delay storage unit 266 stores information related to a communication path changed due to an abnormality in communication delay. It may be the communication delay itself, or may be a value from which the changed communication delay can be calculated. Also, the normal communication delay before the change may be stored.

(EtherCATでの時刻同期とスレーブ動作)
本発明は、冗長経路へパケットを転送する際の同期パケット上の時刻情報を補正することで、冗長経路の利用による高信頼化と時刻同期の両立を図る。本実施例においては、被制御装置241の動作が関係する。IEC61158、IEC61784パート2のCommunication Profile Family 12で定義されるEtherCAT仕様に準拠した被制御装置241を例に説明する。ただし、本発明の効果はEtherCAT仕様に限定されない。
(Time synchronization and slave operation with EtherCAT)
The present invention aims to achieve both high reliability and time synchronization by using redundant paths by correcting the time information in the synchronization packets when transferring packets to redundant paths. In this embodiment, the operation of the controlled device 241 is concerned. A controlled device 241 conforming to the EtherCAT specifications defined in Communication Profile Family 12 of IEC61158 and IEC61784 Part 2 will be described as an example. However, the effects of the present invention are not limited to the EtherCAT specifications.

(被制御装置241の説明)
図15に被制御装置241におけるハードウェア構成を示す。
(Explanation of controlled device 241)
FIG. 15 shows the hardware configuration of the controlled device 241. As shown in FIG.

通信ハードウェア270は、CPU101、複数のPHY103、不揮発性記憶媒体105、スレーブIC271を備えている。CPU101、複数のPHY103、不揮発性記憶媒体105、スレーブIC271は、処理手段に属する要素として構成され、複数のPHY103は、送受信手段に属する要素として構成される。 The communication hardware 270 includes a CPU 101 , multiple PHYs 103 , a nonvolatile storage medium 105 and a slave IC 271 . The CPU 101, the plurality of PHYs 103, the nonvolatile storage medium 105, and the slave IC 271 are configured as elements belonging to the processing means, and the plurality of PHYs 103 are configured as elements belonging to the transmitting/receiving means.

通信ハードウェア270は、被制御装置241における通信機能を実現する。実際の構成では、CPU101に周辺デバイスが接続し、センサやアクチュエータを制御するが、本発明の効果に関して説明するため、周辺デバイスは図15には図示していない。また、構成によっては、CPU101を有せず、スレーブIC271から直接、周辺デバイスに接続する構成であってもよい。また、ライントポロジを構成するため、通信機能であるPHY103を2つ有している。ただし、終端デバイスとして構成する場合は、PHY103は1つでもよいし、パケットを周回させることができれば3つ以上であってもよい。図16のスレーブIC271は、4つのPHY103と接続可能な構成を示している。 The communication hardware 270 implements communication functions in the controlled device 241 . In an actual configuration, peripheral devices are connected to the CPU 101 to control sensors and actuators, but the peripheral devices are not shown in FIG. 15 in order to explain the effects of the present invention. Depending on the configuration, the slave IC 271 may be directly connected to a peripheral device without having the CPU 101 . Moreover, it has two PHYs 103 which are communication functions in order to construct a line topology. However, when configured as a terminal device, the number of PHYs 103 may be one, or may be three or more as long as packets can be circulated. The slave IC 271 in FIG. 16 shows a configuration connectable to four PHYs 103 .

スレーブIC271は、IEC61158、IEC61784パート2のCommunication Profile Family 12で定義されるEtherCAT仕様に準拠したスレーブ専用のICである。 The slave IC 271 is a slave-dedicated IC conforming to the EtherCAT specifications defined by Communication Profile Family 12 of IEC61158 and IEC61784 Part 2.

(スレーブICの説明)
スレーブIC271の構成を図16に示す。
(Explanation of slave IC)
The configuration of the slave IC 271 is shown in FIG.

スレーブIC271は、EtherCAT Processing Unit280、4つの自動転送部281(281a~281d)、4つのループバック機能部282(282a~282d)を備えている。 The slave IC 271 includes an EtherCAT Processing Unit 280, four automatic transfer units 281 (281a-281d), and four loopback function units 282 (282a-282d).

EtherCAT Processing Unit280は、EtherCAT仕様に準拠して、通信処理を実行するICである。EtherCAT Processing Unit280は、所定の事象に関連して、計時する機能を有する。具体的には、所定のアドレスにアクセスする、所定のコマンドを受信した場合に、各通信ポートで受信した時刻を計時し、レジスタとして公開する。制御用計算機240は、該レジスタにアクセスして、これらの時刻を取得可能である。 The EtherCAT Processing Unit 280 is an IC that executes communication processing in compliance with the EtherCAT specifications. The EtherCAT Processing Unit 280 has the function of timing in relation to a given event. Specifically, when a predetermined command for accessing a predetermined address is received, the time received at each communication port is counted and disclosed as a register. The control computer 240 can access these registers to obtain these times.

EtherCAT Processing Unit280は、バス283を介して、CPU101、あるいは周辺デバイスと接続し、CPU101、あるいは周辺デバイスへのEtherCATに関する情報の通知、あるいはCPU101からEtherCAT Processing Unit280を設定するため、あるいは周辺デバイスの情報をEtherCAT Processing Unit280に通知するために用いられる。また、バス283上に割込み信号をもうけてもよい。割込みを通知する方向は、EtherCAT Processing Unit280から対向装置(CPU101または周辺デバイス)でも構わないし、対向装置からEtherCAT Processing Unit280でもよい。 The EtherCAT Processing Unit 280 is connected to the CPU 101 or peripheral devices via a bus 283, and is used for notifying the CPU 101 or peripheral devices of EtherCAT-related information, or for setting the EtherCAT Processing Unit 280 from the CPU 101, or receiving peripheral device information. Used to notify the EtherCAT Processing Unit 280. An interrupt signal may also be provided on bus 283 . The direction of interrupt notification may be from the EtherCAT Processing Unit 280 to the opposite device (CPU 101 or peripheral device) or from the opposite device to the EtherCAT Processing Unit 280 .

自動転送部281は、受信したパケットを、隣接する通信ポートへ転送する機能部である。転送方向は、図16に示すとおり、スレーブIC271内で一定になっている。 The automatic transfer unit 281 is a functional unit that transfers received packets to adjacent communication ports. The transfer direction is constant within the slave IC 271 as shown in FIG.

ループバック機能部282は、EtherCAT Processing Unit280からの設定とループバック機能部282が接続する通信経路の接続状態によって、通信ポートへパケットを送信するか、あるいは隣接するループバック機能部282へパケットを転送する機能部である。ループバック機能部282は、制御用計算機240から送信される通信内容にしたがって、EtherCAT Processing Unit280によって設定される。その設定内容の例として、接続している通信ポートの設定状態によってパケットの送信経路を切り替えるAutoモードがある。Autoモードでは、通信ポートを介して隣接する制御用計算機240、あるいは被制御装置241と通信が確立している場合は、ループバック機能部282は通信ポートへパケットを送信する。あるいは、通信経路が接続していないか、通信経路中に異常、故障があり、隣接する制御用計算機240、あるいは被制御装置241と通信経路が確立していない場合は、ループバック機能部282は隣接するループバック機能部282へパケットを転送する。 The loopback function unit 282 transmits the packet to the communication port or transfers the packet to the adjacent loopback function unit 282 depending on the setting from the EtherCAT Processing Unit 280 and the connection state of the communication path to which the loopback function unit 282 is connected. It is a functional part that The loopback function unit 282 is set by the EtherCAT Processing Unit 280 according to the communication content sent from the control computer 240 . As an example of the setting contents, there is an Auto mode in which the packet transmission path is switched according to the setting state of the connected communication port. In Auto mode, when communication is established with the control computer 240 or the controlled device 241 adjacent via the communication port, the loopback function unit 282 transmits packets to the communication port. Alternatively, if the communication path is not connected, or there is an abnormality or failure in the communication path, and the communication path with the adjacent control computer 240 or controlled device 241 is not established, the loopback function unit 282 The packet is transferred to the adjacent loopback function unit 282 .

なお、EtherCAT仕様に限定せずに、被制御装置241は通信経路の異常に対して、パケットを制御用計算機240へ折り返す機能を有していれば、本発明の効果は失われない。すなわち、CPU101が通信経路の異常を検知して、パケットを折り返す方法や、制御用計算機240が被制御装置241に対して、パケットを折り返すように設定してもよい。被制御装置241における通信経路の異常の判定方法は、IEEE802.3で規定されるMDI(Management Data Interface)におけるPHY ICの状態レジスタのリンクステータスを用いる方法や、PHY ICで一般的に用いられるLED点灯用の出力信号を、CPU101や、別途もうけるFPGA、CPLD等(図示なし)で用いる方法が例示される。制御用計算機240における通信経路の異常の判定方法は、パケットを送信してから、受信する前に所定期間が経過したかどうかや、応答パケットがないこと、あるいは各被制御装置241が所定規則にしたがって操作(加減乗除など)するパラメータをパケット上に設け、応答パケットの該値を評価する方法(後述するワーキングカウンタを用いる方法等)が例示される。 The effect of the present invention is not lost as long as the controlled device 241 has a function to return packets to the control computer 240 in response to an abnormality in the communication path, without being limited to the EtherCAT specification. That is, the CPU 101 may detect an abnormality in the communication path and return the packet, or the control computer 240 may be set to return the packet to the controlled device 241 . The method of determining abnormality of the communication path in the controlled device 241 includes a method using the link status of the PHY IC status register in MDI (Management Data Interface) defined by IEEE 802.3, and a method using an LED generally used in the PHY IC. A method of using an output signal for lighting in the CPU 101 or separately provided FPGA, CPLD, or the like (not shown) is exemplified. The control computer 240 determines whether a communication path is abnormal by checking whether a predetermined period of time has elapsed after sending a packet before receiving it, whether there is no response packet, or whether each controlled device 241 is in compliance with a predetermined rule. Therefore, a method of providing a parameter to be manipulated (addition, subtraction, multiplication, division, etc.) on the packet and evaluating the value of the response packet (method of using a working counter, etc., which will be described later) is exemplified.

(スレーブの時刻同期機能)
また、被制御装置241における時刻同期機能について説明する。
(Slave time synchronization function)
Also, the time synchronization function of the controlled device 241 will be described.

被制御装置241は、基準時刻に同期するための機能を具える。例えば、被制御装置241自身の管理する時刻(以下、ローカルクロックとする)と、基準時刻との差(以下、時刻オフセットとする)を保持し、ローカルクロックを基準時刻に同期する。あるいは、基準時刻を有する被制御装置241(制御用計算機240でもよい)と被制御装置241間の通信遅延を、時刻オフセットとは別に管理し、時刻オフセットとあわせて、ローカルクロックを基準時刻に同期してもよい。 The controlled device 241 has a function for synchronizing with the reference time. For example, the difference between the time managed by the controlled device 241 itself (hereinafter referred to as local clock) and the reference time (hereinafter referred to as time offset) is held, and the local clock is synchronized with the reference time. Alternatively, the communication delay between the controlled device 241 (which may be the control computer 240) having a reference time and the controlled device 241 is managed separately from the time offset, and together with the time offset, the local clock is synchronized with the reference time. You may

図17を例に、これらの動作を説明する。スレーブAのローカルクロックを基準時刻とし、スレーブBが同期する場合を説明する。スレーブBにおける時刻オフセットOffsetBは以下の(7)式によって求める。 These operations will be described using FIG. 17 as an example. A case where slave B synchronizes with the local clock of slave A as a reference time will be described. A time offset OffsetB in the slave B is obtained by the following equation (7).

OffsetB = TAP - TBP ・・・(7) OffsetB= TAP - TBP (7)

スレーブBとスレーブA間の通信遅延tdiffABと、時刻オフセットOffsetBを用いて、スレーブBのローカルクロックCは、次の(8)式のように基準時刻Cに同期させる。スレーブBにおける同期時刻をCrefBとする。 Using the communication delay tdiffAB between the slaves B and A and the time offset OffsetB, the local clock CB of the slave B is synchronized with the reference time CA as shown in the following equation (8). Let the synchronization time in slave B be CrefB.

CrefB = C + OffsetB - tdiffAB ・・・(8) CrefB= CB +OffsetB-tdiffAB (8)

通信遅延tdiffABは、スレーブAとスレーブBにおけるタイムスタンプTa、Tb、Td、Teを用いて計算することができる(tdiffAB=((Te-Ta)―(Td-Tb))/2)。これらのタイムスタンプTa、Tb、Td、Teは、専用のデータグラムを受信した際に記録され、この専用データグラムは、例えば物理アドレス0x0900(ポート0における受信時刻レジスタ)に対する4byteサイズのBWR(ブロードキャストライト)コマンドである。以降、このデータグラムをタイムスタンプ用データグラムとして説明する。 The communication delay tdiffAB can be calculated using the time stamps Ta, Tb, Td, Te at slave A and slave B (tdiffAB=((Te-Ta)-(Td-Tb))/2). These time stamps Ta, Tb, Td, and Te are recorded when a dedicated datagram is received, and this dedicated datagram is, for example, a 4-byte size BWR (broadcast write) command. Hereinafter, this datagram will be described as a time stamp datagram.

スレーブ間の通信遅延を積算することで、基準時刻を提供する基準スレーブ(図17のスレーブA)と、それ以外のスレーブとの通信遅延を求めることができ、スレーブごとに時刻オフセットを求めることで、EtherCATネットワークにおけるスレーブは基準スレーブに時刻同期することができる。 By accumulating communication delays between slaves, communication delays between the reference slave that provides the reference time (slave A in FIG. 17) and other slaves can be obtained. , a slave in an EtherCAT network can be time-synchronized to a reference slave.

なお、時刻オフセットや、通信遅延は複数回求めて最小値あるいは最大値を用いてもよいし、平均値や統計処理を施した数値を用いてもよい。 Note that the time offset and communication delay may be determined multiple times and the minimum or maximum value may be used, or an average value or a numerical value subjected to statistical processing may be used.

また、基準時刻の計算においても(8)式による推定だけでなく、定期的に基準時刻を取得し、基準時刻を所定の数学モデルで近似する方法が例示される。 Also, in the calculation of the reference time, in addition to the estimation by the formula (8), a method of periodically acquiring the reference time and approximating the reference time with a predetermined mathematical model is exemplified.

加えて、各スレーブのローカルクロックの基準となる物理的な精度誤差(例えば、水晶振動子の誤差)から、一度同期をしたとしても、経時にしたがい同期精度は低下していく。 In addition, even once synchronization is achieved, the accuracy of synchronization decreases over time due to physical accuracy errors (for example, crystal oscillator errors) that serve as a reference for the local clock of each slave.

これを防止するため、定期的に基準スレーブの基準時刻をスレーブ群に配信し、時刻同期する。この基準スレーブの時刻配信に用いられるデータグラムとして、物理アドレス0x0910(システムタイムレジスタ)に対する8byteサイズのARMW(オートインクリメントリード、マルチプルライト)コマンドあるいはFRMW(Configured Read Multiple Write)が例示される。これは指定のスレーブ(例えば基準スレーブ)に対してリード命令となり、それ以外のスレーブに対してライト命令となるコマンドである。このコマンドを用いて基準スレーブの基準時刻をリードし、基準スレーブ以外のスレーブに対して基準時刻を配信する。以降、基準時刻配信用のデータグラムを基準時刻配信用データグラムとして説明する。 In order to prevent this, the reference time of the reference slave is periodically distributed to the slave group for time synchronization. An 8-byte size ARMW (Auto Increment Read, Multiple Write) command or FRMW (Configured Read Multiple Write) for physical address 0x0910 (system time register) is exemplified as a datagram used for time distribution of this reference slave. This command is a read command for a designated slave (for example, a reference slave) and a write command for other slaves. This command is used to read the reference time of the reference slave and distribute the reference time to slaves other than the reference slave. Hereinafter, the datagram for reference time distribution will be described as the datagram for reference time distribution.

(EtherCATスレーブのタイムスタンプ)
EtherCATにおいては、スレーブ間の通信遅延を計算するために図17で示す機能を有している。すなわち、所定のパケットの受信にともなって、各通信ポートでの受信時刻(Ta、Tb、Tc、Td、Te)やEtherCAT Processing Unit280での受信時刻(TAP、TBP、TCP)を計時する機能を具える。なお、スレーブ間の通信遅延を求めることができれば、被制御装置241が具えなければならない機能は上記の計時機能に限定されない。例えば、NTP(Network Time Protocol)やIEEE1588のバウンダリクロック機能や、end-to-end TC(Transparent Clock)、peer-to―peer TC(Transparent Clock)、あるいはそれらに類する機能を用いることが例示される。
(Time stamp of EtherCAT slave)
EtherCAT has the function shown in FIG. 17 to calculate the communication delay between slaves. That is, when a predetermined packet is received, the reception time (Ta, Tb, Tc, Td, Te) at each communication port and the reception time (T AP , T BP , T CP ) at the EtherCAT Processing Unit 280 are measured. have a function. It should be noted that the function that the controlled device 241 must have is not limited to the above timekeeping function, as long as the communication delay between slaves can be obtained. For example, NTP (Network Time Protocol), IEEE 1588 boundary clock function, end-to-end TC (Transparent Clock), peer-to-peer TC (Transparent Clock), or similar functions are used. .

(動作シーケンス)
本実施例における動作を図18(経路異常が発生していない場合)、図19(経路異常が発生している場合)を用いて説明する。本実施例の動作を説明するため、冗長化通信制御部250における経路制御部262、時刻補正部263を中心に説明する。出力選択部260、入力選択部261については図示していない。送信部132はTx、受信部133はRxとして図示している。
(operation sequence)
The operation of this embodiment will be described with reference to FIG. 18 (when path abnormality does not occur) and FIG. 19 (when path abnormality occurs). In order to explain the operation of this embodiment, the route control unit 262 and the time correction unit 263 in the redundant communication control unit 250 will be mainly explained. The output selection section 260 and the input selection section 261 are not shown. The transmitter 132 is illustrated as Tx, and the receiver 133 is illustrated as Rx.

図18、図19では、図17に示す時刻同期プロトコルによって、各被制御装置241間の通信遅延は既知の状態とする。なお、被制御装置241aがEtherCATネットワーク全体の基準時刻を提供する基準スレーブとなる。 18 and 19, the communication delay between each controlled device 241 is assumed to be known by the time synchronization protocol shown in FIG. Note that the controlled device 241a serves as a reference slave that provides the reference time for the entire EtherCAT network.

また、冗長化通信制御部250の送信部132、受信部133あるいはPHY103において、タイムスタンプ用データグラムの送信時刻、受信時刻を計時部265にて計時し、図17と同様の方法により、制御用計算機240と基準スレーブ間の通信遅延を算出することが例示される。この通信遅延を用いて、制御用計算機240自体を被制御装置241aと同期できる。 In addition, in the transmission unit 132, the reception unit 133, or the PHY 103 of the redundant communication control unit 250, the transmission time and the reception time of the time stamp datagram are measured by the time measurement unit 265, and the control Calculating the communication delay between calculator 240 and the reference slave is illustrated. Using this communication delay, the control computer 240 itself can be synchronized with the controlled device 241a.

被制御装置241bに着目した場合、基準スレーブである被制御装置241aとの通信遅延はtABであり、この値を制御用計算機240から設定されて被制御装置241bは自身に保持する。また、基準スレーブとの遅延として被制御装置241cはtAB+tBC、被制御装置241dはtAB+tBC+tCDの値をそれぞれ保持する。 Focusing on the controlled device 241b, the communication delay with the controlled device 241a, which is the reference slave, is tAB. This value is set by the control computer 240 and the controlled device 241b holds it. Also, as the delay from the reference slave, the controlled device 241c holds a value of tAB+tBC, and the controlled device 241d holds a value of tAB+tBC+tCD.

ここで、被制御装置241aと被制御装置241b間の通信経路で異常が発生した場合(図19)、被制御装置241aは経路異常を検知して、冗長化通信制御部250へとパケットを折り返す。 Here, when an abnormality occurs in the communication path between the controlled device 241a and the controlled device 241b (FIG. 19), the controlled device 241a detects the path abnormality and returns the packet to the redundant communication control unit 250. .

冗長化通信制御部250では、経路制御部262にて経路を制御し、冗長ポートの送信部132へと転送する。結果、パケットは、被制御装置241b、被制御装置241c、被制御装置241dと、順に転送され、全ての被制御装置241へと伝送される。 In the redundant communication control unit 250, the route control unit 262 controls the route and transfers it to the transmission unit 132 of the redundant port. As a result, the packet is transferred to the controlled device 241 b , the controlled device 241 c , and the controlled device 241 d in order, and is transmitted to all the controlled devices 241 .

このとき、被制御装置241b、被制御装置241c、被制御装置241dへは本来の経路(図18)とは異なる経路を経由するため、基準時刻配信用データグラムで基準時刻を受信しても、誤って同期計算をする。そこで、時刻補正部263において、経路異常発生時の基準時刻配信用データグラム上の時刻を補正して、冗長ポートから送信する。具体的には、以下のように遅延が変化する。遅延が変化する箇所は被制御装置241aと被制御装置241b間であり、経路異常がない場合の遅延(第一の通信遅延)は、tABである。経路異常が発生した場合は、被制御装置241aと被制御装置241b間の遅延(第二の通信遅延)Dchは、Dch=tAm’+tmD+tDC+tCB+tBに変化する。 At this time, since the controlled device 241b, the controlled device 241c, and the controlled device 241d go through a route different from the original route (FIG. 18), even if the reference time is received in the reference time distribution datagram, Inadvertently make synchronous calculations. Therefore, the time correction unit 263 corrects the time on the reference time distribution datagram at the time of occurrence of the path abnormality, and transmits it from the redundant port. Specifically, the delay changes as follows. The location where the delay changes is between the controlled device 241a and the controlled device 241b, and the delay (first communication delay) when there is no path abnormality is tAB. When a path abnormality occurs, the delay (second communication delay) Dch between the controlled device 241a and the controlled device 241b changes to Dch=tAm'+tmD+tDC+tCB+tB.

したがって、遅延tABと遅延Dchとの差分である遅延変化分は、Dch―tABとなり、時刻補正部263は、基準時刻配信用データグラム上の基準時刻Toldを次の(9)式ように補正する。 Therefore, the delay variation, which is the difference between the delay tAB and the delay Dch, is Dch-tAB, and the time correction unit 263 corrects the reference time Told on the reference time distribution datagram as shown in the following equation (9). .

Tnew = Told + Dch ― tAB ・・・(9) Tnew=Told+Dch-tAB (9)

具体例を用いて説明する。
今、Toldが10秒000で、tABが10マイクロ秒であったとする。被制御装置241bが基準時刻配信用データグラムを受信した際の被制御装置241bのローカルクロックCb1が11秒10マイクロ秒だったとする。
A specific example will be used for explanation.
Suppose now that Told is 10 seconds 000 and tAB is 10 microseconds. Assume that the local clock Cb1 of the controlled device 241b is 11 seconds and 10 microseconds when the controlled device 241b receives the reference time distribution datagram.

経路異常がない状態では、被制御装置241bが基準時刻配信用データグラムを受信した際の基準スレーブの時刻Ca1は10秒10マイクロ秒(Told+tAB)である。したがって、被制御装置241aと被制御装置241bの時刻オフセットOffsetは次の(10)式となる。 When there is no path abnormality, the time Ca1 of the reference slave when the controlled device 241b receives the reference time delivery datagram is 10 seconds and 10 microseconds (Told+tAB). Therefore, the time offset Offset between the controlled device 241a and the controlled device 241b is given by the following equation (10).

Offset = Ca1 - Cb1
= 10秒10マイクロ秒 - 11秒10マイクロ秒
= -1秒 ・・・(10)
Offset = Ca1 - Cb1
= 10 seconds 10 microseconds - 11 seconds 10 microseconds
= -1 second (10)

したがって、被制御装置241bにおける同期時刻Crefは被制御装置241bにおけるローカルクロックCbと時刻オフセットOffsetを用いて次の(11)式で求まる。 Therefore, the synchronization time Cref in the controlled device 241b is obtained by the following equation (11) using the local clock Cb and the time offset Offset in the controlled device 241b.

Cref = Cb + Offset ・・・(11) Cref=Cb+Offset (11)

経路異常が発生したとして、Toldを補正する場合は、時刻補正部263にて、次の(12)式を実行する。ここで、Dchが50マイクロ秒だったとする。 When correcting Told on the assumption that a path abnormality has occurred, the time correction unit 263 executes the following equation (12). Here, assume that Dch is 50 microseconds.

Tnew = Told + Dch - tAB
= 10秒000 + 50マイクロ秒 ― 10マイクロ秒
= 10秒40マイクロ秒 ・・・(12)
Tnew = Told + Dch - tAB
= 10 seconds 000 + 50 microseconds - 10 microseconds
= 10 seconds 40 microseconds (12)

経路異常の場合、被制御装置241bで基準時刻配信用データグラムを受信した際の被制御装置241bのローカルクロックCb2は11秒50マイクロ秒(Cb1-tAB+Dch)となる。 In the case of path abnormality, the local clock Cb2 of the controlled device 241b when the controlled device 241b receives the reference time distribution datagram is 11 seconds and 50 microseconds (Cb1-tAB+Dch).

このとき、基準スレーブの時刻Ca2は10秒50マイクロ秒(Told+Dch=Tnew+tAB)である。被制御装置241bは、従来どおり、基準スレーブとの遅延(第一の通信遅延)tABを用いて、基準スレーブの時刻を推定する。したがって、被制御装置241bと被制御装置241aの時刻オフセットOffsetは次の(13)式となる。 At this time, the time Ca2 of the reference slave is 10 seconds and 50 microseconds (Told+Dch=Tnew+tAB). The controlled device 241b estimates the time of the reference slave using the delay (first communication delay) tAB with respect to the reference slave as in the conventional art. Therefore, the time offset Offset between the controlled device 241b and the controlled device 241a is given by the following equation (13).

Offset = Ca2 - Cb2
= Tnew + tAB - Cb2
= 10秒40マイクロ秒 + 10マイクロ秒 - 11秒50マイクロ秒
= -1秒 ・・・(13)
Offset = Ca2 - Cb2
= Tnew + tAB - Cb2
= 10 seconds 40 microseconds + 10 microseconds - 11 seconds 50 microseconds
= -1 second (13)

したがって、被制御装置241bは、自身が保持している遅延tABの情報をそのまま利用し、従来どおり、基準スレーブとの時刻同期を実行できる。つまり、経路異常箇所以降に位置するスレーブであっても、経路異常の発生を意識することなく、同期処理を実行できる。 Therefore, the controlled device 241b can use the information of the delay tAB held by itself as it is, and can perform time synchronization with the reference slave as before. In other words, even slaves positioned after the path abnormality point can execute synchronization processing without being conscious of the occurrence of the path abnormality.

なお、遅延(第二の通信遅延)Dch=tAm’+tmD+tDC+tCB+tBの算出において、tDC、tCBは、図17に示す時刻同期プロトコルの過程で算出可能である。tAm’、tmDは、前述のとおり、冗長化通信制御部250における遅延計測により算出可能である。tmDは、遅延の一部に冗長化通信制御部250内の遅延を含むが、計時部265で計測可能である。図18と図19でtmDの経路は異なるが、冗長化通信制御部250内部の遅延として等価としている。もし遅延が異なれば、その差を踏まえて補正する。tBは、被制御装置241b内の遅延であり、被制御装置241bまたはスレーブIC271の仕様であり、既知である。 In calculating the delay (second communication delay) Dch=tAm'+tmD+tDC+tCB+tB, tDC and tCB can be calculated in the process of the time synchronization protocol shown in FIG. tAm' and tmD can be calculated by delay measurement in the redundant communication control unit 250 as described above. tmD includes the delay in redundant communication control section 250 as part of the delay, but can be measured by timer section 265 . Although the paths of tmD are different between FIG. 18 and FIG. 19, they are assumed to be equivalent as delays inside the redundant communication control unit 250 . If the delays are different, correct for the difference. tB is the delay within the controlled device 241b, is the specification of the controlled device 241b or the slave IC 271, and is known.

また、入力選択部261でデータを出力するまでに遅延が生じる場合は、これを計測し、補正時刻の算出に反映してもよい。 If there is a delay before data is output by the input selector 261, the delay may be measured and reflected in the calculation of the correction time.

また、時刻補正に用いる遅延は継続的に計測してもよいし、システムの再稼働時、経路状態の変更等の所定事象の発生時に計測し直してもよい。 Further, the delay used for time correction may be continuously measured, or may be re-measured when a predetermined event such as a change in the route state occurs, or when the system is restarted.

(実現に必要な機能)
以上の仕組みを実現するためには、経路制御部262で経路を制御するための経路異常発生の判定と経路制御、時刻補正部263における遅延変化分を決定するための経路異常位置の特定が必要である。これらについて以下説明する。
(Functions required for realization)
In order to realize the above mechanism, it is necessary to determine the occurrence of a path abnormality and perform path control for controlling the path in the path control section 262, and to specify the location of the path abnormality in order to determine the amount of delay change in the time correction section 263. is. These are described below.

(経路異常の発生)
はじめに、冗長ポートからパケットを受信する前に、主ポートからパケットを受信したかどうかをみる方法が例示される。冗長ポートでパケットを受信せず、主ポートで受信した場合に、通信経路を異常と判定する。
(Occurrence of route abnormality)
First, a method of checking whether a packet has been received from the primary port before receiving a packet from the redundant port is exemplified. If a packet is not received by the redundant port but is received by the main port, the communication path is determined to be abnormal.

また、異常判定の方法として、全てのスレーブが処理すべきレジスタに対するBRD(Broadcast Read)コマンドをEtherCATフレームに付与し、そのワーキングカウンタを見る方法が例示される。EtherCATフレームのワーキングカウンタの値が、事前に設定した所定数よりも小さければ通信経路を異常と判定する。例えば、図19の場合、主ポートで該コマンドを含むデータグラムを受信すると、被制御装置241aのみがワーキングカウンタに1を足すため、受信したテレグラムのワーキングカウンタの値は1となっている。これは全スレーブ数4よりも小さいため、異常の発生及び異常の発生位置を特定できる。全スレーブ数は事前に通信遅延記憶部266等に記憶しておくことが例示される。これは、例えば、主ポートが同期パケットを受信した際に、記憶した送受信情報(ワーキングカウンタ)の中に冗長ポートから同期パケットを送信済みであることを示す情報が存在しない場合であり、経路異常と判定され、主ポートが受信した同期パケットは冗長ポートに転送される。 Further, as a method for judging an abnormality, a method is exemplified in which a BRD (Broadcast Read) command for a register to be processed by all slaves is added to an EtherCAT frame and the working counter is checked. If the value of the working counter of the EtherCAT frame is smaller than a preset number, the communication path is determined to be abnormal. For example, in the case of FIG. 19, when a datagram including the command is received at the main port, only the controlled device 241a adds 1 to the working counter, so the value of the working counter of the received telegram is 1. Since this is smaller than the total number of slaves, which is 4, the occurrence of an abnormality and the location of the occurrence of the abnormality can be identified. For example, the total number of slaves is stored in advance in the communication delay storage unit 266 or the like. This is the case, for example, when the main port receives a synchronous packet and there is no information in the stored transmission/reception information (working counter) indicating that the synchronous packet has been sent from the redundant port, and the path is abnormal. , and the synchronization packet received by the primary port is forwarded to the redundant port.

これらの異常判定の方法は組み合わせて用いてもよい。いずれかの判定方法によって異常と判定した場合に異常と判定してもよいし(論理和)、両方の判定方法で異常と判定した場合に異常と判定してもよい(論理積)。 These abnormality determination methods may be used in combination. It may be determined that there is an abnormality when it is determined to be abnormal by one of the determination methods (logical sum), or it may be determined to be abnormal when it is determined to be abnormal by both determination methods (logical product).

なお、冗長ポートに接続する通信経路に異常がある場合、主ポートから送信されたパケットは冗長ポートで受信する前に主ポートで受信するが、BRDコマンドのワーキングカウンタの値は全スレーブ数と一致する。この場合、主ポートで受信したパケットは冗長ポートへ転送してもよいし、通信経路の異常をユーザやオペレータに通知して、パケットは冗長化通信制御部250内部に取り込んでもよい。 If there is an error in the communication path connecting to the redundant port, the packet sent from the main port will be received by the main port before being received by the redundant port, but the value of the working counter of the BRD command will match the number of all slaves. do. In this case, the packet received by the main port may be transferred to the redundant port, or the user or operator may be notified of the abnormality in the communication path and the packet may be taken into the redundant communication control unit 250 .

(EtherCATフレームとWKCの説明)
EtherCATのパケット構成を図20に示す。EtherCATの通信内容は、Ethernetフレーム290のデータ領域292に格納される。EtherCATにおける、Ethernetヘッダ291のTypeフィールドは0x88A4である。データが正しいかどうかをFCS(Frame Check Sequence)293を用いて検査する。
(Description of EtherCAT frame and WKC)
FIG. 20 shows the EtherCAT packet configuration. EtherCAT communication content is stored in the data area 292 of the Ethernet frame 290 . The Type field of the Ethernet header 291 in EtherCAT is 0x88A4. An FCS (Frame Check Sequence) 293 is used to check whether the data is correct.

EtherCATのデータ構造は、EtherCATヘッダ294と、ひとつ、または複数のデータグラム295で構成され、データグラム295は、データグラムヘッダ296、データ297、ワーキングカウンタ(WKC)298から構成される。ワーキングカウンタ298は、そのデータグラム295を処理すべきスレーブで正しく処理されるたびに、スレーブによって所定の数だけカウントアップされるフィールドである。なお、データグラムヘッダ296には、コマンド299、インデックス(index)300、アドレス301、データサイズ302、予約303、C304、M305、IRQ306が含まれる。 The EtherCAT data structure consists of an EtherCAT header 294 and one or more datagrams 295 , each of which consists of a datagram header 296 , data 297 and a working counter (WKC) 298 . Working counter 298 is a field that is incremented by a predetermined number by a slave each time that datagram 295 is successfully processed by the slave to process it. Datagram header 296 includes command 299, index 300, address 301, data size 302, reservation 303, C304, M305, and IRQ306.

(通信経路異常の発生箇所の特定方法)
あるいは、各スレーブの各通信ポートのロストリンクカウンタレジスタを読み、非ゼロの値が取得された通信ポートが接続する通信経路が異常であると判定する。なお、ロストリンクカウンタレジスタは読み込みと同時に、書込みによってレジスタ値をクリアしてもよい。以上の方法によって、通信経路の異常が起きたと判定した位置を特定できる。これはCPU101上で動作するプログラム等に提示してもよい。
(Method of Identifying Location of Communication Path Abnormality)
Alternatively, the lost link counter register of each communication port of each slave is read, and it is determined that the communication path connected to the communication port from which a non-zero value is obtained is abnormal. The lost link counter register may be cleared by writing at the same time as reading. By the above method, it is possible to identify the position where it is determined that the abnormality of the communication path has occurred. This may be presented to a program or the like operating on the CPU 101 .

(変化遅延を制御用計算機240で保持)
本発明を実現する上で、補正する遅延を算出する必要がある。補正する遅延は、経路異常の発生位置によって変わる。したがって、経路異常の発生位置を特定する必要がある。これは前記のとおり、ワーキングカウンタ298を用いる方法等が例示される。
(The change delay is held in the control computer 240)
To implement the present invention, it is necessary to calculate the delay to be corrected. The delay to be corrected varies depending on the location where the path abnormality occurs. Therefore, it is necessary to identify the position where the route abnormality occurs. This is exemplified by the method using the working counter 298 as described above.

発生位置は、オートインクリメントアドレスを用いたコマンドを用いてもよい。被制御装置241は、オートインクリメントアドレスに対するコマンドを受信すると、アドレス値の一部をカウントアップするため、経路異常発生時に主ポートで受信したアドレス値と初期値を比較することで発生位置を特定することができる。被制御装置241によっては、MACアドレスの一部をカウントアップする場合もあるため、オートインクリメントアドレスと同様の方法により、経路異常の発生位置を特定することができる。 A command using an auto-increment address may be used for the generation position. When the controlled device 241 receives a command for an auto-increment address, it counts up part of the address value, so when a path abnormality occurs, the address value received at the main port is compared with the initial value to identify the location of the occurrence. be able to. Depending on the controlled device 241, a portion of the MAC address may be counted up, so the location where the path abnormality occurs can be identified by the same method as the auto-increment address.

あるいは、スレーブごとに異なる値を所定アドレスに設定し、これを読むことで経路異常位置を特定する方法が例示される。例えば、被制御装置241の数だけのビットのデータを用意し、アクセスされた場合に被制御装置241ごとに異なるビットを1にする方法である。ビット0を最初の被制御装置241、ビット1を2番目の被制御装置241、ビット2を3番目の被制御装置241・・・、と設定する。経路異常の直前の被制御装置241がデータを設定するため、例えば、2番目と3番目の被制御装置241間の通信経路で異常が発生した場合、論理アドレスに対するリードコマンド(LRD)で読み出した値は0x02(1byte、8台分の被制御装置241の場合)となり、ブロードキャストリードコマンドの場合、論理和となるので、読み出した値は0x03となる。 Alternatively, a method is exemplified in which a different value is set for each slave in a predetermined address, and the location of the path abnormality is identified by reading this value. For example, there is a method in which bit data corresponding to the number of controlled devices 241 are prepared, and different bits are set to 1 for each controlled device 241 when accessed. Set bit 0 to the first controlled device 241, bit 1 to the second controlled device 241, bit 2 to the third controlled device 241, and so on. Since data is set by the controlled device 241 immediately before the path abnormality occurs, for example, when an abnormality occurs in the communication path between the second and third controlled devices 241, the data is read by the read command (LRD) for the logical address. The value is 0x02 (1 byte, in the case of eight controlled devices 241), and in the case of the broadcast read command, the logical sum is obtained, so the read value is 0x03.

なお、ビット単位で被制御装置241を割り当てるのではなく、各被制御装置241が所定の値(例えば、単純に順番)を返すようにしてもよい。この場合、ブロードキャストリードコマンドは論理和となるため、論理アドレスに対するリードコマンド(LRD)が望ましい。 Instead of assigning the controlled devices 241 in units of bits, each controlled device 241 may return a predetermined value (for example, simply in order). In this case, the read command (LRD) for the logical address is desirable because the broadcast read command is a logical sum.

発生位置を特定できれば、図17、図19の遅延計測の仕組みによって変化遅延を算出できるため、遅延計測時に経路異常の発生位置と、対応する変化遅延を通信遅延記憶部266に保持しておく。 If the occurrence position can be specified, the change delay can be calculated by the mechanism of delay measurement shown in FIGS.

経路異常時に制御用計算機240でパケットを受信した際、ワーキングカウンタ等の手段から、発生位置を特定し、通信遅延記憶部266から、該当する変化遅延を取得して、時刻補正部263にて基準時刻配信用データグラム上の基準時刻を補正する。 When a packet is received by the control computer 240 at the time of path abnormality, the position of occurrence is specified from means such as a working counter, the corresponding change delay is acquired from the communication delay storage unit 266, and the time correction unit 263 uses it as a reference. Correct the reference time on the time distribution datagram.

(スレーブで変化遅延を保持する)
あるいは変化遅延に関する情報を被制御装置241に格納し、その値を用いてもよい。EtherCATでは、論理アドレスによるアドレス方法を用いることができる。論理アドレスとは、仮想上のアドレス空間であり、任意のスレーブの物理アドレスを対応付けることができる。各スレーブは論理アドレスへのアクセスコマンドを受信した場合、該当の論理アドレスが自身の物理アドレスに割り当てられているかを確認する。もし割り当てられていれば、該当の物理アドレスの情報に対してアクセスする(リードコマンドであればデータグラムに情報を載せ、ライトコマンドであれば該当の物理アドレスにデータを書き込む)。論理アドレスにアクセスすることで、対応付けられたスレーブの物理アドレスの情報にアクセスすることができる。
(hold change delay in slave)
Alternatively, information about the change delay may be stored in the controlled device 241 and the value thereof may be used. EtherCAT can use an addressing method based on logical addresses. A logical address is a virtual address space, and can be associated with a physical address of any slave. When each slave receives an access command to a logical address, it confirms whether the corresponding logical address is assigned to its own physical address. If it is assigned, it accesses the information of the corresponding physical address (if it is a read command, the information is put on the datagram, and if it is a write command, the data is written to the corresponding physical address). By accessing the logical address, it is possible to access the information of the physical address of the associated slave.

(論理アドレスによる補正)
変化遅延の情報取得に論理アドレスの仕組みを用いることができる。
(Correction by logical address)
A logical address scheme can be used to acquire change delay information.

同じ論理アドレスに対して、異なる物理アドレス(同じスレーブまたは異なるスレーブの物理アドレス)が対応付けられた場合、データグラム上のデータは最後にアクセスされた物理アドレスの情報に上書きされる。 When different physical addresses (physical addresses of the same slave or different slaves) are associated with the same logical address, the data on the datagram is overwritten with the information of the last accessed physical address.

したがって、各スレーブに対して、所定の物理アドレス(スレーブによって異なっていてよい)に変化遅延情報を格納し、それらの物理アドレスを同一の論理アドレス(例えば0x10000)に対応付け、EtherCATフレーム上に該論理アドレスへアクセスするリードコマンド(Logical Read:LRD)のデータグラムを格納することが例示される。 Therefore, for each slave, change delay information is stored at a predetermined physical address (which may be different depending on the slave), these physical addresses are associated with the same logical address (eg 0x10000), and the corresponding address is displayed on the EtherCAT frame. Storing a datagram of a read command (Logical Read: LRD) that accesses a logical address is exemplified.

このようにすれば、経路異常発生時に経路異常発生位置で折り返されてマスタで受信した論理アドレスリードコマンドのデータグラムのデータには、経路異常発生位置直前のスレーブ(図19の被制御装置241a)が設定したデータが格納される。つまり、マスタは、経路異常発生位置に応じたデータ(変化遅延情報)を一つのデータグラムで取得することができる。スレーブの変化遅延情報を各スレーブに分散させて保持することで、マスタ内で記憶容量を減らすことができる。これにより、計算機資源に制約のある組み込み機器等でのマスタ装置の実現が可能となる。 In this way, the datagram data of the logical address read command received by the master after being looped back at the path error occurrence position includes the data of the slave (controlled device 241a in FIG. 19) immediately before the path error occurrence position. The data set by is stored. In other words, the master can acquire data (change delay information) corresponding to the path abnormality occurrence position in one datagram. By distributing and holding the change delay information of the slaves in each slave, the storage capacity can be reduced in the master. This makes it possible to implement a master device in an embedded device or the like with limited computer resources.

これを実現するため、事前に変化遅延情報を算出しておき、各被制御装置241に論理アドレスを設定し、変化遅延情報を記憶させておく。 In order to realize this, the change delay information is calculated in advance, the logical address is set in each controlled device 241, and the change delay information is stored.

あるいは、スレーブの数だけデータグラムを付加し、各スレーブが該当するデータグラムに変化遅延情報を格納してもよい。 Alternatively, as many datagrams as there are slaves may be added, and each slave may store the change delay information in the corresponding datagram.

なお、対応付けるデータ領域のサイズは変化遅延の最大値を表現可能なデータサイズに依存する。したがって、変化遅延の分解能や要求精度に依存する。例えば、時間分解能をナノ秒として変化遅延情報の最大値が65535ナノ秒以下であれば16ビット(2byte)で表現可能である。 Note that the size of the associated data area depends on the data size that can express the maximum value of the change delay. Therefore, it depends on the resolution of the change delay and the required accuracy. For example, if the time resolution is nanoseconds and the maximum value of the change delay information is 65535 nanoseconds or less, it can be expressed with 16 bits (2 bytes).

このデータは、時刻補正部263の実装に依存するため、時刻補正部263の処理内容と時間分解能等の処理方法が一致していればよい。 Since this data depends on the implementation of the time correction unit 263, it is sufficient that the processing content of the time correction unit 263 and the processing method such as time resolution match.

また、EtherCATでの制御通信で論理アドレスを用いる場合は、それらの論理アドレス空間と連続するように変化遅延情報の物理アドレスを論理アドレス空間上に対応付けてもよい。このようにすれば、制御用途の論理アドレスアクセス用データグラムと、変化遅延情報の取得用データグラムをまとめられるため、EtherCATフレーム上のデータ利用効率が向上する。 Also, when logical addresses are used for control communication in EtherCAT, the physical addresses of the change delay information may be associated on the logical address space so as to be continuous with those logical address spaces. In this way, the datagram for logical address access for control purposes and the datagram for acquisition of change delay information can be put together, so the data utilization efficiency on the EtherCAT frame is improved.

なお、論理アドレスのかわりに設定済み(configured)アドレスを用いてもよいし、専用のコマンドを定義してもよい。 A configured address may be used instead of the logical address, or a dedicated command may be defined.

また、論理アドレスの代わりにブロードキャストアドレスの利用は困難である。これは、ブロードキャストアドレスへのリードが上書きではなく、論理和であるためである。 Also, it is difficult to use broadcast addresses instead of logical addresses. This is because the read to the broadcast address is a logical sum, not an overwrite.

(マスタの同期)
なお、制御用計算機240自身を基準スレーブに同期する場合は、基準時刻配信用データグラム上の基準時刻を変更していることに注意する必要がある。経路異常がない状態(図18)では、冗長化通信制御部250が基準時刻配信用データグラムを受信した後、遅延tmAと、基準時刻配信用データグラム上の基準時刻Caを用いて同期する。この関係を次の(14)式に示す。
(master synchronization)
Note that when the control computer 240 itself is synchronized with the reference slave, the reference time on the reference time distribution datagram is changed. When there is no path abnormality (FIG. 18), after the redundant communication control unit 250 receives the reference time distribution datagram, it synchronizes using the delay tmA and the reference time Ca on the reference time distribution datagram. This relationship is shown in the following equation (14).

Cref = Ca - tmA ・・・(14) Cref=Ca-tmA (14)

このCrefと、基準時刻配信用データグラムを主ポートで送信した時刻Cmとの比較により時刻オフセットを求めて同期する。 This Cref is compared with the time Cm at which the datagram for reference time distribution was transmitted through the main port to obtain a time offset and synchronize.

しかしながら、図19の場合、時刻補正部263を経由後に基準時刻をCanewに変更しているため、次の(15)式に示すように、差分Dを補正して同期する必要がある。 However, in the case of FIG. 19, since the reference time is changed to Canew after passing through the time correction unit 263, it is necessary to correct and synchronize the difference D as shown in the following equation (15).

Cref = Canew - D - tmA ・・・(15) Cref = Canew - D - tmA (15)

(正常時の迂回経路遅延を用いた変化遅延の補正)
なお、各スレーブに格納する変化遅延情報は、基準時刻配信用データグラム上の基準時刻に加算する値そのもの(例えば(9)式のDch-tAB)を計算して求めてもよいし、制御用計算機240で計測可能な値に対する補正分としてもよい。一例を示せば、これは図18のTm-Tsに対する差分である。
(Correction of change delay using detour route delay in normal state)
The change delay information stored in each slave may be obtained by calculating the value itself (for example, Dch-tAB in equation (9)) to be added to the reference time on the datagram for reference time distribution, or may be obtained by calculating It may be a correction amount for a value measurable by the calculator 240 . As an example, this is the difference for Tm-Ts in FIG.

(9)式等で用いた経路異常後の遅延(第二の通信遅延)Dchの算出においては、被制御装置241の数が変化した場合や、各被制御装置241間の通信遅延を個別に計算しなければならないため、面倒である。そこで、経路異常発生後の経路遅延と図18に示すTm-Tsまでの経路とその遅延で共通する部分が多いことを活かし、算出を容易にする。なお、Tmは経路正常時の主ポートでのパケット受信時刻であり、Tsは冗長ポートでの受信時刻であり、Tm-Ts含め、いずれも制御用計算機240において計測可能な時刻である。 (9) In the calculation of the delay (second communication delay) Dch after the path abnormality used in the formula etc., when the number of the controlled devices 241 changes or when the communication delay between the controlled devices 241 is individually It is troublesome because it has to be calculated. Therefore, the route delay after the occurrence of the route abnormality and the route from Tm to Ts shown in FIG. Note that Tm is the packet reception time at the main port when the path is normal, and Ts is the packet reception time at the redundant port.

遅延Dch=tAm’+tmD+tDC+tCB+tBに対して、Tm-Tsは以下の(16)式の構成となる。 For the delay Dch=tAm'+tmD+tDC+tCB+tB, Tm-Ts is represented by the following equation (16).

Tm - Ts = tAm + tBA + tCB + tDC
+tmD ・・・(16)
Tm - Ts = tAm + tBA + tCB + tDC
+tmD (16)

したがって、変化遅延DchとTm-Tsの差分は次の(17)式となる。 Therefore, the difference between the change delay Dch and Tm-Ts is given by the following equation (17).

Dch-(Tm―Ts)=tAm’+tmD+tDC+tCB+tB
-(tAm + tBA + tCB + tDC
+ tmD)
= tAm’-tAm+tB―tBA
= tdiffA + tB ― tBA ・・・(17)
Dch-(Tm-Ts)=tAm'+tmD+tDC+tCB+tB
−(tAm + tBA + tCB + tDC
+ tmD)
= tAm' - tAm + tB - tBA
= tdiffA + tB - tBA (17)

ここで、tdiffAは、被制御装置241aにおけるEtherCAT Processing Unit280の経過遅延であり、仕様として既知である。なお、図18と図19のtmDをそれぞれ等価としているが、異なる場合は差分を補正する。 Here, tdiffA is the elapsed delay of the EtherCAT Processing Unit 280 in the controlled device 241a, and is known as a specification. Note that tmD in FIGS. 18 and 19 are assumed to be equivalent, but if they are different, the difference is corrected.

したがって、(17)式の値を被制御装置241bに記憶しておけば、時刻補正部263にて、データグラム上の(17)式の値と、事前に計測したTm―Tsの値を加算することで変化遅延(第二の通信遅延)Dchを求めることができ、(9)式によって基準時刻配信用データグラムの基準時刻を補正できる。 Therefore, if the value of formula (17) is stored in the controlled device 241b, the time correction unit 263 adds the value of formula (17) on the datagram and the value of Tm−Ts measured in advance. By doing so, the change delay (second communication delay) Dch can be obtained, and the reference time of the datagram for reference time distribution can be corrected by the expression (9).

このようにすれば、個々のスレーブにおける設定値の算出が容易となり、場合によって設定値の最大を減らせるため、スレーブにおける記憶データ容量、論理アドレスの割り当てサイズを減らすことができる。 This makes it easier to calculate the setting value for each slave, and in some cases the maximum setting value can be reduced, so that the storage data capacity and logical address allocation size in the slave can be reduced.

(Tm、Ts計測の対象データグラム)
なお、TmとTsは、同じパケット、データグラムに対して計時する必要がある。時刻補正部263による基準時刻の変更は、基準時刻配信用データグラムに対して実行するため、基準時刻配信用データグラムを対象とすることが例示されるが、それ以外のデータグラムやEthernetフレームを対象としてもよい。なお、計測遅延の誤差を低減するため、Ethernetフレーム上の同一箇所を対象に計測することが望ましく、Ethernetヘッダの先頭やプリアンブルの先頭、EtherCATヘッダの先頭などが例示される。
(Target datagram for Tm and Ts measurement)
Note that Tm and Ts must be clocked for the same packet or datagram. Since the change of the reference time by the time correction unit 263 is performed on the reference time distribution datagram, it is exemplified that the reference time distribution datagram is targeted. It may be a target. In order to reduce errors in the measurement delay, it is desirable to measure the same location on the Ethernet frame.

なお、TmとTsの計測対象パケットが同じかどうかを特定する必要がある。パケットを特定する方法としては、パケットへ所定の処理を加えることや、冗長化通信制御部250でパケットを識別するための情報を記憶する方法が例示される。 It should be noted that it is necessary to specify whether the packets to be measured for Tm and Ts are the same. Examples of the method of identifying a packet include a method of applying predetermined processing to the packet and a method of storing information for identifying the packet in the redundant communication control unit 250 .

パケットへ加える処理としては、パケット上の所定パラメータを所定値にすることや、シーケンス番号を設定する方法、特定のパラメータを設定する方法、スレーブの動作に影響を与えない情報領域をパケットへ付加する方法が例示される。具体的には、IRQ306の所定ビットを1にすることや、図20に示すindex300を所定値にすること、存在しないアドレス301にアクセスするデータグラムを付加することや、コマンド299をNOP(No Operation)としたデータグラムを付加することが例示される。 The processing to be added to the packet includes setting a predetermined parameter on the packet to a predetermined value, setting a sequence number, setting a specific parameter, and adding an information area that does not affect the operation of the slave to the packet. A method is illustrated. Specifically, setting a predetermined bit of IRQ 306 to 1, setting index 300 shown in FIG. ) is added as an example.

冗長化通信制御部250で情報を記憶する方法としては、パケットのデータグラムヘッダ296のパラメータ(コマンド299、index300、アドレス301等図20参照)を記憶する方法や、データサイズ等のパケットにかかわる属性値を記憶する方法が例示される。 As a method for storing information in the redundant communication control unit 250, there is a method of storing parameters of the datagram header 296 of the packet (command 299, index 300, address 301, etc., see FIG. 20), and attributes related to the packet such as data size. A method for storing values is illustrated.

あるいは、パケットを識別する必要のないようにパケットを1つずつ通信処理するようにしてもよい。このようにすれば、あるパケットを送信してから、受信するパケットは、送信したパケットと同じであることを保証できる。または、常時、パケットを1つずつ通信処理するのではなく、受信時刻Tm、Tsを計測するために、所定回数のみ、パケットを1つずつ通信処理してもよい。所定回数は1回でもよいし、複数回でもよい。 Alternatively, packets may be communicated one by one so that there is no need to identify the packets. In this way, after sending a packet, it can be guaranteed that the packet received is the same as the packet sent. Alternatively, packets may be communication-processed one by one only a predetermined number of times in order to measure the reception times Tm and Ts instead of always processing packets one-by-one. The predetermined number of times may be one time or a plurality of times.

なお、差分D=Tm-Tsは、複数回求めて最小値あるいは最大値を用いてもよいし、平均値や統計処理を施した数値を用いてもよい。 Note that the difference D=Tm−Ts may be obtained a plurality of times and the minimum or maximum value may be used, or an average value or a numerical value subjected to statistical processing may be used.

また、差分Dは、通信経路に異常が発生した時に、変更した通信遅延を求めるために必要であるが、別の方法で求めてもよい。例えば、各スレーブのEtherCAT Processing Unit280を経由しない通信遅延Pがわかっている場合は、通信遅延Pをスレーブ数分合計した値Dpを差分Dとしてもよい。また、事前に制御用計算機240内の転送遅延を計測し、計測値をスレーブ数分合計した値Dpに加えてもよい。 Also, the difference D is necessary to obtain the changed communication delay when an abnormality occurs in the communication path, but it may be obtained by another method. For example, if the communication delay P that does not pass through the EtherCAT Processing Unit 280 of each slave is known, the difference D may be the value Dp obtained by summing the communication delays P for the number of slaves. Alternatively, the transfer delay in the control computer 240 may be measured in advance, and the measured values for the number of slaves may be added to the total value Dp.

なお、アプリケーションの実行開始時に、すでに通信経路異常が発生している場合は受信時刻Tm、Tsを保持していないため、差分Dを算出できない。したがって、実行開始時にCPU101上のソフトウェアでユーザやオペレータに通知して、通信経路の異常発生箇所の特定や、被制御装置241の点検、通信ケーブルの交換、確認等が例示される。 Note that if a communication path abnormality has already occurred at the start of execution of the application, the difference D cannot be calculated because the reception times Tm and Ts are not held. Therefore, at the start of execution, software on the CPU 101 notifies the user or operator to identify the location of an abnormality in the communication path, inspect the controlled device 241, replace or confirm the communication cable, and the like.

(パケット上のデータを用いた経路制御)
なお、制御用計算機240がどのようにパケットを経路制御したかをパケット上に記憶し、それを用いて経路制御部262においてパケットの経路を制御してもよい。
(Routing control using data on packets)
It should be noted that how the control computer 240 has route-controlled the packet may be stored in the packet, and the route control unit 262 may control the route of the packet using it.

これは、通信経路の一時的な障害や復帰による通信経路への変更に対応することを目的としている。例えば、経路異常を検知して冗長ポートへ転送して送信後に、再度冗長ポートで受信予定であったパケットが、経路異常が復旧し、主ポートで受信する場合である。このような場合に、パケット上に経路制御の履歴を示すことで適切にパケットを処理できる。 This is intended to deal with changes to the communication route due to temporary failure or restoration of the communication route. For example, after a path abnormality is detected and transferred to the redundant port for transmission, a packet that was scheduled to be received by the redundant port again is received by the main port after recovery from the path abnormality. In such a case, the packet can be processed appropriately by showing the routing history on the packet.

(データグラム上の4ビットを用いた経路判定)
データグラム上の4ビットを用いる例を図21に示す。なお、図21に示すビット情報のパラメータを格納する領域として、index300、IRQ306、MACアドレスの一部やNOPなどの付加データグラムを利用してもよい。
(Route determination using 4 bits on datagram)
An example using 4 bits on the datagram is shown in FIG. As the area for storing the parameters of the bit information shown in FIG. 21, the index 300, IRQ 306, part of the MAC address, and additional datagram such as NOP may be used.

各ビットを図21に示す意味づけとする。
つまり、ビット0は主ポートから送信した場合に1とする。ビット1は主ポートで受信した場合に1とする。ビット2は、冗長ポートから送信した場合に1とする。ビット3は冗長ポートで受信した場合に1とする。なお、主ポートからは必ず送信するとした場合はビット0を省略可能である。主ポートあるいは冗長ポートで受信後、上記ビットを確認し、該パケットの経路制御を実行する。
Each bit has the meaning shown in FIG.
That is, bit 0 is set to 1 when transmitted from the primary port. Bit 1 shall be 1 if received on the primary port. Bit 2 is set to 1 when transmitted from the redundant port. Bit 3 is set to 1 when received by the redundant port. Note that bit 0 can be omitted if data is always transmitted from the main port. After receipt at the primary or redundant port, the above bits are checked and routing of the packet is performed.

図22に主ポート、冗長ポートでの受信時の処理例を示す。図22(a)は、主ポートでの受信時の処理であり、図22(b)は、冗長ポートでの受信時の処理である。なお、これらは受信時に図21のビットを設定する前の経路制御例であるが、図21のビットを設定後に経路制御してもよい。 FIG. 22 shows an example of processing at the time of reception at the main port and redundant port. FIG. 22(a) shows the processing for reception at the main port, and FIG. 22(b) shows the processing for reception at the redundant port. Although these are examples of path control before setting the bits in FIG. 21 upon reception, path control may be performed after the bits in FIG. 21 are set.

例えば、主ポートで受信した際にビット3-0が「0001」である場合は、主ポートから送信後に経路異常で折り返しを想定し、冗長ポートで受信することなく、主ポートで受信したことを意味するため、図19の状態である。この場合は、パケット処理内容は、冗長ポートへ転送するとなる。図14の経路制御部262においては、バス264cで受信したパケットをバス264dに出力することを示す。 For example, if bits 3-0 are "0001" when received at the main port, it is assumed that the packet will return due to a path error after transmission from the main port, and it will not be received at the redundant port, but will indicate that it has been received at the main port. Therefore, it is in the state of FIG. In this case, the packet processing content is transferred to the redundant port. In the path control unit 262 of FIG. 14, the packet received by the bus 264c is output to the bus 264d.

なお、主ポートで受信した際の「0111」の場合は、冗長ポートへ転送後に経路復帰であることを想定し、冗長ポートで受信した際の「1101」の場合は、冗長ポートから送信後に経路異常を想定し、いずれも一時的な経路異常または復帰であるため、パケット処理内容は廃棄または冗長ポートから送信が考えられる。構成を容易にするためには破棄することが望ましい。 In the case of "0111" when received at the main port, it is assumed that the path is restored after being transferred to the redundant port. Assuming anomalies, all of which are temporary path anomalies or restorations, the content of packet processing can be discarded or sent from a redundant port. It is desirable to discard it for ease of configuration.

これらの経路制御のマークは、先頭のデータグラムなどの一部のデータグラムでもよいし、全てのデータグラムに対して実施してもよい。なお、以上の処理はパケット内容を改変するため、送信時にはCRCを再計算することが例示される。 These routing marks may be applied to some datagrams, such as the first datagram, or to all datagrams. Since the above processing modifies the packet content, recalculation of the CRC is exemplified at the time of transmission.

(MACアドレスを用いた経路制御)
なお、Ethernetフレームの先頭に近いデータを用いる方が、経路制御にともなうEthernetフレームのバッファリングを最小限にできるため、高速な経路制御処理及びバッファ容量の削減といった効果がある。
(Route control using MAC address)
It should be noted that using data closer to the head of the Ethernet frame can minimize the buffering of the Ethernet frame associated with route control, and thus has the effects of high-speed route control processing and reduction in buffer capacity.

したがって、宛先MACアドレスの先頭1byteを用いることが例示される。 Therefore, using the leading 1 byte of the destination MAC address is exemplified.

特にEtherCATではスレーブとの通信においてMACアドレスを用いないため、MACアドレスの利用が可能である。 In particular, since EtherCAT does not use MAC addresses in communication with slaves, it is possible to use MAC addresses.

(経路制御の別実施例)
別の実施例を図18、図19、図23、図24に示す。
(Another example of route control)
Another embodiment is shown in FIGS. 18, 19, 23 and 24. FIG.

この実施例は、データグラムの種類と、経由した経路に応じてパケット上の識別子を変更し、各部で処理する。識別子は、Ethernetフレームヘッダの宛先MACアドレス、index300、IRQ306、NOPなどの付加データグラム上のパラメータのいずれか、または複数を利用して表現することが例示される。図24では、識別子としてDC1、DC2、DC3、N1、N2を示しているが、具体的な値は相互に識別可能であれば、どのような値でも構わない。 This embodiment changes the identifier on the packet according to the type of datagram and the path through which it is processed by each unit. The identifier is exemplified by using one or more of the parameters on the additional datagram such as the destination MAC address of the Ethernet frame header, index 300, IRQ 306, and NOP. Although DC1, DC2, DC3, N1, and N2 are shown as identifiers in FIG. 24, any specific values may be used as long as they are mutually identifiable.

対象データグラムの区別としては、EtherCATの遅延計測の仕組み上、各スレーブの受信時刻の記憶に用いるタイムスタンプ用データグラムのみ、経路異常がない状態で周回する必要がある。 As for distinguishing target datagrams, due to the delay measurement mechanism of EtherCAT, it is necessary to circulate only the time stamp datagrams used to store the reception time of each slave in a state where there is no path abnormality.

したがって、送信部132aから送信する際にタイムスタンプ用データグラムの識別子をDC1とし、それ以外のデータグラムの識別子をN1とする。経路制御部262、時刻補正部263等で識別子の変更及び識別子に基づいたパケット処理を制御する。 Therefore, the identifier of the time stamp datagram is set to DC1 when transmitted from the transmitting unit 132a, and the identifier of the other datagrams is set to N1. The route control unit 262, the time correction unit 263, and the like control identifier change and packet processing based on the identifier.

以下、タイムスタンプ用データグラム、それ以外の通常データグラムについて、経路異常がない場合と、経路異常がある場合の処理について説明する。 Hereinafter, the processing in the case where there is no route error and the case where there is a route error will be described for time stamp datagrams and other normal datagrams.

タイムスタンプ用データグラムで経路異常がない場合は、受信部133bで受信され、図24の入力選択部261の入力側Aにて識別子をDC1からDC2に変更する。その後、時刻補正部263で識別子をDC2からDC3に変更して送信部132bから送信する。これは受信部133aで受信されてバス264bを経由して制御用計算機240内部に受信される。これは図18に示す経路を通過する。 If there is no path abnormality in the time stamp datagram, it is received by the receiving unit 133b, and the identifier is changed from DC1 to DC2 at the input side A of the input selecting unit 261 in FIG. After that, the time correction unit 263 changes the identifier from DC2 to DC3, and the transmission unit 132b transmits the DC3. This is received by the receiving unit 133a and received inside the control computer 240 via the bus 264b. This passes through the path shown in FIG.

なお、時刻補正部263で識別子をDC2からDC3に変更せず、仮に受信部133aから、経路制御部262内部の入力選択部261へ転送する際に識別子DC2のデータグラムを破棄し、同様に受信部133aからバス264bへ転送する際に識別子DC2を通過するように構成してもよい。 If the time correction unit 263 does not change the identifier from DC2 to DC3, and the datagram with the identifier DC2 is discarded when the datagram is transferred from the receiving unit 133a to the input selection unit 261 inside the route control unit 262, the datagram is similarly received. The identifier DC2 may be passed when transferring from the unit 133a to the bus 264b.

タイムスタンプ用データグラムで経路異常がある場合は、受信部133aで受信される。このデータグラムは破棄すべきであるため、バス264bへの出力途中あるいは時刻補正部263にて破棄される。 If there is a path abnormality in the time stamp datagram, it is received by the receiver 133a. Since this datagram should be discarded, it is discarded during output to the bus 264b or at the time correction unit 263. FIG.

通常データグラムで経路異常がない場合は、受信部133bで受信され、バス264bに出力される。通常データグラムは全ての被制御装置241のEtherCAT Processing Unit280を経由すれば、冗長ポートから出力する必要が無いため、図23の経路を通過し、冗長ポートで受信した後にパケットを内部に取り込む。 If the normal datagram has no route abnormality, it is received by the receiving unit 133b and output to the bus 264b. If normal datagrams pass through the EtherCAT Processing Units 280 of all the controlled devices 241, there is no need to output them from the redundant ports.

通常データグラムで経路異常がある場合は、受信部133aで受信され、時刻補正部263において、識別子をN1からN2に変更して送信部132bから送信される。これは受信部133bで受信されて、バス264bを経由して内部に取り込まれる。これは図19の経路を通過する。なお、識別子としては、例えば、計時の要否(同期対象装置に計時されるか否か)と、主ポートでの受信後のパケットの転送先と、冗長ポートでの受信後のパケットの転送先と、冗長ポートによる送信の要否をそれぞれ識別する識別子が例示される。この際、被制御装置241では、各識別子を同期パケットに関連づけて記憶し、主ポート又は冗長ポートが同期パケットを受信した際に、識別子に基づいて、同期パケットの受信、同期パケットの破棄或いは同期パケットの転送のうち少なくとも一つの処理を実行する。 If a normal datagram has a path abnormality, it is received by the receiver 133a, the time correction unit 263 changes the identifier from N1 to N2, and the datagram is transmitted from the transmitter 132b. This is received by the receiving section 133b and taken inside via the bus 264b. This passes through the path of FIG. Note that the identifiers include, for example, whether timing is necessary (whether or not the synchronization target device clocks), the transfer destination of the packet received by the main port, and the transfer destination of the packet received by the redundant port. , and an identifier that respectively identifies whether or not transmission by the redundant port is necessary. At this time, the controlled device 241 stores each identifier in association with the synchronization packet, and when the main port or redundant port receives the synchronization packet, based on the identifier, the synchronization packet is received, discarded, or synchronized. At least one process of forwarding the packet is executed.

以上の方法を用いれば、通信経路の一時的な障害や復帰によるパケットのネットワーク上での残存及び氾濫を防止することができる。 By using the above method, it is possible to prevent packets from remaining on the network and flooding due to a temporary failure or restoration of the communication path.

(ステートマシンによる制御。パケットごとの判定ではない方法)
なお、経路制御部262の内部経路の切り替えは、受信パケットごとに異常の有無を判定して、切り替えてもよいし、図18、図19、図23に示す経路構成を状態遷移で管理してもよい。状態間の遷移は、受信パケットの異常判定、正常判定に基づいて制御することが例示される。
(Control by state machine. A method that does not determine each packet)
The internal route of the route control unit 262 may be switched by judging the presence or absence of an abnormality for each received packet, or by managing the route configurations shown in FIGS. good too. The transition between states is exemplified by being controlled based on the determination of abnormality and the determination of normality of the received packet.

正常判定の方法として、主ポートから送信後に冗長ポートでパケットを受信し、その後、冗長ポートからパケットを送信後に主ポートでパケットを受信したかどうかのいずれか、または両方に該当する方法が例示される。対象データグラムの特定方法は前記のとおりである。 As a method of judging normality, a method corresponding to either or both of receiving a packet at the redundant port after sending from the main port and then receiving the packet at the main port after sending the packet from the redundant port is exemplified. be. The method of identifying the target datagram is as described above.

あるいは正常判定の方法として、全てのスレーブが処理すべきレジスタに対するBRDコマンドをEtherCATフレームに付与し、そのワーキングカウンタを見る方法が例示される。EtherCATフレームのワーキングカウンタの値と、事前に設定した所定数と等しい場合に通信経路を正常と判定する。 Alternatively, as a method of judging normality, a method of attaching a BRD command for a register to be processed by all slaves to an EtherCAT frame and looking at the working counter is exemplified. If the value of the working counter of the EtherCAT frame is equal to the predetermined number set in advance, the communication path is determined to be normal.

なお、経路の切り替えや異常判定、正常判定等の動作を、バス106を介してCPU101上で動作するプログラム等に通知してもよい。バス106の通信手段には割込み通知等の手段がある。この通知を受けたプログラムでは、通信経路上に異常が生じていること、あるいは正常に復帰したことをユーザやオペレータに通知することで、ユーザやオペレータは異常を復旧させるために通信ケーブルの置換等の対策の実施や、その対策の完了を確認することができる。 Operations such as path switching, abnormality determination, and normality determination may be notified to a program or the like operating on the CPU 101 via the bus 106 . Communication means of the bus 106 include means such as interrupt notification. The program that receives this notification notifies the user or operator that an abnormality has occurred on the communication path or that the communication path has returned to normal. It is possible to confirm the implementation of the countermeasures and the completion of the countermeasures.

なお、制御用計算機240は主ポート、冗長ポートの2つのポートを有するとして説明したが、本実施例で説明した主ポートと冗長ポートの組み合わせを複数分用意した複数ポートで構成してもよい。その場合、本実施例ではパケットが最後に通過するバス264bはバス106へと接続するとしたが、別の主ポートへの接続となる。なお、通信ポートが奇数の場合は、余りの1つのポートではライントポロジで被制御装置241を接続する構成が例示される。 Although the control computer 240 has been described as having two ports, a main port and a redundant port, it may be configured with a plurality of ports prepared by preparing a plurality of combinations of the main port and redundant port described in this embodiment. In this case, although in this embodiment the bus 264b through which the packet passes last is connected to the bus 106, it is connected to another main port. In the case where the number of communication ports is odd, a configuration is exemplified in which the controlled device 241 is connected in line topology with the remaining one port.

(効果)
本実施例によれば、通信経路に異常が発生したとしても、制御用計算機240は冗長経路を利用し、かつ、冗長経路を利用した場合の遅延の変化を基準時刻配信用データグラム上の基準時刻に反映することで、被制御装置241は経路異常の発生を意識することなく時刻同期を維持することができる。したがって、制御用途のリアルタイム通信において、経路冗長化による高信頼化と高精度な時刻同期を実現できる。
(effect)
According to this embodiment, even if an abnormality occurs in the communication path, the control computer 240 uses the redundant path, and the change in delay when using the redundant path is used as a reference in the reference time delivery datagram. By reflecting it in the time, the controlled device 241 can maintain time synchronization without being aware of the occurrence of the path abnormality. Therefore, in real-time communication for control purposes, it is possible to realize high reliability and highly accurate time synchronization by path redundancy.

また、パケット、データグラムの識別子、あるいは状態遷移を用いて経路制御することで、一時的な通信経路の変化によるパケットのネットワーク上での残存及び氾濫を防止することができる。さらに、定期的に基準スレーブの基準時刻をスレーブ群に配信し、時刻同期するようにしているので、各スレーブのローカルクロックの基準となる物理的な精度誤差から、一度同期をしたとしても、経時にしたがい同期精度が低下していくのを防止することができる。 Also, by performing route control using identifiers of packets or datagrams or state transitions, it is possible to prevent packets from remaining on the network and flooding due to temporary changes in communication routes. In addition, the reference time of the reference slave is periodically distributed to the slave group to synchronize the time. Accordingly, it is possible to prevent the synchronization accuracy from deteriorating.

第三実施例は、本発明を適用した制御用計算機240を用いたシステムであり、特に2ヶ所以上の通信経路の異常が発生する場合を想定する。なお、実施例に使用する符号は、特に断りのない限り、実施例1、実施例2で説明した機能や要素等と同一であることを意味する。 The third embodiment is a system using a control computer 240 to which the present invention is applied, and assumes a case where two or more communication path failures occur. It should be noted that the reference numerals used in the examples mean the same functions and elements as those described in the first and second examples unless otherwise specified.

2箇所以上の経路異常が生じた場合は、通信不通のスレーブが生じるため、制御システムを停止することが例示される。 If two or more path abnormalities occur, the control system is stopped because some slaves are out of communication.

これは、EtherCATフレーム中に、全てのスレーブが反応してワーキングカウンタの値を増やすデータグラムを付加し、冗長ポートへの転送等を実施後の受信時(バス264bでバス106へ転送する際)において、既知の全スレーブ数より小さい場合に2箇所以上の経路異常と判定する。これは経路異常が1箇所であれば、本実施例による経路制御部262の経路切り替えにより、全ての被制御装置241のEtherCAT Processing Unit280へデータグラムが伝送されるためである。全てのスレーブが反応するデータグラムとしてはブロードキャストリードコマンドのデータグラムか、全てのスレーブに共通に設定した論理アドレスへのコマンド等が例示される。 This is done by adding a datagram to the EtherCAT frame in which all the slaves react and increase the value of the working counter, and when receiving the datagram after transferring to the redundant port, etc. (when transferring to the bus 106 via the bus 264b). , if it is smaller than the known total number of slaves, it is determined that there are two or more abnormal paths. This is because if there is only one path abnormality, the datagram is transmitted to the EtherCAT Processing Units 280 of all the controlled devices 241 by the path switching of the path control section 262 according to this embodiment. Examples of datagrams to which all slaves respond include datagrams of broadcast read commands, commands to logical addresses commonly set for all slaves, and the like.

あるいは、残りのスレーブに対して通信を継続してもよい。 Alternatively, communication may continue to the remaining slaves.

本実施例により、1箇所目の経路異常の発生位置前のスレーブで折り返されたEthernetフレームは主ポートで受信し、基準スレーブによって設定された基準時刻配信用データグラム上の基準時刻を更新する。この補正値は前述のとおり、経路異常個所を一つと仮定しているため、2箇所目の経路異常後に通知されるスレーブとの遅延とは異なる。 According to this embodiment, the Ethernet frame looped back at the slave before the occurrence position of the first path abnormality is received at the main port, and the reference time on the reference time distribution datagram set by the reference slave is updated. As described above, since this correction value assumes that there is only one path failure point, it is different from the delay with the slave that is notified after the second path failure.

このような場合、2箇所目の経路異常を経由後に、マスタが冗長ポートで受信すると、前記のワーキングカウンタの値等を用いて、2箇所目の経路異常位置を特定することができる。すなわち、経路異常がない場合の遅延と、2箇所目の経路異常後の遅延の差分を計算し、補正値とすることが例示される。 In such a case, when the master receives the data at the redundant port after passing through the second path abnormality, it is possible to specify the position of the second path abnormality using the value of the working counter or the like. That is, calculating the difference between the delay when there is no path abnormality and the delay after the second path abnormality is used as a correction value is exemplified.

図25を用いて説明する。図25では、被制御装置241aと被制御装置241b間の通信経路、被制御装置241bと被制御装置241c間の通信経路の2箇所で異常が発生している。基準スレーブである被制御装置241aと被制御装置241c間の遅延Dcは、経路正常時ではtAB+tBCである。これが図25では被制御装置241aと被制御装置241c間の変化遅延Dc’はtAm’+tmD+tDC+tCに変化する。したがって、時刻補正部263はDcとDc’の差分を考慮して基準時刻配信用データグラム上の基準時刻を補正する。 Description will be made with reference to FIG. In FIG. 25, an abnormality has occurred in two locations: the communication path between the controlled device 241a and the controlled device 241b and the communication path between the controlled device 241b and the controlled device 241c. The delay Dc between the controlled device 241a and the controlled device 241c, which are the reference slaves, is tAB+tBC when the path is normal. 25, the variable delay Dc' between the controlled device 241a and the controlled device 241c changes to tAm'+tmD+tDC+tC. Therefore, the time correction unit 263 corrects the reference time on the datagram for reference time distribution by considering the difference between Dc and Dc'.

これは2つの経路異常が同時に発生した場合であるが、順に経路異常が発生した場合は、段階的に補正する。例えば、図25の状態になる前に図19の状態になったとすると、図19での被制御装置241aと被制御装置241c間の遅延Dchは、tAm’+tmD+tDC+tCB+tB+tBCである。したがって、図19から図25に変化した場合は、Dc’とDchの差分(遅延変化分)に基づいて基準時刻配信用データグラム上の基準時刻を補正する。例えば、冗長ポートで第二の通信経路中の被制御装置241bから同期パケットを受信した際に、受信した同期パケットに、第二の通信経路中に存在する通信対象の変更を示す変更情報(ワーキングカウンタの値が「3」から「2」に変更されたことを示す情報)が存在する場合、変更情報を基に時刻情報を補正するための補正量を示す遅延変化分を(Dch-tAB)から、(Dc’-Dc)に変更し、変更した遅延変化分(Dc’-Dc)を基に、冗長ポートから同期パケットの宛先へ送信する同期パケットに属する時刻情報を補正する。なお、2つの経路異常が同時に発生した場合でも、同期パケットを冗長ポートから送信する前に遅延変化分を(Dch-tAB)として時刻情報を補正し、その後、同期パケットを冗長ポートで受信した際に、遅延変化分を(Dc’-Dc)として時刻情報を補正することもできる。 This is a case where two path abnormalities occur at the same time, but if path anomalies occur in sequence, correction is performed step by step. For example, if the state of FIG. 19 is reached before the state of FIG. 25 is reached, the delay Dch between the controlled device 241a and the controlled device 241c in FIG. 19 is tAm'+tmD+tDC+tCB+tB+tBC. 19 to FIG. 25, the reference time on the reference time delivery datagram is corrected based on the difference (delay change) between Dc' and Dch. For example, when the redundant port receives a synchronization packet from the controlled device 241b on the second communication path, change information (working information indicating that the value of the counter has been changed from "3" to "2"), the amount of delay change indicating the correction amount for correcting the time information based on the change information (Dch-tAB) to (Dc'-Dc), and based on the changed delay variation (Dc'-Dc), the time information belonging to the synchronization packet transmitted from the redundant port to the destination of the synchronization packet is corrected. Even if two path abnormalities occur at the same time, the time information is corrected with the delay variation (Dch-tAB) before the synchronization packet is sent from the redundant port, and after that, when the synchronization packet is received at the redundant port Alternatively, the time information can be corrected by setting the delay variation to (Dc'-Dc).

この補正値、あるいは補正値を算出可能な情報は、個々のスレーブごとに領域を定義し、データグラム上にのせてもよい。 This correction value or information from which the correction value can be calculated may define an area for each slave and put it on the datagram.

このようにすれば、2箇所以上の経路異常が発生した直後の通信によって、異常個所の位置を特定し、その次の通信から接続可能なスレーブの補正遅延を決定し、同期を維持することができる。 In this way, it is possible to specify the position of the abnormal portion by communication immediately after occurrence of two or more path abnormalities, determine the correction delay of connectable slaves from the next communication, and maintain synchronization. can.

なお、スレーブでの同期処理において、過去に配信された基準時刻情報を用いた統計処理を実行することで、2箇所以上の経路異常が発生した場合の同期精度低下の影響を低減できる。 By executing statistical processing using the reference time information distributed in the past in the synchronization processing in the slave, it is possible to reduce the influence of deterioration in synchronization accuracy when two or more path abnormalities occur.

なお、3箇所以上の経路異常の場合は、2箇所の例において、冗長ポートに最も近い異常個所が2箇所目の異常と同じ扱いとなる。 In the case of three or more path failures, in the example of two locations, the location of the failure closest to the redundant port is treated the same as the second failure.

(効果)
本実施例によれば、通信経路異常が2箇所以上発生した場合でも、制御通信を継続できる被制御装置241に対しては時刻同期を維持できる。よって、本実施例により、経路冗長化によるリアルタイム通信の高信頼化と時刻同期を実現できる。
(effect)
According to this embodiment, even if two or more communication path abnormalities occur, time synchronization can be maintained for the controlled device 241 that can continue control communication. Therefore, according to this embodiment, high reliability of real-time communication and time synchronization can be achieved by path redundancy.

第四実施例は、冗長化中継ボックスに関するものであり、本発明を適用した中継装置310において、通信経路の冗長化と時刻同期を実現することを想定する。なお、実施例に使用する符号は、特に断りのない限り、実施例1、実施例2、実施例3で説明した機能や要素等と同一であることを意味する。 The fourth embodiment relates to a redundant relay box, and assumes that the relay device 310 to which the present invention is applied achieves communication path redundancy and time synchronization. It should be noted that the reference numerals used in the examples mean the same functions, elements, and the like as those described in the first, second, and third examples unless otherwise specified.

図26は、本発明を適用した中継装置310を用いて構成するシステム例である。 FIG. 26 shows an example of a system configured using a relay device 310 to which the present invention is applied.

中継装置310は、制御用計算機240と複数の被制御装置241a、241b、241gとを結ぶ制御用ネットワーク242中にあって、制御用計算機240から送信されたパケットを、中継装置310以降に接続する被制御装置241c、241d、241e、241fへ中継、転送する。なお、中継装置310は、通信経路311aを介して被制御装置241bと、通信経路311bを介して被制御装置241cと、通信経路311cを介して被制御装置241fと、通信経路311dを介して被制御装置241gとそれぞれ接続している。 The relay device 310 is in the control network 242 that connects the control computer 240 and the plurality of controlled devices 241a, 241b, and 241g, and connects packets transmitted from the control computer 240 to the relay device 310 and beyond. It relays and transfers to the controlled devices 241c, 241d, 241e, and 241f. Relay device 310 communicates with controlled device 241b via communication path 311a, controlled device 241c via communication path 311b, controlled device 241f via communication path 311c, and controlled device 241f via communication path 311d. It is connected to the control device 241g.

中継装置310の機能構成を図27に示す。 FIG. 27 shows the functional configuration of the relay device 310. As shown in FIG.

なお、中継装置310自身がEtherCAT Processing Unit280を有していてもよい。例えば、バス264a上にEtherCAT Processing Unit280を構成することが示される。 Note that the relay device 310 itself may have the EtherCAT Processing Unit 280 . For example, an EtherCAT Processing Unit 280 is shown configured on bus 264a.

(動的追加)
あるいは中継装置310以下に動的に被制御装置241を追加するようにしてもよい。
(dynamic addition)
Alternatively, the controlled device 241 may be dynamically added below the relay device 310 .

図26において、被制御装置241c、被制御装置241d、被制御装置241e、被制御装置241fを後から追加する場合を考える。中継装置310は、制御用計算機240から送信されたパケットを、被制御装置241cへ転送せずに被制御装置241gへと転送し、独自に被制御装置241c、被制御装置241d、被制御装置241e、被制御装置241fに対して同期プロトコルを実行し、遅延を計測する。このとき中継装置310自身は、基準スレーブ(図26の被制御装置241a)との遅延を設定されていているため、この値を加算した遅延を被制御装置241c、被制御装置241d、被制御装置241e、被制御装置241fに設定することで、これらの被制御装置241は、基準スレーブである被制御装置241aとの遅延を設定される。これらの被制御装置241の時刻同期を完了した後、中継装置310は、制御用計算機240から送信されたパケットを被制御装置241cへ転送するように構成する。被制御装置241fから返送されたパケットを被制御装置241gへと転送するが、被制御装置241gとの遅延は変化しているため、被制御装置241gへと転送する際は、被制御装置241c、被制御装置241d、被制御装置241e、被制御装置241fを経由する分の遅延に基づいて、基準時刻配信用データグラム上の基準時刻を補正する。 In FIG. 26, consider a case where a controlled device 241c, a controlled device 241d, a controlled device 241e, and a controlled device 241f are added later. The relay device 310 transfers the packet transmitted from the control computer 240 to the controlled device 241g without transferring it to the controlled device 241c, and independently transfers the packet to the controlled device 241c, the controlled device 241d, and the controlled device 241e. , executes a synchronization protocol on the controlled device 241f and measures the delay. At this time, relay device 310 itself is set to have a delay with respect to the reference slave (controlled device 241a in FIG. 26). 241e, controlled device 241f, these controlled devices 241 are set to have a delay with respect to the controlled device 241a, which is the reference slave. After completing the time synchronization of these controlled devices 241, the relay device 310 is configured to transfer the packet transmitted from the control computer 240 to the controlled device 241c. The packet returned from the controlled device 241f is transferred to the controlled device 241g, but since the delay with the controlled device 241g is changed, when transferring to the controlled device 241g, the controlled device 241c, The reference time on the datagram for reference time distribution is corrected based on the delay for passing through the controlled device 241d, the controlled device 241e, and the controlled device 241f.

例えば、中継装置310において、基準スレーブ(図26の被制御装置241a)との遅延(第一の通信遅延)をD310aとし、被制御装置241c~241fにおける遅延(第二の通信遅延)をD310b=tmA+tCD+tDE+tEF+tFm+tmF+tFE+tED+tDC+tCmとした場合、中継装置310において、同期パケットを被制御装置241gに送信する前に、遅延変化分をD310a+D310bとして、基準時刻配信用データグラム上の基準時刻を補正する。 For example, in the relay device 310, the delay (first communication delay) with the reference slave (controlled device 241a in FIG. 26) is D310a, and the delay (second communication delay) in the controlled devices 241c to 241f is D310b= When tmA + tCD + tDE + tEF + tFm + tmF + tFE + tED + tDC + tCm, relay device 310 corrects the reference time on the datagram for reference time distribution by setting the delay variation to D310a + D310b before transmitting the synchronization packet to controlled device 241g.

このようにすれば、動的な被制御装置241の追加を許容しつつ、被制御装置241gまでを含めて時刻同期することができる。 In this way, it is possible to time-synchronize up to the controlled device 241g while allowing the dynamic addition of the controlled device 241. FIG.

(効果)
本実施例により、時刻同期と経路冗長化を両立しながら、制御ネットワークのトポロジの構成の自由度を増すことができ、通信制御システムの物理的制約にあわせて通信制御システムを構築できる。
(effect)
According to this embodiment, it is possible to increase the degree of freedom in configuring the topology of the control network while achieving both time synchronization and path redundancy, and to construct a communication control system in accordance with the physical restrictions of the communication control system.

第五実施例は、論理ネットワークに関するものであり、ループ接続を含むネットワーク上で、仮想的なネットワークを構築する場合の適用例である。なお、実施例に使用する符号は、特に断りのない限り、実施例1、実施例2、実施例3、実施例4で説明した機能や要素等と同一であることを意味する。 The fifth embodiment relates to a logical network, and is an application example of constructing a virtual network on a network including loop connections. The reference numerals used in the examples mean the same functions, elements, and the like as those described in the first, second, third, and fourth examples unless otherwise specified.

図28のネットワークにおいて、図28(a)において実線で示す仮想ネットワークを構築しているとする。なお、ダッシュ線は物理的には結線されているが、通信装置320(通信装置320a~320f)における通信ポートをブロックする等して通信不可となっている通信経路321(321bc)を示す。今、通信経路321bcで経路異常が発生し、通信装置320bが、通信装置320c、通信装置320fとの通信ができなくなるとする。このとき、図28(b)において、通信経路321efを有効とし、通信経路を切り替えたとする。このとき、通信装置320bにおいて同期パケット(IEEE 1588のSyncメッセージなど)を通信装置320cや通信装置320fに転送する場合に、図28(a)の通信経路321bcを経由する場合と、図28(b)の通信経路321be、通信経路321efを経由する場合の遅延差(遅延変化分)で同期パケット上のタイムスタンプを補正することが例示される。 In the network of FIG. 28, it is assumed that a virtual network indicated by a solid line in FIG. 28(a) is constructed. A dashed line indicates a communication path 321 (321bc) that is physically connected but is disabled by blocking the communication port of the communication device 320 (communication devices 320a to 320f). Suppose now that a path abnormality occurs in the communication path 321bc, and the communication device 320b cannot communicate with the communication devices 320c and 320f. At this time, in FIG. 28B, assume that the communication path 321ef is enabled and the communication path is switched. At this time, when the communication device 320b transfers a synchronization packet (such as an IEEE 1588 Sync message) to the communication device 320c or the communication device 320f, the communication path 321bc in FIG. ), correcting the time stamp on the synchronization packet by the delay difference (delay change amount) in the case of passing through the communication path 321be and the communication path 321ef.

この際、通信装置320bと通信装置320cとを結ぶ通信経路は、ネットワーク上において、各通信装置320に属する送受信部(送受信手段)の通信対象の変更に応じて動的に構成されることになる。この場合、通信装置320bにおける送受信手段の通信対象の変更に伴って、同期パケットの通信経路が、通信経路(第一の通信経路)321bcから通信経路(第二の通信経路)321e、321f、321fに変更され、第二の通信経路がネットワーク上で動的に構成される場合、第一の通信経路における第一の通信遅延と第二の通信経路における第二の通信遅延とを基に遅延変換分を算出し、算出した遅延変化分を基に同期パケットの時刻情報を補正することができる。 At this time, the communication path connecting the communication device 320b and the communication device 320c is dynamically configured on the network according to the change of the communication target of the transmission/reception unit (transmission/reception means) belonging to each communication device 320. . In this case, the communication path of the synchronization packet is changed from the communication path (first communication path) 321bc to the communication paths (second communication paths) 321e, 321f, and 321f as the communication target of the transmission/reception means in the communication device 320b is changed. and the second communication path is dynamically configured on the network, delay conversion based on the first communication delay in the first communication path and the second communication delay in the second communication path The minute can be calculated, and the time information of the synchronization packet can be corrected based on the calculated delay change.

このような論理ネットワークの構築は、メッシュネットワーク、STP(Spanning Tree Protocol)、RSTP(Rapid Spanning Tree Protocol)、OpenFlow、SDN(Software Defined Network)等を含む。 Construction of such logical networks includes mesh networks, STP (Spanning Tree Protocol), RSTP (Rapid Spanning Tree Protocol), OpenFlow, SDN (Software Defined Network), and the like.

事前に通信装置320間の経路遅延をping(ICMP)やIEEE 1588等の手段を用いて計測することが例示される。 An example is to measure the path delay between the communication devices 320 in advance using means such as ping (ICMP) and IEEE 1588.

また、STP、RSTPでツリートポロジを構築するためのパスコストを経路遅延としてBPDU(Bridge Protocol Data Unit)上に含めてもよい。 Also, the path cost for constructing a tree topology with STP and RSTP may be included in BPDU (Bridge Protocol Data Unit) as path delay.

あるいは代替経路の選択において、通信遅延が同等となる経路を選択してもよい。 Alternatively, in selecting an alternative route, a route with equivalent communication delay may be selected.

本実施例によれば、STPやRSTPを含む論理ネットワーク上で経路冗長化を図りながら、時刻同期できる。 According to this embodiment, it is possible to synchronize time while achieving path redundancy on a logical network including STP and RSTP.

なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、通信制御装置としては、通信装置120、中継装置121、制御用計算機240、被制御装置241、中継装置310の中のいずれを用いても良い。上記した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加・削除・置換をすることが可能である。 In addition, the present invention is not limited to the above-described embodiments, and includes various modifications. For example, any of the communication device 120, the relay device 121, the control computer 240, the controlled device 241, and the relay device 310 may be used as the communication control device. The above-described embodiments have been described in detail in order to explain the present invention in an easy-to-understand manner, and are not necessarily limited to those having all the configurations described. In addition, it is possible to replace part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Moreover, it is possible to add, delete, or replace a part of the configuration of each embodiment with another configuration.

また、上記の各構成、機能等は、それらの一部又は全部を、例えば、集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、IC(Integrated Circuit)カード、SD(Secure Digital)メモリカード、DVD(Digital Versatile Disc)等の記録媒体に記録して置くことができる。 Moreover, each of the above configurations, functions, and the like may be implemented by hardware, for example, by designing a part or all of them using an integrated circuit. Moreover, each of the above configurations, functions, etc. may be realized by software by a processor interpreting and executing a program for realizing each function. Information such as programs, tables, and files that realize each function can be stored in memory, hard disks, SSD (Solid State Drives) and other recording devices, IC (Integrated Circuit) cards, SD (Secure Digital) memory cards, DVD ( It can be recorded on a recording medium such as Digital Versatile Disc).

101…CPU、102…通信制御部、103…PHY、104…メモリ、105…不揮発性記憶媒体、106、134、135、264…バス、120、320…通信装置、121…ネットワーク中継装置、122…ネットワーク、130…送信制御部、131…受信制御部、132…送信部、133…受信部、136…MUX、137…システム識別子、138…システム識別子変換部、139…ネットワーク中継装置設定部、140…グループ位置識別子、150…パケット、160、161、231、232、311、321…通信経路、170…IEEE 1588ヘッダ、173…correction Field、183…origin Timestamp、190…通信ポート、220…経路制御ルール、240…制御用計算機、241…被制御装置、242…制御用ネットワーク、250…冗長化通信制御部、260…出力選択部、261…入力選択部、262…経路制御部、263…時刻補正部、265…計時部、266…通信遅延記憶部、270…通信ハードウェア、271…スレーブIC、280…EtherCAT Processing Unit、281…自動転送部、282…ループバック機能部、290…Ethernetフレーム、291…Ethernetヘッダ、292…データ領域、293…Frame Check Sequence、294…EtherCATヘッダ、295…データグラム、296…データグラムヘッダ、297…データ(データグラムデータ)、298…ワーキングカウンタ(WKC)、299…コマンド、300…index、301…アドレス、302…データサイズ、303…予約、304…C、305…M、306…IRQ、310 … 中継装置 DESCRIPTION OF SYMBOLS 101... CPU, 102... Communication control part, 103... PHY, 104... Memory, 105... Non-volatile storage medium, 106, 134, 135, 264... Bus, 120, 320... Communication apparatus, 121... Network relay apparatus, 122... Network 130 Transmission control unit 131 Reception control unit 132 Transmission unit 133 Reception unit 136 MUX 137 System identifier 138 System identifier conversion unit 139 Network relay device setting unit 140 Group Location Identifier 150 Packet 160, 161, 231, 232, 311, 321 Communication Path 170 IEEE 1588 Header 173 Correction Field 183 Origin Timestamp 190 Communication Port 220 Routing Rule 240... Control computer, 241... Controlled device, 242... Control network, 250... Redundant communication control unit, 260... Output selection unit, 261... Input selection unit, 262... Path control unit, 263... Time correction unit, 265...Timer 266...Communication delay storage unit 270...Communication hardware 271...Slave IC 280...EtherCAT Processing Unit 281...Automatic transfer unit 282...Loopback function unit 290...Ethernet frame 291...Ethernet Header 292 Data area 293 Frame Check Sequence 294 EtherCAT header 295 Datagram 296 Datagram header 297 Data (datagram data) 298 Working counter (WKC) 299 Command 300...index, 301...address, 302...data size, 303...reservation, 304...C, 305...M, 306...IRQ, 310...relay device

Claims (21)

時刻情報を含む同期パケットの通信経路を構成するネットワークに接続されて前記同期パケットを送受信する2以上の送受信手段と、
前記送受信手段の受信した前記同期パケットを処理する処理手段と、を備え、
前記処理手段は、
前記送受信手段のうち第一の送受信手段及び第二の送受信手段での前記同期パケットの受信順序を前記同期パケットの経路制御の履歴として前記同期パケットに対応付けて記録し、記録した前記経路制御の履歴に基づいて前記時刻情報を補正するか否かを判定し、
前記経路制御の履歴から前記第二の送受信手段で前記同期パケットを受信する前に前記第一の送受信手段で前記同期パケットを受信した場合、前記各送受信手段の通信対象を含む第一の通信経路を前記同期パケットが通信する際の第一の通信遅延と、前記第一の通信経路に対して冗長化された第二の通信経路を前記同期パケットが通信する際の第二の通信遅延との遅延変化分を基に前記同期パケットに属する前記時刻情報を補正し、補正した前記時刻情報を含む前記同期パケットを前記第二の送受信手段に転送し、
前記時刻情報を補正する際には、前記第一の送受信手段から前記ネットワークに送信された前記同期パケットに付加された異常経路の発生位置を特定する情報に基づいて前記第二の通信遅延を決定し、
前記第一の送受信手段又は前記第二の送受信手段が前記同期パケットを受信した際に、前記経路制御の履歴に基づいて、前記同期パケットの受信、前記同期パケットの破棄或いは前記同期パケットの他方の送受信手段への転送のうち少なくとも一つの処理を実行することを特徴とする通信制御装置。
two or more transmitting/receiving means connected to a network constituting a communication path of a synchronous packet containing time information and transmitting/receiving the synchronous packet;
and processing means for processing the synchronization packet received by the transmission/reception means,
The processing means
The order in which the synchronization packets are received by the first transmission/reception means and the second transmission/reception means of the transmission/reception means is recorded as a history of routing control of the synchronization packets in association with the synchronization packets, and the recorded routing control history is recorded. Determining whether to correct the time information based on the history,
a first communication path including a communication target of each of the transmission/reception means when the synchronization packet is received by the first transmission/reception means before the synchronization packet is received by the second transmission/reception means from the path control history; a first communication delay when the synchronization packet communicates and a second communication delay when the synchronization packet communicates a second communication path redundant to the first communication path correcting the time information belonging to the synchronization packet based on the delay change, and transferring the synchronization packet containing the corrected time information to the second transmitting/receiving means;
When correcting the time information, the second communication delay is determined based on information identifying the position of occurrence of an abnormal path added to the synchronization packet transmitted from the first transmitting/receiving means to the network. death,
When the first transmitting/receiving means or the second transmitting/receiving means receives the synchronous packet, based on the path control history , the synchronous packet is received, the synchronous packet is discarded, or the other of the synchronous packet is received. A communication control device that executes at least one process of transferring to a transmitting/receiving means .
時刻情報を含む同期パケットの通信経路を構成するネットワークに接続されて前記同期パケットを送受信する2以上の送受信手段と、
前記送受信手段の受信した前記同期パケットを処理する処理手段と、を備え、
前記処理手段は、
前記送受信手段のうち第一の送受信手段及び第二の送受信手段での前記同期パケットの受信順序を前記同期パケットの経路制御の履歴として前記同期パケットに対応付けて記録し、記録した前記経路制御の履歴に基づいて前記時刻情報を補正するか否かを判定し、
前記経路制御の履歴から前記第二の送受信手段で前記同期パケットを受信する前に前記第一の送受信手段で前記同期パケットを受信した場合、前記各送受信手段の通信対象を含む第一の通信経路を前記同期パケットが通信する際の第一の通信遅延と、前記第一の通信経路に対して冗長化された第二の通信経路を前記同期パケットが通信する際の第二の通信遅延との遅延変化分を基に前記同期パケットに属する前記時刻情報を補正し、補正した前記時刻情報を含む前記同期パケットを前記第二の送受信手段に転送し、
前記第一の送受信手段が前記第一の通信経路に前記同期パケットを送信する際に、前記第二の通信遅延を算出するための遅延情報となるデータグラムを前記同期パケットに付加することを特徴する通信制御装置。
two or more transmitting/receiving means connected to a network constituting a communication path of a synchronous packet containing time information and transmitting/receiving the synchronous packet;
and processing means for processing the synchronization packet received by the transmission/reception means,
The processing means
The order in which the synchronization packets are received by the first transmission/reception means and the second transmission/reception means of the transmission/reception means is recorded as a history of routing control of the synchronization packets in association with the synchronization packets, and the recorded routing control history is recorded. Determining whether to correct the time information based on the history,
a first communication path including a communication target of each of the transmission/reception means when the synchronization packet is received by the first transmission/reception means before the synchronization packet is received by the second transmission/reception means from the path control history; a first communication delay when the synchronization packet communicates and a second communication delay when the synchronization packet communicates a second communication path redundant to the first communication path correcting the time information belonging to the synchronization packet based on the delay change, and transferring the synchronization packet containing the corrected time information to the second transmitting/receiving means;
characterized in that, when the first transmitting/receiving means transmits the synchronous packet to the first communication path, a datagram as delay information for calculating the second communication delay is added to the synchronous packet. and communication control equipment.
時刻情報を含む同期パケットの通信経路を構成するネットワークに接続されて前記同期パケットを送受信する2以上の送受信手段と、
前記送受信手段の受信した前記同期パケットを処理する処理手段と、を備え、
前記処理手段は、
前記送受信手段のうち第一の送受信手段及び第二の送受信手段での前記同期パケットの受信順序を前記同期パケットの経路制御の履歴として前記同期パケットに対応付けて記録し、記録した前記経路制御の履歴に基づいて前記時刻情報を補正するか否かを判定し、
前記経路制御の履歴から前記第二の送受信手段で前記同期パケットを受信する前に前記第一の送受信手段で前記同期パケットを受信した場合、前記各送受信手段の通信対象を含む第一の通信経路を前記同期パケットが通信する際の第一の通信遅延と、前記第一の通信経路に対して冗長化された第二の通信経路を前記同期パケットが通信する際の第二の通信遅延との遅延変化分を基に前記同期パケットに属する前記時刻情報を補正し、補正した前記時刻情報を含む前記同期パケットを前記第二の送受信手段に転送し、
経路異常の発生位置を特定する情報を前記同期パケットに付加して前記第一の送受信手段から前記ネットワークに送信し、
前記第二の送受信手段が前記第二の通信経路から前記同期パケットを受信した際に、受信した前記同期パケットに、前記第二の通信経路中に存在する前記通信対象の数の変更を示す変更情報が存在する場合、前記時刻情報を補正する際には、前記経路異常の発生位置を特定する情報と前記通信対象の数の変更を示す変更情報とに基づいて前記第二の通信遅延を決定することを特徴とする通信制御装置。
two or more transmitting/receiving means connected to a network constituting a communication path of a synchronous packet containing time information and transmitting/receiving the synchronous packet;
and processing means for processing the synchronization packet received by the transmission/reception means,
The processing means
The order in which the synchronization packets are received by the first transmission/reception means and the second transmission/reception means of the transmission/reception means is recorded as a history of routing control of the synchronization packets in association with the synchronization packets, and the recorded routing control history is recorded. Determining whether to correct the time information based on the history,
a first communication path including a communication target of each of the transmission/reception means when the synchronization packet is received by the first transmission/reception means before the synchronization packet is received by the second transmission/reception means from the path control history; a first communication delay when the synchronization packet communicates and a second communication delay when the synchronization packet communicates a second communication path redundant to the first communication path correcting the time information belonging to the synchronization packet based on the delay change, and transferring the synchronization packet containing the corrected time information to the second transmitting/receiving means;
adding information specifying the position of occurrence of the path abnormality to the synchronization packet and transmitting it from the first transmitting/receiving means to the network;
When the second transmitting/receiving means receives the synchronous packet from the second communication path, the received synchronous packet is changed to indicate a change in the number of communication targets existing in the second communication path. When the information exists, when correcting the time information, the second communication delay is determined based on the information specifying the location of occurrence of the path abnormality and the change information indicating a change in the number of communication targets. A communication control device characterized by :
請求項2に記載の通信制御装置において、
前記データグラムは、
前記処理手段が、前記同期パケットに付加される論理アドレスまたは設定済みアドレスへアクセスするデータグラムであることを特徴とする通信制御装置。
In the communication control device according to claim 2,
The datagram is
A communication control apparatus according to claim 1, wherein said processing means is a datagram that accesses a logical address or a set address added to said synchronization packet.
請求項1~3のうちいずれか1項に記載の通信制御装置において、
前記処理手段は、
前記第二の通信経路における前記同期パケットに属する前記時刻情報を補正する際に、前記遅延変化分を前記第二の通信経路における前記同期パケットに属する前記時刻情報に加算することを特徴とする通信制御装置。
The communication control device according to any one of claims 1 to 3,
The processing means
communication characterized in that, when correcting the time information belonging to the synchronization packet on the second communication path, the delay variation is added to the time information belonging to the synchronization packet on the second communication path. Control device.
請求項1~3のうちいずれか1項に記載の通信制御装置において、
前記処理手段は、
前記第二の通信経路における前記同期パケットに、前記時刻情報としてタイムスタンプ又はコレクションフィールドが付加されている場合、前記時刻情報を補正する際に、前記遅延変化分を前記タイムスタンプ又は前記コレクションフィールドに加算することを特徴とする通信制御装置。
The communication control device according to any one of claims 1 to 3,
The processing means
when a time stamp or a correction field is added as the time information to the synchronization packet on the second communication path, when correcting the time information, the change in delay is added to the time stamp or the correction field A communication control device characterized by adding.
請求項1~3のうちいずれか1項に記載の通信制御装置において、
前記処理手段は、
前記第一の送受信手段の送受信した第一の送受信情報または前記第二の送受信手段の送受信した第二の送受信情報のうち少なくも一方の送受信情報を前記同期パケットに記憶し、前記第一の送受信手段又は前記第二の送受信手段が前記同期パケットを受信した際に、記憶した前記送受信情報を基に、前記受信した同期パケットに対する処理として、前記同期パケットの受信、前記同期パケットの破棄、或いは前記同期パケットの転送のうち少なくとも一つの処理を実行することを特徴とする通信制御装置。
The communication control device according to any one of claims 1 to 3,
The processing means
At least one of the first transmission/reception information transmitted/received by the first transmission/reception means or the second transmission/reception information transmitted/received by the second transmission/reception means is stored in the synchronization packet, and the first transmission/reception is performed. means or the second transmitting/receiving means receives the synchronous packet, based on the stored transmission/reception information, as a process for the received synchronous packet, the synchronous packet is received, the synchronous packet is discarded, or the A communication control device that executes at least one process of transferring a synchronous packet.
請求項7に記載の通信制御装置において、
前記処理手段は、
前記第一の送受信手段が前記同期パケットを受信した際に、前記記憶した送受信情報の中に前記第二の送受信手段から前記同期パケットを送信済みであることを示す情報が存在しない場合、経路異常と判定し、前記第一の送受信手段が受信した前記同期パケットを前記第二の送受信手段を介して前記第二の通信経路に転送することを特徴とする通信制御装置。
In the communication control device according to claim 7,
The processing means
When the first transmitting/receiving means receives the synchronous packet, if there is no information indicating that the synchronous packet has been transmitted from the second transmitting/receiving means in the stored transmission/reception information, path abnormality and transferring the synchronization packet received by the first transmitting/receiving means to the second communication path via the second transmitting/receiving means.
請求項1~3のうちいずれか1項に記載の通信制御装置において、
前記処理手段は、
前記第一の送受信手段が前記第一の通信経路に送信した前記同期パケットを、前記第二の送受信手段が前記第二の通信経路から受信した第一の受信時刻を保持し、前記同期パケットを受信後に前記第二の送受信手段を介して前記同期パケットを前記第二の通信経路に送信し、その後、前記第一の送受信手段が前記第一の通信経路から前記同期パケットを受信する第二の受信時刻を保持し、前記第一の受信時刻と前記第二の受信時刻とを基に前記第二の通信遅延を算出することを特徴とする通信制御装置。
The communication control device according to any one of claims 1 to 3,
The processing means
holding a first reception time at which the second transmitting/receiving means receives the synchronous packet transmitted to the first communication path by the first transmitting/receiving means from the second communication path, and transmitting the synchronous packet to the second transmitting/receiving means; After receiving, the synchronization packet is transmitted to the second communication path via the second transmission/reception means, and then the first transmission/reception means receives the synchronization packet from the first communication path. A communication control device, wherein a reception time is held, and the second communication delay is calculated based on the first reception time and the second reception time.
請求項1~3のうちいずれか1項に記載の通信制御装置において、
前記処理手段は、
前記第一の送受信手段の受信した前記同期パケットに属する前記時刻情報と、前記時刻情報を補正するための補正量を示す前記遅延変化分に基づいて、前記処理手段が管理する時刻情報を前記同期パケットの送信元に同期させることを特徴とする通信制御装置。
The communication control device according to any one of claims 1 to 3,
The processing means
The time information managed by the processing means is synchronized based on the time information belonging to the synchronization packet received by the first transmitting/receiving means and the delay variation indicating a correction amount for correcting the time information. A communication control device characterized by synchronizing with a packet transmission source.
請求項1~3のうちいずれか1項に記載の通信制御装置において、
前記処理手段は、
前記送受信手段の通信対象の変更に伴って、前記同期パケットの通信経路が、前記第一の通信経路から前記第二の通信経路に変更され、前記第二の通信経路が前記ネットワーク上で動的に構成される場合、前記第一の通信経路における前記第一の通信遅延と前記第二の通信経路における前記第二の通信遅延とを基に前記遅延変化分を算出することを特徴とする通信制御装置。
The communication control device according to any one of claims 1 to 3,
The processing means
A communication path for the synchronization packet is changed from the first communication path to the second communication path in accordance with a change in the communication target of the transmission/reception means, and the second communication path is dynamically changed on the network. communication, wherein the delay change is calculated based on the first communication delay in the first communication path and the second communication delay in the second communication path Control device.
請求項1~3のうちいずれか1項に記載の通信制御装置において、
前記同期パケット上の情報は、前記同期パケットの通信経路を特定する情報又は経路異常の発生位置を特定する情報のうち少なくとも一方を含むことを特徴とする通信制御装置。
The communication control device according to any one of claims 1 to 3,
A communication control apparatus, wherein the information on the synchronous packet includes at least one of information specifying a communication route of the synchronous packet and information specifying a location where a path abnormality occurs.
請求項1~3のうちいずれか1項に記載の通信制御装置において、
前記送受信手段の通信対象には前記遅延変化分の算出に用いる補助情報が格納されることを特徴とする通信制御装置。
The communication control device according to any one of claims 1 to 3,
A communication control apparatus, wherein auxiliary information used for calculating the delay variation is stored in a communication target of the transmission/reception means.
請求項13に記載の通信制御装置において、
前記補助情報を論理アドレス空間上に割り当てることを特徴とする通信制御装置。
The communication control device according to claim 13,
A communication control device, wherein the auxiliary information is assigned to a logical address space.
時刻情報を含む同期パケットの通信経路を構成するネットワーク中に配置される複数のネットワーク中継装置と、前記複数のネットワーク中継装置の各々に接続されて前記同期パケットを通信する複数の通信装置と、を備え、
前記複数のネットワーク中継装置又は前記複数の通信装置のうち少なくとも一つは、
前記同期パケットを送受信する2以上の送受信手段と、
前記送受信手段の受信した前記同期パケットを処理する処理手段と、を備え、
前記処理手段は、
前記送受信手段のうち第一の送受信手段及び第二の送受信手段での前記同期パケットの受信順序を前記同期パケットの経路制御の履歴として前記同期パケットに対応付けて記録し、記録した前記経路制御の履歴に基づいて前記時刻情報を補正するか否かを判定し、
前記経路制御の履歴から前記第二の送受信手段で前記同期パケットを受信する前に前記第一の送受信手段で前記同期パケットを受信した場合、前記各送受信手段の通信対象を含む第一の通信経路を前記同期パケットが通信する際の第一の通信遅延と、前記第一の通信経路に対して冗長化された第二の通信経路を前記同期パケットが通信する際の第二の通信遅延との遅延変化分を基に前記同期パケットに属する前記時刻情報を補正し、補正した前記時刻情報を含む前記同期パケットを前記第二の送受信手段に転送し、
前記時刻情報を補正する際には、前記第一の送受信手段から前記ネットワークに送信された前記同期パケットに付加された異常経路の発生位置を特定する情報に基づいて前記第二の通信遅延を決定し、
前記第一の送受信手段又は前記第二の送受信手段が前記同期パケットを受信した際に、前記経路制御の履歴に基づいて、前記同期パケットの受信、前記同期パケットの破棄或いは前記同期パケットの他方の送受信手段への転送のうち少なくとも一つの処理を実行することを特徴とする通信制御システム。
a plurality of network relay devices arranged in a network forming a communication path of a synchronous packet containing time information; and a plurality of communication devices connected to each of the plurality of network relay devices and communicating the synchronous packet. prepared,
at least one of the plurality of network relay devices or the plurality of communication devices,
two or more transmitting/receiving means for transmitting/receiving the synchronization packet;
and processing means for processing the synchronization packet received by the transmission/reception means,
The processing means
The order in which the synchronization packets are received by the first transmission/reception means and the second transmission/reception means of the transmission/reception means is recorded as a history of routing control of the synchronization packets in association with the synchronization packets, and the recorded routing control history is recorded. Determining whether to correct the time information based on the history,
a first communication path including a communication target of each of the transmission/reception means when the synchronization packet is received by the first transmission/reception means before the synchronization packet is received by the second transmission/reception means from the path control history; a first communication delay when the synchronization packet communicates and a second communication delay when the synchronization packet communicates a second communication path redundant to the first communication path correcting the time information belonging to the synchronization packet based on the delay change, and transferring the synchronization packet containing the corrected time information to the second transmitting/receiving means;
When correcting the time information, the second communication delay is determined based on information identifying the position of occurrence of an abnormal path added to the synchronization packet transmitted from the first transmitting/receiving means to the network. death,
When the first transmitting/receiving means or the second transmitting/receiving means receives the synchronous packet, based on the path control history , the synchronous packet is received, the synchronous packet is discarded, or the other of the synchronous packet is received. A communication control system characterized by executing at least one process of transferring to a transmitting/receiving means .
時刻情報を含む同期パケットの通信経路を構成するネットワーク中に配置される複数のネットワーク中継装置と、前記複数のネットワーク中継装置の各々に接続されて前記同期パケットを通信する複数の通信装置と、を備え、
前記複数のネットワーク中継装置又は前記複数の通信装置のうち少なくとも一つは、
前記同期パケットを送受信する2以上の送受信手段と、
前記送受信手段の受信した前記同期パケットを処理する処理手段と、を備え、
前記処理手段は、
前記送受信手段のうち第一の送受信手段及び第二の送受信手段での前記同期パケットの受信順序を前記同期パケットの経路制御の履歴として前記同期パケットに対応付けて記録し、記録した前記経路制御の履歴に基づいて前記時刻情報を補正するか否かを判定し、
前記経路制御の履歴から前記第二の送受信手段で前記同期パケットを受信する前に前記第一の送受信手段で前記同期パケットを受信した場合、前記各送受信手段の通信対象を含む第一の通信経路を前記同期パケットが通信する際の第一の通信遅延と、前記第一の通信経路に対して冗長化された第二の通信経路を前記同期パケットが通信する際の第二の通信遅延との遅延変化分を基に前記同期パケットに属する前記時刻情報を補正し、補正した前記時刻情報を含む前記同期パケットを前記第二の送受信手段に転送し、
前記第一の送受信手段が前記第一の通信経路に前記同期パケットを送信する際に、前記第二の通信遅延を算出するための遅延情報となるデータグラムを前記同期パケットに付加することを特徴とする通信制御システム。
a plurality of network relay devices arranged in a network forming a communication path of a synchronous packet containing time information; and a plurality of communication devices connected to each of the plurality of network relay devices and communicating the synchronous packet. prepared,
at least one of the plurality of network relay devices or the plurality of communication devices,
two or more transmitting/receiving means for transmitting/receiving the synchronization packet;
and processing means for processing the synchronization packet received by the transmission/reception means,
The processing means
The order in which the synchronization packets are received by the first transmission/reception means and the second transmission/reception means of the transmission/reception means is recorded as a history of routing control of the synchronization packets in association with the synchronization packets, and the recorded routing control history is recorded. Determining whether to correct the time information based on the history,
a first communication path including a communication target of each of the transmission/reception means when the synchronization packet is received by the first transmission/reception means before the synchronization packet is received by the second transmission/reception means from the path control history; a first communication delay when the synchronization packet communicates and a second communication delay when the synchronization packet communicates a second communication path redundant to the first communication path correcting the time information belonging to the synchronization packet based on the delay change, and transferring the synchronization packet containing the corrected time information to the second transmitting/receiving means;
characterized in that, when the first transmitting/receiving means transmits the synchronous packet to the first communication path, a datagram as delay information for calculating the second communication delay is added to the synchronous packet. and communication control system.
時刻情報を含む同期パケットの通信経路を構成するネットワーク中に配置される複数のネットワーク中継装置と、前記複数のネットワーク中継装置の各々に接続されて前記同期パケットを通信する複数の通信装置と、を備え、
前記複数のネットワーク中継装置又は前記複数の通信装置のうち少なくとも一つは、
前記同期パケットを送受信する2以上の送受信手段と、
前記送受信手段の受信した前記同期パケットを処理する処理手段と、を備え、
前記処理手段は、
前記送受信手段のうち第一の送受信手段及び第二の送受信手段での前記同期パケットの受信順序を前記同期パケットの経路制御の履歴として前記同期パケットに対応付けて記録し、記録した前記経路制御の履歴に基づいて前記時刻情報を補正するか否かを判定し、
前記経路制御の履歴から前記第二の送受信手段で前記同期パケットを受信する前に前記第一の送受信手段で前記同期パケットを受信した場合、前記各送受信手段の通信対象を含む第一の通信経路を前記同期パケットが通信する際の第一の通信遅延と、前記第一の通信経路に対して冗長化された第二の通信経路を前記同期パケットが通信する際の第二の通信遅延との遅延変化分を基に前記同期パケットに属する前記時刻情報を補正し、補正した前記時刻情報を含む前記同期パケットを前記第二の送受信手段に転送し、
経路異常の発生位置を特定する情報を前記同期パケットに付加して前記第一の送受信手段から前記ネットワークに送信し、
前記第二の送受信手段が前記第二の通信経路から前記同期パケットを受信した際に、受信した前記同期パケットに、前記第二の通信経路中に存在する前記通信対象の数の変更を示す変更情報が存在する場合、前記時刻情報を補正する際には、前記経路異常の発生位置を特定する情報と前記通信対象の数の変更を示す変更情報とに基づいて前記第二の通信遅延を決定することを特徴とする通信制御システム。
a plurality of network relay devices arranged in a network forming a communication path of a synchronous packet containing time information; and a plurality of communication devices connected to each of the plurality of network relay devices and communicating the synchronous packet. prepared,
at least one of the plurality of network relay devices or the plurality of communication devices,
two or more transmitting/receiving means for transmitting/receiving the synchronization packet;
and processing means for processing the synchronization packet received by the transmission/reception means,
The processing means
The order in which the synchronization packets are received by the first transmission/reception means and the second transmission/reception means of the transmission/reception means is recorded as a history of routing control of the synchronization packets in association with the synchronization packets, and the recorded routing control history is recorded. Determining whether to correct the time information based on the history,
a first communication path including a communication target of each of the transmission/reception means when the synchronization packet is received by the first transmission/reception means before the synchronization packet is received by the second transmission/reception means from the path control history; a first communication delay when the synchronization packet communicates and a second communication delay when the synchronization packet communicates a second communication path redundant to the first communication path correcting the time information belonging to the synchronization packet based on the delay change, and transferring the synchronization packet containing the corrected time information to the second transmitting/receiving means;
adding information specifying the position of occurrence of the path abnormality to the synchronization packet and transmitting it from the first transmitting/receiving means to the network;
When the second transmitting/receiving means receives the synchronous packet from the second communication path, the received synchronous packet is changed to indicate a change in the number of communication targets existing in the second communication path. When the information exists, when correcting the time information, the second communication delay is determined based on the information specifying the location of occurrence of the path abnormality and the change information indicating a change in the number of communication targets. A communication control system characterized by :
時刻情報を含む同期パケットの通信経路を構成するネットワーク中に配置される制御用計算機と、前記ネットワーク中に配置されて前記同期パケットを基に制御対象を制御する複数の被制御装置と、を備え、
前記制御用計算機又は前記複数の被制御装置のうち少なくとも一つは、
前記同期パケットを送受信する2以上の送受信手段と、
前記送受信手段の受信した前記同期パケットを処理する処理手段と、を備え、
前記処理手段は、
前記送受信手段のうち第一の送受信手段及び第二の送受信手段での前記同期パケットの受信順序を前記同期パケットの経路制御の履歴として前記同期パケットに対応付けて記録し、記録した前記経路制御の履歴に基づいて前記時刻情報を補正するか否かを判定し、
前記経路制御の履歴から前記第二の送受信手段で前記同期パケットを受信する前に前記第一の送受信手段で前記同期パケットを受信した場合、前記各送受信手段の通信対象を含む第一の通信経路を前記同期パケットが通信する際の第一の通信遅延と、前記第一の通信経路に対して冗長化された第二の通信経路を前記同期パケットが通信する際の第二の通信遅延との遅延変化分を基に前記同期パケットに属する前記時刻情報を補正し、補正した前記時刻情報を含む前記同期パケットを前記第二の送受信手段に転送し、
前記時刻情報を補正する際には、前記第一の送受信手段から前記ネットワークに送信された前記同期パケットに付加された異常経路の発生位置を特定する情報に基づいて前記第二の通信遅延を決定し、
前記第一の送受信手段又は前記第二の送受信手段が前記同期パケットを受信した際に、前記経路制御の履歴に基づいて、前記同期パケットの受信、前記同期パケットの破棄或いは前記同期パケットの他方の送受信手段への転送のうち少なくとも一つの処理を実行することを特徴とする通信制御システム。
A control computer arranged in a network constituting a communication path of a synchronous packet containing time information, and a plurality of controlled devices arranged in the network and controlling controlled objects based on the synchronous packet. ,
At least one of the control computer or the plurality of controlled devices,
two or more transmitting/receiving means for transmitting/receiving the synchronization packet;
and processing means for processing the synchronization packet received by the transmission/reception means,
The processing means
The order in which the synchronization packets are received by the first transmission/reception means and the second transmission/reception means of the transmission/reception means is recorded as a history of routing control of the synchronization packets in association with the synchronization packets, and the recorded routing control history is recorded. Determining whether to correct the time information based on the history,
a first communication path including a communication target of each of the transmission/reception means when the synchronization packet is received by the first transmission/reception means before the synchronization packet is received by the second transmission/reception means from the path control history; a first communication delay when the synchronization packet communicates and a second communication delay when the synchronization packet communicates a second communication path redundant to the first communication path correcting the time information belonging to the synchronization packet based on the delay change, and transferring the synchronization packet containing the corrected time information to the second transmitting/receiving means;
When correcting the time information, the second communication delay is determined based on information identifying the position of occurrence of an abnormal path added to the synchronization packet transmitted from the first transmitting/receiving means to the network. death,
When the first transmitting/receiving means or the second transmitting/receiving means receives the synchronous packet, based on the path control history , the synchronous packet is received, the synchronous packet is discarded, or the other of the synchronous packet is received. A communication control system characterized by executing at least one process of transferring to a transmitting/receiving means .
時刻情報を含む同期パケットの通信経路を構成するネットワーク中に配置される制御用計算機と、前記ネットワーク中に配置されて前記同期パケットを基に制御対象を制御する複数の被制御装置と、を備え、
前記制御用計算機又は前記複数の被制御装置のうち少なくとも一つは、
前記同期パケットを送受信する2以上の送受信手段と、
前記送受信手段の受信した前記同期パケットを処理する処理手段と、を備え、
前記処理手段は、
前記送受信手段のうち第一の送受信手段及び第二の送受信手段での前記同期パケットの受信順序を前記同期パケットの経路制御の履歴として前記同期パケットに対応付けて記録し、記録した前記経路制御の履歴に基づいて前記時刻情報を補正するか否かを判定し、
前記経路制御の履歴から前記第二の送受信手段で前記同期パケットを受信する前に前記第一の送受信手段で前記同期パケットを受信した場合、前記各送受信手段の通信対象を含む第一の通信経路を前記同期パケットが通信する際の第一の通信遅延と、前記第一の通信経路に対して冗長化された第二の通信経路を前記同期パケットが通信する際の第二の通信遅延との遅延変化分を基に前記同期パケットに属する前記時刻情報を補正し、補正した前記時刻情報を含む前記同期パケットを前記第二の送受信手段に転送し、
前記第一の送受信手段が前記第一の通信経路に前記同期パケットを送信する際に、前記第二の通信遅延を算出するための遅延情報となるデータグラムを前記同期パケットに付加することを特徴とする通信制御システム。
A control computer arranged in a network constituting a communication path of a synchronous packet containing time information, and a plurality of controlled devices arranged in the network and controlling controlled objects based on the synchronous packet. ,
At least one of the control computer or the plurality of controlled devices,
two or more transmitting/receiving means for transmitting/receiving the synchronization packet;
and processing means for processing the synchronization packet received by the transmission/reception means,
The processing means
The order in which the synchronization packets are received by the first transmission/reception means and the second transmission/reception means of the transmission/reception means is recorded as a history of routing control of the synchronization packets in association with the synchronization packets, and the recorded routing control history is recorded. Determining whether to correct the time information based on the history,
a first communication path including a communication target of each of the transmission/reception means when the synchronization packet is received by the first transmission/reception means before the synchronization packet is received by the second transmission/reception means from the path control history; a first communication delay when the synchronization packet communicates and a second communication delay when the synchronization packet communicates a second communication path redundant to the first communication path correcting the time information belonging to the synchronization packet based on the delay change, and transferring the synchronization packet containing the corrected time information to the second transmitting/receiving means;
characterized in that, when the first transmitting/receiving means transmits the synchronous packet to the first communication path, a datagram as delay information for calculating the second communication delay is added to the synchronous packet. and communication control system.
時刻情報を含む同期パケットの通信経路を構成するネットワーク中に配置される制御用計算機と、前記ネットワーク中に配置されて前記同期パケットを基に制御対象を制御する複数の被制御装置と、を備え、
前記制御用計算機又は前記複数の被制御装置のうち少なくとも一つは、
前記同期パケットを送受信する2以上の送受信手段と、
前記送受信手段の受信した前記同期パケットを処理する処理手段と、を備え、
前記処理手段は、
前記送受信手段のうち第一の送受信手段及び第二の送受信手段での前記同期パケットの受信順序を前記同期パケットの経路制御の履歴として前記同期パケットに対応付けて記録し、記録した前記経路制御の履歴に基づいて前記時刻情報を補正するか否かを判定し、
前記経路制御の履歴から前記第二の送受信手段で前記同期パケットを受信する前に前記第一の送受信手段で前記同期パケットを受信した場合、前記各送受信手段の通信対象を含む第一の通信経路を前記同期パケットが通信する際の第一の通信遅延と、前記第一の通信経路に対して冗長化された第二の通信経路を前記同期パケットが通信する際の第二の通信遅延との遅延変化分を基に前記同期パケットに属する前記時刻情報を補正し、補正した前記時刻情報を含む前記同期パケットを前記第二の送受信手段に転送し、
経路異常の発生位置を特定する情報を前記同期パケットに付加して前記第一の送受信手段から前記ネットワークに送信し、
前記第二の送受信手段が前記第二の通信経路から前記同期パケットを受信した際に、受信した前記同期パケットに、前記第二の通信経路中に存在する前記通信対象の数の変更を示す変更情報が存在する場合、前記時刻情報を補正する際には、前記経路異常の発生位置を特定する情報と前記通信対象の数の変更を示す変更情報とに基づいて前記第二の通信遅延を決定することを特徴とする通信制御システム。
A control computer arranged in a network constituting a communication path of a synchronous packet containing time information, and a plurality of controlled devices arranged in the network and controlling controlled objects based on the synchronous packet. ,
At least one of the control computer or the plurality of controlled devices,
two or more transmitting/receiving means for transmitting/receiving the synchronization packet;
and processing means for processing the synchronization packet received by the transmission/reception means,
The processing means
The order in which the synchronization packets are received by the first transmission/reception means and the second transmission/reception means of the transmission/reception means is recorded as a history of routing control of the synchronization packets in association with the synchronization packets, and the recorded routing control history is recorded. Determining whether to correct the time information based on the history,
a first communication path including a communication target of each of the transmission/reception means when the synchronization packet is received by the first transmission/reception means before the synchronization packet is received by the second transmission/reception means from the path control history; a first communication delay when the synchronization packet communicates and a second communication delay when the synchronization packet communicates a second communication path redundant to the first communication path correcting the time information belonging to the synchronization packet based on the delay change, and transferring the synchronization packet containing the corrected time information to the second transmitting/receiving means;
adding information specifying the position of occurrence of the path abnormality to the synchronization packet and transmitting it from the first transmitting/receiving means to the network;
When the second transmitting/receiving means receives the synchronous packet from the second communication path, the received synchronous packet is changed to indicate a change in the number of communication targets existing in the second communication path. When the information exists, when correcting the time information, the second communication delay is determined based on the information specifying the location of occurrence of the path abnormality and the change information indicating a change in the number of communication targets. A communication control system characterized by :
請求項15~20のうちいずれか1項に記載の通信制御システムにおいて、
前記同期パケット上の情報は、前記同期パケットの通信経路を特定する情報又は経路異常の発生位置を特定する情報のうち少なくとも一方を含むことを特徴とする通信制御システム。
In the communication control system according to any one of claims 15 to 20,
A communication control system, wherein the information on the synchronous packet includes at least one of information specifying a communication route of the synchronous packet and information specifying a location where a path abnormality occurs.
JP2022081517A 2018-03-02 2022-05-18 Communication control device and communication control system Active JP7330329B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022081517A JP7330329B2 (en) 2018-03-02 2022-05-18 Communication control device and communication control system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018038104A JP2019153941A (en) 2018-03-02 2018-03-02 Communication control device and communication control system
JP2022081517A JP7330329B2 (en) 2018-03-02 2022-05-18 Communication control device and communication control system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2018038104A Division JP2019153941A (en) 2018-03-02 2018-03-02 Communication control device and communication control system

Publications (2)

Publication Number Publication Date
JP2022103347A JP2022103347A (en) 2022-07-07
JP7330329B2 true JP7330329B2 (en) 2023-08-21

Family

ID=87577115

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022081517A Active JP7330329B2 (en) 2018-03-02 2022-05-18 Communication control device and communication control system

Country Status (1)

Country Link
JP (1) JP7330329B2 (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006027817A1 (en) 2004-09-03 2006-03-16 Mitsubishi Denki Kabushiki Kaisha Communication system and node apparatus
US20060245454A1 (en) 2005-04-27 2006-11-02 Rockwell Automation Technologies, Inc. Time synchronization, deterministic data delivery and redundancy for cascaded nodes on full duplex ethernet networks
JP2011196770A (en) 2010-03-18 2011-10-06 Nec Corp Time synchronizing system, time information supply device, and response information transmission method
WO2012108387A1 (en) 2011-02-08 2012-08-16 三菱電機株式会社 Communication system time synchronization method, slave station apparatus, master station apparatus, control apparatus, and program
JP2012209791A (en) 2011-03-30 2012-10-25 Hitachi Ltd Network node, time synchronization method, and network system
JP2013207452A (en) 2012-03-28 2013-10-07 Hitachi Industrial Equipment Systems Co Ltd Communication control system
JP2013247506A (en) 2012-05-25 2013-12-09 Fujitsu Ltd Transmission device and transmission method
JP2015065525A (en) 2013-09-24 2015-04-09 株式会社日立製作所 Communication system and time synchronization method
JP2015103978A (en) 2013-11-26 2015-06-04 株式会社日立製作所 Network system and relay device
WO2015177902A1 (en) 2014-05-22 2015-11-26 三菱電機株式会社 Relay apparatus

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006027817A1 (en) 2004-09-03 2006-03-16 Mitsubishi Denki Kabushiki Kaisha Communication system and node apparatus
US20060245454A1 (en) 2005-04-27 2006-11-02 Rockwell Automation Technologies, Inc. Time synchronization, deterministic data delivery and redundancy for cascaded nodes on full duplex ethernet networks
JP2011196770A (en) 2010-03-18 2011-10-06 Nec Corp Time synchronizing system, time information supply device, and response information transmission method
WO2012108387A1 (en) 2011-02-08 2012-08-16 三菱電機株式会社 Communication system time synchronization method, slave station apparatus, master station apparatus, control apparatus, and program
JP2012209791A (en) 2011-03-30 2012-10-25 Hitachi Ltd Network node, time synchronization method, and network system
JP2013207452A (en) 2012-03-28 2013-10-07 Hitachi Industrial Equipment Systems Co Ltd Communication control system
JP2013247506A (en) 2012-05-25 2013-12-09 Fujitsu Ltd Transmission device and transmission method
JP2015065525A (en) 2013-09-24 2015-04-09 株式会社日立製作所 Communication system and time synchronization method
JP2015103978A (en) 2013-11-26 2015-06-04 株式会社日立製作所 Network system and relay device
WO2015177902A1 (en) 2014-05-22 2015-11-26 三菱電機株式会社 Relay apparatus

Also Published As

Publication number Publication date
JP2022103347A (en) 2022-07-07

Similar Documents

Publication Publication Date Title
Bello et al. A perspective on IEEE time-sensitive networking for industrial communication and automation systems
US9673995B2 (en) Communication device and method for redundant message transmission in an industrial communication network
US9166922B2 (en) Communication device for an industrial communication network which can be operated in a redundant manner and method for operating a communication device
US9148297B2 (en) Information processor and control network system
CN102833061B (en) Based on method and the node of the raising clock accuracy of seamless redundant looped network
US11811511B2 (en) Method, apparatus, and system for communication between controllers in TSN
JP5891086B2 (en) Communication control system, communication control device, and controlled device
US9485045B2 (en) Communication control equipment
US8812759B2 (en) Bus subscriber device for connection to a line-redundant data bus, and method for controlling the communication of a bus subscriber with a line-redundant serial data bus
WO2021079599A1 (en) Control device and distributed control system
JP2008160227A (en) Network apparatus and communication system
JP6045950B2 (en) Communication control device and communication system
EP3955520A1 (en) Iot control network planning
WO2020038191A1 (en) Time delay measuring method and network device
US20220094588A1 (en) Failure Handling Of A TSN Communication Link
WO2019167415A1 (en) Communication control device and communication control system
JP7330329B2 (en) Communication control device and communication control system
Weibel Tutorial on parallel redundancy protocol (PRP)
WO2016027532A1 (en) Communication control apparatus and network relay apparatus
JP4994280B2 (en) Route change type network device and system
WO2020129219A1 (en) Network device, network system, network method, and network program
CN214627023U (en) Switching equipment compatible with definable deterministic communication Ethernet
KR101156097B1 (en) Master redundancy method in Ethernet powerlink
EP4002779B1 (en) Method and apparatus for sharing information in redundant network, and computer storage medium
US10063465B2 (en) Network system and relay device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220518

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230228

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230414

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230808

R150 Certificate of patent or registration of utility model

Ref document number: 7330329

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150