JP6247597B2 - Control device - Google Patents

Control device Download PDF

Info

Publication number
JP6247597B2
JP6247597B2 JP2014110402A JP2014110402A JP6247597B2 JP 6247597 B2 JP6247597 B2 JP 6247597B2 JP 2014110402 A JP2014110402 A JP 2014110402A JP 2014110402 A JP2014110402 A JP 2014110402A JP 6247597 B2 JP6247597 B2 JP 6247597B2
Authority
JP
Japan
Prior art keywords
processing
control device
communication
data acquisition
request
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
JP2014110402A
Other languages
Japanese (ja)
Other versions
JP2015226215A (en
Inventor
義則 望月
義則 望月
横田 大輔
大輔 横田
駿介 森
駿介 森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2014110402A priority Critical patent/JP6247597B2/en
Publication of JP2015226215A publication Critical patent/JP2015226215A/en
Application granted granted Critical
Publication of JP6247597B2 publication Critical patent/JP6247597B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Communication Control (AREA)
  • Small-Scale Networks (AREA)

Description

本発明は、ノードがネットワークを介して接続された他のノード内のデータにアクセスする技術に関する。   The present invention relates to technology for accessing data in other nodes to which a node is connected via a network.

制御システムにおいて、計算機やコントローラ等の処理装置(以下、ノードと呼ぶ)上で動作するアプリケーションは、そのノードにネットワークを介して接続された複数の他ノードに存在するデータを利用して一定周期で動作する。アプリケーションが利用するデータの中には、他ノード上で動作するアプリケーションにより更新されるデータも存在する。この場合、他ノード上で動作するアプリケーションも一定周期で動作しているため、その更新は一定周期で行われる。   In a control system, an application that operates on a processing device (hereinafter referred to as a node) such as a computer or a controller uses data existing in a plurality of other nodes connected to the node via a network at a constant cycle. Operate. Among data used by an application, there is data updated by an application operating on another node. In this case, since the application running on the other node is also running at a constant cycle, the update is performed at a constant cycle.

アプリケーションの実行結果は、更新前のデータを利用した場合と更新後のデータを利用した場合で異なる可能性があるため、アプリケーションを安定的に動作させるためには、常にどちらかのデータを利用する必要がある。   The execution result of the application may differ depending on whether the data before update is used or the data after update. Therefore, to use the application stably, always use either data. There is a need.

このようなデータ品質を一定にする方法として、特許文献1には、複数のノード間において周期的な同報送信によりデータ共有する転写メモリシステムが記載されている。   As a method for keeping the data quality constant, Patent Document 1 describes a transfer memory system in which data is shared among a plurality of nodes by periodic broadcast transmission.

この転写メモリシステムにおいて、アプリケーションが周期的にデータ更新を行ったタイミングで、同報送信を行うことにより、常に更新後のデータがシステム内で共有されることになるため、安定的なアプリケーションの動作を実現することが可能となる。   In this transfer memory system, by performing broadcast transmission at the timing when the application periodically updates data, the updated data is always shared within the system, so stable application operation Can be realized.

ただし、特許文献1に記載されている技術では、予めノード毎に利用できるメモリ領域を固定化する方法がとられているため、制御アプリケーションがシステム更新を行うときや、メモリ領域の使い勝手の向上させたいときに、各ノードのメモリ使用領域の変更が必要な場合には適用することが困難であった。   However, in the technique described in Patent Document 1, since a memory area that can be used for each node is fixed in advance, when the control application updates the system or when the memory area is improved in use. When it is necessary to change the memory usage area of each node, it has been difficult to apply.

特許文献1の課題を解決する技術として、特許文献2には、各ノードが、メモリ上の領域毎に、この領域を確保しているノードの識別情報を示す領域管理情報を格納する転写メモリシステムが記載されている。   As a technique for solving the problem of Patent Document 1, Patent Document 2 discloses a transfer memory system in which each node stores area management information indicating identification information of a node that secures this area for each area on the memory. Is described.

各ノードが領域管理情報を格納することにより、もし、メモリ使用領域を変更する場合には、その領域管理情報にその旨を設定し、同報通信することにより、他ノードにも、その変更を通知することが可能となり、システム動作中のメモリ使用領域の変更が可能となる。   By storing the area management information in each node, if the memory use area is changed, the fact is set in the area management information and broadcast communication is performed so that other nodes can also change the area. Notification can be made, and the memory use area can be changed during system operation.

特開平11−341038号公報Japanese Patent Laid-Open No. 11-341038 特開2008−59420号公報JP 2008-59420 A

同報通信を送信するノード上のアプリケーションの変更により、システムで共有されるデータを追加する場合、特許文献2に記載の技術を利用することにより、追加されたデータを設定するメモリ領域を確保することが可能となり、追加されたデータをシステム内で共有することが可能となる。   When adding data shared by the system by changing an application on a node that transmits broadcast communication, a memory area for setting the added data is secured by using the technique described in Patent Document 2. And the added data can be shared within the system.

しかし、同報通信を受信するノード上のアプリケーションの変更により、システムで共有されていないデータが必要となった場合、そのデータを取得することはできないため、アプリケーションを正確に動作させることができない可能性がある。   However, if data that is not shared by the system becomes necessary due to a change in the application on the node that receives the broadcast communication, the data cannot be obtained, so the application cannot be operated correctly. There is sex.

このようなデータを取得するために、アプリケーションの動作に必要なデータを持つノードに対して直接データを要求する問合せ型データアクセス方式が考えられる。しかし、問合せ型データアクセス方式では、問合せ元のタイミングでデータを要求するため、応答として得られるデータの品質を一定に保つことが難しい。データの品質が一定に保たれなければ、アプリケーションを安定して動作させることができない場合がある。   In order to acquire such data, a query-type data access method that directly requests data from a node having data necessary for the operation of the application can be considered. However, in the query type data access method, since data is requested at the timing of the query source, it is difficult to keep the quality of data obtained as a response constant. If the data quality is not kept constant, the application may not be able to operate stably.

上記課題を解決するために、本発明の一態様である制御装置は、予め定められたアプリケーション実行周期を示す処理情報と、ネットワークを介して接続された他制御装置との通信の計画を示す通信情報とを記憶する記憶部と、前記アプリケーション実行周期毎に前記アプリケーションを実行し、処理の要求である処理要求メッセージを前記他制御装置から受信した場合に前記処理を実行し前記処理の結果を含む処理応答メッセージを前記他制御装置へ送信する応答処理を実行する処理部と、を備える。前記処理部は、予め定められた応答時間内に前記応答処理を完了することを通信条件とし、前記他制御装置からの前記通信の要求を受信した場合、前記処理情報及び前記通信情報に基づいて、前記通信が前記通信条件を満たすか否かを判定し、前記判定の結果を示す判定情報を前記他制御装置へ送信する。   In order to solve the above-described problem, a control device according to one aspect of the present invention provides communication information indicating a predetermined application execution cycle and a communication plan with another control device connected via a network. A storage unit that stores information, and the application is executed at each application execution cycle, and when the processing request message that is a request for processing is received from the other control device, the processing is executed and the result of the processing is included And a processing unit that executes a response process of transmitting a process response message to the other control device. The processing unit, based on the processing information and the communication information, when the communication condition is to complete the response processing within a predetermined response time and the communication request is received from the other control device Then, it is determined whether or not the communication satisfies the communication condition, and determination information indicating the result of the determination is transmitted to the other control device.

本発明の一態様によれば、制御装置は、要求の受信からその応答の送信までの時間を予め定められた時間内に完了することができる。   According to one aspect of the present invention, the control device can complete the time from reception of the request to transmission of the response within a predetermined time.

本発明の実施形態の制御システムの構成を示す。The structure of the control system of embodiment of this invention is shown. ノード100の構成を示す。A configuration of the node 100 is shown. アプリケーション実行周期171とアプリケーション実行時間172との関係を示す。The relationship between the application execution period 171 and the application execution time 172 is shown. 応答送信管理テーブル130と要求送信管理テーブル140を示す。A response transmission management table 130 and a request transmission management table 140 are shown. 通信ミドルウェア160の機能構成を示す。The function structure of the communication middleware 160 is shown. 上限受信量決定処理のフローを示す。The flow of an upper limit reception amount determination process is shown. 通信処理のシーケンスを示す。The sequence of communication processing is shown. 要求元におけるコネクション確立処理及びデータ取得処理のフローを示す。The flow of the connection establishment process and data acquisition process in a request source is shown. 要求先におけるコネクション確立処理及びデータ取得処理のフローを示す。The flow of the connection establishment process and data acquisition process in a request destination is shown. データ取得要求メッセージの受信タイミングを示す。Indicates the reception timing of the data acquisition request message. 要求先におけるデータ取得処理のフローを示す。The flow of data acquisition processing at the request destination is shown.

以下、本発明の実施形態を図面に基づいて詳細に説明する。尚、本発明の実施形態を説明する図において、同一部には同一の符号を付し、その繰り返しの説明は、省略することにする。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the drawings describing the embodiment of the present invention, the same parts are denoted by the same reference numerals, and repeated description thereof will be omitted.

図1は、本発明の実施形態の制御システムの構成を示す。この制御システムは、複数のノード100(100a,100b,100c,100d)を含む。或るノード100は、ネットワーク114経由で、他ノードに記憶されたデータへのアクセスを行う。なお、システム内のノード数は、この図に例示した数に限定されない。例えば、各ノードは、制御対象機器に接続され、制御対象装置の監視や制御を行う制御装置である。   FIG. 1 shows a configuration of a control system according to an embodiment of the present invention. This control system includes a plurality of nodes 100 (100a, 100b, 100c, 100d). A certain node 100 accesses data stored in another node via the network 114. The number of nodes in the system is not limited to the number illustrated in this figure. For example, each node is a control device that is connected to the control target device and monitors and controls the control target device.

図2は、ノード100の構成を示す。ノード100は、コントローラ(制御装置)、ワークステーション、パーソナルコンピュータ等のコンピュータである。   FIG. 2 shows the configuration of the node 100. The node 100 is a computer such as a controller (control device), a workstation, or a personal computer.

ノード100は、ハードウェアモジュールとして、揮発/不揮発性メモリやハードディスク装置等を含む記憶部111と、中央処理装置(CPU:Central Processing Unit)等を含む処理部112と、通信インタフェース(通信I/F)113とを含む。この通信インタフェース113は、ネットワーク114との接続を行うインタフェースであり、イーサネット(登録商標)や無線LAN(Local Area Network)などの通信インタフェースが該当する。記憶部111は、プログラム及びデータを格納する。処理部112は、記憶部111に格納されたプログラムを実行する。   The node 100 includes, as hardware modules, a storage unit 111 including a volatile / nonvolatile memory and a hard disk device, a processing unit 112 including a central processing unit (CPU), and a communication interface (communication I / F). 113). The communication interface 113 is an interface for connecting to the network 114, and corresponds to a communication interface such as Ethernet (registered trademark) or wireless LAN (Local Area Network). The storage unit 111 stores programs and data. The processing unit 112 executes a program stored in the storage unit 111.

記憶部111は、プログラムとして、OS150、通信ミドルウェア160、アプリケーション170(170a、170b)を実行する。記憶部111は更に、データとして、設定ファイル120と、応答送信管理テーブル130と、要求送信管理テーブル140とを格納する。記憶部111は更に、他ノードからアクセス可能な領域である共有メモリ領域180を含む。   The storage unit 111 executes the OS 150, the communication middleware 160, and the applications 170 (170a and 170b) as programs. The storage unit 111 further stores a setting file 120, a response transmission management table 130, and a request transmission management table 140 as data. The storage unit 111 further includes a shared memory area 180 that is an area accessible from other nodes.

設定ファイル120は、アプリケーション170の実行の周期を示すアプリケーション実行周期171と、アプリケーション実行周期171内のアプリケーション170の実行時間であるアプリケーション実行時間172と、他ノードからのデータ取得要求メッセージの受信からその応答メッセージの送信までのデータ取得処理に掛かる時間(以下、データ取得処理時間と呼ぶ)と、OS150により確保されたバッファにおいて、通信インタフェース113により受信されバッファに保存できるメッセージの最大数である最大格納メッセージ数と、それぞれのノード100を一意に識別するノードアドレスに関する情報とを含む。   The setting file 120 includes an application execution period 171 indicating an execution period of the application 170, an application execution time 172 that is an execution time of the application 170 in the application execution period 171, and data reception request messages received from other nodes. Time required for data acquisition processing until response message transmission (hereinafter referred to as data acquisition processing time), and maximum storage that is the maximum number of messages that can be received by the communication interface 113 and stored in the buffer in the buffer secured by the OS 150 It includes the number of messages and information regarding the node address that uniquely identifies each node 100.

データ取得要求メッセージは、システム内のノード100に対して、そのノード100の記憶部111に格納されたデータにアクセスするために送信されるメッセージである。以後、データ取得要求メッセージを送信するノード100を要求元と呼び、データ取得要求メッセージを受信するノード100を要求先と呼ぶ。   The data acquisition request message is a message transmitted to the node 100 in the system in order to access the data stored in the storage unit 111 of the node 100. Hereinafter, the node 100 that transmits the data acquisition request message is referred to as a request source, and the node 100 that receives the data acquisition request message is referred to as a request destination.

本実施形態の制御システム、データ取得要求メッセージの送受信方式として、単発型要求メッセージ方式と、周期型要求メッセージ方式がある。   The control system of this embodiment and the data acquisition request message transmission / reception method include a single request message method and a periodic request message method.

単発型要求メッセージ方式において、データ取得要求メッセージを受信したノード100は、その受信毎に、記憶部111に格納されたデータをデータ取得応答メッセージとして送信する。これにより、要求先は、要求元からのデータ取得要求メッセージに応じてデータ取得応答メッセージを送信することができる。   In the one-shot request message method, the node 100 that has received the data acquisition request message transmits the data stored in the storage unit 111 as a data acquisition response message each time it is received. Thereby, the request destination can transmit a data acquisition response message in response to the data acquisition request message from the request source.

一方、周期型要求メッセージ方式において、一度だけデータ取得要求メッセージを受信したノード100は、データ取得要求メッセージに示された周期で応答メッセージを自発的に送信する。これにより、その後、要求元がデータ取得要求メッセージを送信しなくても要求先が与えられた周期でデータ取得応答メッセージを送信することができる。   On the other hand, in the periodic request message method, the node 100 that has received the data acquisition request message only once transmits a response message spontaneously in the period indicated in the data acquisition request message. As a result, the data acquisition response message can be transmitted at a given cycle after the request source does not transmit the data acquisition request message.

なお、データ取得要求メッセージには、データアクセスの対象データの数、要求先の共有メモリ領域180内で対象データが格納された先頭のメモリアドレス、そのデータサイズ、周期型要求メッセージ方式のために応答メッセージを送信する周期などを含む。   The data acquisition request message is responded to because of the number of target data to be accessed, the top memory address where the target data is stored in the shared memory area 180 of the request destination, its data size, and the periodic request message method. Includes the cycle for sending messages.

図3は、アプリケーション実行周期171とアプリケーション実行時間172との関係を示す。この図に示すように、一般的に、制御システム上で動作するアプリケーション170は一定の周期であるアプリケーション実行周期171が経過する度に、一定のアプリケーション実行時間172の長さを有するアプリケーション実行期間だけ動作する。ノード100が複数のアプリケーション170a、170bを実行する場合、アプリケーション実行期間は、複数のアプリケーション170a、170bの実行期間を合わせた期間である。この場合のアプリケーション実行時間172は、複数のアプリケーション170a、170bの実行時間の合計である。アプリケーション実行周期171の中で、アプリケーション実行期間以外の期間をアプリケーション待機期間と呼ぶ。   FIG. 3 shows the relationship between the application execution period 171 and the application execution time 172. As shown in this figure, in general, an application 170 operating on a control system has an application execution period having a fixed application execution time 172 each time an application execution cycle 171 that is a fixed cycle elapses. Operate. When the node 100 executes a plurality of applications 170a and 170b, the application execution period is a period obtained by combining the execution periods of the plurality of applications 170a and 170b. The application execution time 172 in this case is the total of the execution times of the plurality of applications 170a and 170b. In the application execution cycle 171, a period other than the application execution period is called an application standby period.

ノード100は、他ノードよりデータ取得要求メッセージを受信すると、アプリケーション待機期間においてデータ取得要求メッセージを解析し、データ取得要求メッセージにより指定されたデータを記憶部111から取得し、取得されたデータを応答メッセージとして他ノードへ送信するデータ取得処理を行う。   When the node 100 receives the data acquisition request message from another node, the node 100 analyzes the data acquisition request message in the application waiting period, acquires the data specified by the data acquisition request message from the storage unit 111, and returns the acquired data as a response. Data acquisition processing to be transmitted to other nodes as a message is performed.

アプリケーション実行周期171と比較して、アプリケーション実行時間172が小さい場合や、受信したデータ取得要求メッセージの数が少ない場合、ノード100は、アプリケーション待機期間にデータ取得処理を行うことが可能である。   When the application execution time 172 is shorter than the application execution cycle 171 or when the number of received data acquisition request messages is small, the node 100 can perform data acquisition processing during the application standby period.

しかし、アプリケーション実行周期171とアプリケーション実行時間172がほとんど同じ場合などは、そのデータ取得処理を行う時間がほとんどないため、ノード100は、或るアプリケーション実行周期で受信されたデータ取得要求メッセージのデータ取得処理を、次のアプリケーション実行周期に行う可能性がある。   However, when the application execution cycle 171 and the application execution time 172 are almost the same, there is almost no time for performing the data acquisition process, and therefore the node 100 acquires the data acquisition request message received in a certain application execution cycle. Processing may be performed in the next application execution cycle.

この場合、要求先によるデータ取得処理のタイミングが、要求されたデータが更新する前であるのか、更新する後であるのか分からない。そのため、例えば、アプリケーション170が制御ロジックや故障/事故の解析のように、データ取得要求を複数回発行する場合、そのデータの更新タイミングの違いにより、予想通りの動作ができない場合があるため、上記のような要求/応答型のデータアクセスを制御システムに適用できない場合がある。   In this case, it is not known whether the timing of data acquisition processing by the request destination is before or after the requested data is updated. Therefore, for example, when the application 170 issues a data acquisition request a plurality of times as in the case of control logic or failure / accident analysis, the expected operation may not be possible due to the difference in the update timing of the data. There are cases where request / response type data access such as is not applicable to the control system.

そのため、本実施例の制御システムは、一つのアプリケーション実行周期内で、要求先がデータ取得要求メッセージの受信とその応答メッセージの送信とを実行できるように、要求元によるデータ取得要求メッセージの送信を制御する。   Therefore, the control system of the present embodiment transmits the data acquisition request message by the request source so that the request destination can receive the data acquisition request message and transmit the response message within one application execution cycle. Control.

図4は、応答送信管理テーブル130と要求送信管理テーブル140を示す。   FIG. 4 shows a response transmission management table 130 and a request transmission management table 140.

応答送信管理テーブル130は、他ノードから受信されたデータ取得要求メッセージを示すテーブルであり、データ取得要求メッセージ毎のエントリを含む。一つのコネクションに対応するエントリは、要求元ノードアドレス131と、要求先頭メモリアドレス132と、データサイズ133と、応答送信周期134とを含む。要求元ノードアドレス131は、当該データ取得要求メッセージの要求元のノードアドレスを示す。ノードアドレスは例えば、IP(Internet Protocol)アドレス等のネットワークアドレスである。要求先頭メモリアドレス132は、当該データ取得要求メッセージに含まれ、取得の対象データの先頭のメモリアドレスを示す。データサイズ133は、当該データ取得要求メッセージに含まれるデータサイズを示す。応答送信周期134は、当該データ取得要求メッセージに含まれ、応答メッセージの送信の周期を示す。これらの項目のうち、要求先頭メモリアドレス132と、データサイズ133と、応答送信周期134は、周期型要求メッセージ方式のデータ取得要求メッセージに含まれ、単発型要求メッセージ方式のデータ取得要求メッセージに含まれない。   The response transmission management table 130 is a table indicating a data acquisition request message received from another node, and includes an entry for each data acquisition request message. The entry corresponding to one connection includes a request source node address 131, a request head memory address 132, a data size 133, and a response transmission cycle 134. The request source node address 131 indicates the node address of the request source of the data acquisition request message. The node address is, for example, a network address such as an IP (Internet Protocol) address. The request start memory address 132 is included in the data acquisition request message and indicates the start memory address of the acquisition target data. The data size 133 indicates the data size included in the data acquisition request message. The response transmission period 134 is included in the data acquisition request message and indicates the transmission period of the response message. Among these items, the request head memory address 132, the data size 133, and the response transmission cycle 134 are included in the data acquisition request message of the periodic request message method and included in the data acquisition request message of the single request message method. I can't.

周期型要求メッセージ方式において、要求先は、要求先頭メモリアドレス132に示されたアドレスからデータサイズ133が示すサイズ分のデータを、応答送信周期134に示された周期で、応答メッセージとして送信する。周期型要求メッセージ方式を用いることにより、要求先は、要求元とのコネクションが確立されれば、要求元からのデータ取得要求メッセージを受信しなくても、応答送信周期134の経過毎に応答メッセージを送信することができる。   In the periodic request message method, the request destination transmits data corresponding to the size indicated by the data size 133 from the address indicated by the request head memory address 132 as a response message at the period indicated by the response transmission period 134. By using the periodic request message method, if the connection with the request source is established, the request destination does not receive a data acquisition request message from the request source, and the response message is sent every time the response transmission cycle 134 elapses. Can be sent.

この応答送信管理テーブル130によれば、要求先は、要求元からの受信の計画を管理することができる。   According to this response transmission management table 130, the request destination can manage a plan for reception from the request source.

要求送信管理テーブル140は、要求元がデータ取得要求メッセージの送信タイミング制御に利用するテーブルであり、コネクションを確立した要求先毎のエントリを含む。一つの要求先に対応するエントリは、要求先ノードアドレス141と、要求送信周期142とを含む。要求先ノードアドレス141は、データ取得要求メッセージを送信するノードアドレスを示す。要求送信周期142は、要求先ノードアドレス141が示すノード100にデータ取得要求メッセージを送信する周期を示す。   The request transmission management table 140 is a table used by a request source for transmission timing control of a data acquisition request message, and includes an entry for each request destination that has established a connection. An entry corresponding to one request destination includes a request destination node address 141 and a request transmission cycle 142. The request destination node address 141 indicates a node address that transmits a data acquisition request message. The request transmission period 142 indicates a period for transmitting a data acquisition request message to the node 100 indicated by the request destination node address 141.

要求元は、要求先ノードアドレス141に示されたノード100に対し、要求送信周期142毎にデータ取得要求メッセージを送信する。要求元が要求先から受信した要求送信周期142の経過毎にデータ取得要求メッセージを送信することにより、要求先のデータ取得要求メッセージの受信数を制限することができる。   The request source transmits a data acquisition request message to the node 100 indicated by the request destination node address 141 every request transmission cycle 142. By transmitting the data acquisition request message every elapse of the request transmission cycle 142 received from the request destination by the request source, the number of data acquisition request messages received by the request destination can be limited.

この要求送信管理テーブル140によれば、要求元は、要求先への送信の計画を管理することができる。   According to the request transmission management table 140, the request source can manage the transmission plan to the request destination.

OS150は、ノード100の動作を統括的に制御する基本ソフトウェアである。   The OS 150 is basic software that comprehensively controls the operation of the node 100.

図5は、通信ミドルウェア160の機能構成を示す。   FIG. 5 shows a functional configuration of the communication middleware 160.

通信ミドルウェア160は、データ取得要求メッセージの受信とそれに対する応答メッセージの送信とを一つのアプリケーション実行周期内で処理できるように、データ取得要求メッセージの送信タイミングなどの制御を行う。通信ミドルウェア160は、モジュールとして、メッセージ生成/送信部161と、メッセージ解析/受信部162と、データ取得要求受付部163と、データ取得部164と、周期データ管理部165と、帯域管理部166とを含む。   The communication middleware 160 controls the transmission timing of the data acquisition request message so that reception of the data acquisition request message and transmission of a response message to the data acquisition request message can be processed within one application execution cycle. The communication middleware 160 includes a message generation / transmission unit 161, a message analysis / reception unit 162, a data acquisition request reception unit 163, a data acquisition unit 164, a periodic data management unit 165, and a bandwidth management unit 166 as modules. including.

メッセージ生成/送信部161は、他モジュールからの命令に応じたメッセージを生成し、通信インタフェース113を通じて送信する。   The message generation / transmission unit 161 generates a message according to a command from another module and transmits it through the communication interface 113.

メッセージ解析/受信部162は、他ノードから通信インタフェース113を介して送信されたメッセージを受信し、そのメッセージを解析した後、その解析結果に応じて、他モジュールにその結果を送信する。   The message analysis / reception unit 162 receives a message transmitted from another node via the communication interface 113, analyzes the message, and transmits the result to another module according to the analysis result.

データ取得要求受付部163は、アプリケーション170からのデータ取得要求を受付け、その要求を要求送信管理テーブル140に示された要求送信周期142に合わせてメッセージ生成/送信部161へ送信する。メッセージ生成/送信部161は、その要求に基づくデータ取得要求メッセージを送信し、メッセージ解析/受信部162は、データ取得要求メッセージに対する応答メッセージを受信し、データ取得要求に対する応答をデータ取得要求受付部163へ送信する。データ取得要求受付部163は、メッセージ解析/受信部162からその応答を受信し、該当するアプリケーション170へその応答を送信する。   The data acquisition request reception unit 163 receives a data acquisition request from the application 170 and transmits the request to the message generation / transmission unit 161 in accordance with the request transmission cycle 142 indicated in the request transmission management table 140. The message generation / transmission unit 161 transmits a data acquisition request message based on the request, and the message analysis / reception unit 162 receives a response message to the data acquisition request message and sends a response to the data acquisition request as a data acquisition request reception unit. To 163. The data acquisition request reception unit 163 receives the response from the message analysis / reception unit 162 and transmits the response to the corresponding application 170.

データ取得部164は、メッセージ解析/受信部162により受信されたデータ取得要求メッセージに応じて、記憶部111よりデータを取得し、その結果をメッセージ生成/送信部161に送信する。   The data acquisition unit 164 acquires data from the storage unit 111 in response to the data acquisition request message received by the message analysis / reception unit 162 and transmits the result to the message generation / transmission unit 161.

周期データ管理部165は、周期型要求メッセージ方式のデータ取得要求メッセージを受信した後、応答送信管理テーブル130に示された応答送信周期134に合わせて、データ取得部164にデータ取得要求を送信する。   After receiving the data acquisition request message of the periodic request message method, the periodic data management unit 165 transmits a data acquisition request to the data acquisition unit 164 in accordance with the response transmission period 134 shown in the response transmission management table 130. .

帯域管理部166は、後に述べる電源起動時に上限受信パケットレートを算出し、その算出したレートに応じて、他ノードによるデータ取得要求メッセージの送信を制御する。なお、上限受信パケットレートは、アプリケーション実行周期内にノード100が受信できるデータ取得要求メッセージ数である。   The bandwidth management unit 166 calculates an upper limit reception packet rate at the time of power activation described later, and controls transmission of a data acquisition request message by another node according to the calculated rate. The upper limit reception packet rate is the number of data acquisition request messages that can be received by the node 100 within the application execution cycle.

アプリケーション170は、アプリケーション実行周期171毎に、アプリケーション実行期間の間、動作する。記憶部111は、他ノードの記憶部111内の要求先の共有メモリ領域180内でアプリケーション170の動作に必要なデータのメモリアドレスを記憶する。アプリケーション170は、他ノードのメモリアドレスを指定するデータ取得要求を通信ミドルウェア160へ発行することにより、通信ミドルウェア160からデータを取得する。OS150は、アプリケーション170の動作保証を行い、データ取得処理などの他の処理よりアプリケーション170の実行を優先し、アプリケーション170をアプリケーション実行周期171毎に実行する。   The application 170 operates for each application execution period 171 during the application execution period. The storage unit 111 stores a memory address of data necessary for the operation of the application 170 in the shared memory area 180 of the request destination in the storage unit 111 of another node. The application 170 acquires data from the communication middleware 160 by issuing a data acquisition request designating the memory address of another node to the communication middleware 160. The OS 150 guarantees the operation of the application 170, prioritizes execution of the application 170 over other processing such as data acquisition processing, and executes the application 170 every application execution cycle 171.

以下、ノード100の動作について説明する。   Hereinafter, the operation of the node 100 will be described.

ノード100の電源起動時、帯域管理部166は、データ取得要求メッセージの受信量の上限を決定する上限受信量決定処理を行う。   When the node 100 is powered on, the bandwidth management unit 166 performs an upper limit reception amount determination process for determining the upper limit of the reception amount of the data acquisition request message.

図6は、上限受信量決定処理のフローを示す。   FIG. 6 shows a flow of the upper limit reception amount determination process.

ノード100の電源起動後、帯域管理部166は、記憶部111に格納された設定ファイル120を読込み、アプリケーション実行周期171と、アプリケーション実行時間172と、データ取得処理時間と、最大メッセージ数などの情報を取得する(S500)。なお、これらの情報の中で、OS150を通じて取得できる情報がある場合には、設定ファイル120を利用せず、OS150を通じて取得してもよい。   After powering on the node 100, the bandwidth management unit 166 reads the setting file 120 stored in the storage unit 111, and information such as an application execution cycle 171, application execution time 172, data acquisition processing time, and the maximum number of messages. Is acquired (S500). If there is information that can be acquired through the OS 150 among these pieces of information, the setting file 120 may not be used and may be acquired through the OS 150.

次に、帯域管理部166は、取得した情報を利用して、要求メッセージ処理レートとバッファあふれ防止レートをそれぞれ算出する(S510、S520)。   Next, the bandwidth management unit 166 calculates the request message processing rate and the buffer overflow prevention rate using the acquired information (S510, S520).

要求メッセージ処理レートは、単位時間に、データ取得処理できるデータ取得要求メッセージ数である。アプリケーション実行周期中に受信したデータ取得要求メッセージは、アプリケーション待機期間中にデータ取得処理される。例えば、単位時間をアプリケーション実行周期171とし、アプリケーション実行周期171が50ms、アプリケーション実行時間172が30ms、データ取得処理時間が1msの場合、要求メッセージ処理レートは、(アプリケーション実行周期171−アプリケーション実行時間172)÷データ取得処理時間÷アプリケーション実行周期171=(50ms−30ms)÷1ms÷50ms=20個/50msとなる。この場合、ノード100は、アプリケーション待機期間中内に、20個までのデータ取得要求メッセージのデータ取得処理を行うことができる。   The request message processing rate is the number of data acquisition request messages that can be subjected to data acquisition processing per unit time. The data acquisition request message received during the application execution cycle is subjected to data acquisition processing during the application standby period. For example, when the unit time is the application execution cycle 171, the application execution cycle 171 is 50 ms, the application execution time 172 is 30 ms, and the data acquisition processing time is 1 ms, the request message processing rate is (application execution cycle 171-application execution time 172 ) ÷ data acquisition processing time ÷ application execution cycle 171 = (50 ms−30 ms) ÷ 1 ms ÷ 50 ms = 20/50 ms. In this case, the node 100 can perform data acquisition processing of up to 20 data acquisition request messages within the application standby period.

ノード100がアプリケーション実行周期内に要求メッセージ処理レートを超えたメッセージ数を受信した場合、そのアプリケーション実行周期内にデータ取得処理を完了できない恐れがある。   When the node 100 receives the number of messages exceeding the request message processing rate within the application execution cycle, the data acquisition processing may not be completed within the application execution cycle.

バッファあふれ防止レートは、アプリケーション実行期間中の単位時間に、バッファが格納できるデータ取得要求メッセージ数であり、例えば、バッファが格納できるデータ取得要求メッセージの最大数である最大格納メッセージ数が90個、アプリケーション実行時間172が30msとすると、最大格納メッセージ数÷アプリケーション実行時間172=90個÷30ms=3個/ms=150個/50msとなる。この場合、ノード100は、アプリケーション実行期間内に、150個までのデータ取得要求メッセージを受信することができる。   The buffer overflow prevention rate is the number of data acquisition request messages that can be stored in the buffer per unit time during the application execution period. For example, the maximum number of data acquisition request messages that can be stored in the buffer is 90, If the application execution time 172 is 30 ms, the maximum number of stored messages / application execution time 172 = 90/30 ms = 3 / ms = 150/50 ms. In this case, the node 100 can receive up to 150 data acquisition request messages within the application execution period.

ノード100がアプリケーション実行期間中にバッファあふれ防止レートを超えたメッセージ数を受信した場合、データ取得要求メッセージをバッファに格納することができないため、データ取得要求メッセージをロストする恐れがある。   When the node 100 receives the number of messages exceeding the buffer overflow prevention rate during the application execution period, the data acquisition request message cannot be stored in the buffer, and thus the data acquisition request message may be lost.

要求メッセージ処理レートならびにバッファあふれ防止レートの両方を算出した後、帯域管理部166は、これら2つのレートの中で小さい方を上限受信パケットレートとする(S530)。例えば、上記の要求メッセージ処理レート及びバッファあふれ防止レートの値では、要求メッセージ処理レートを上限受信パケットレートとする。   After calculating both the request message processing rate and the buffer overflow prevention rate, the bandwidth management unit 166 sets the smaller one of these two rates as the upper limit reception packet rate (S530). For example, in the values of the request message processing rate and the buffer overflow prevention rate, the request message processing rate is set as the upper limit reception packet rate.

以上が電源起動時の帯域管理部166のフローである。複数のノード100は非同期で動作し、要求先は、要求元によるデータ取得要求メッセージの送信タイミングを知らない。即ち、要求先は、アプリケーション実行期間中にデータ取得要求メッセージを受信する場合と、アプリケーション待機期間中にデータ取得要求メッセージを受信する場合とがある。帯域管理部166のフローによれば、それぞれの期間で受信可能なデータ取得要求メッセージ数を算出し、少ない方を上限受信パケットレートとして決定し、アプリケーション実行周期内で受信されるデータ取得要求メッセージ数が上限受信パケットレート以下に制限する。これにより、データ取得要求メッセージの受信から応答メッセージの送信までのデータ取得処理に掛かる時間を、予め定められた応答時間以下にすることができる。   The above is the flow of the bandwidth management unit 166 at the time of power activation. The plurality of nodes 100 operate asynchronously, and the request destination does not know the transmission timing of the data acquisition request message by the request source. That is, the request destination may receive a data acquisition request message during the application execution period, or may receive a data acquisition request message during the application waiting period. According to the flow of the bandwidth management unit 166, the number of data acquisition request messages that can be received in each period is calculated, the smaller one is determined as the upper limit reception packet rate, and the number of data acquisition request messages received within the application execution cycle Is limited below the upper limit received packet rate. Thereby, the time required for the data acquisition process from the reception of the data acquisition request message to the transmission of the response message can be made equal to or shorter than a predetermined response time.

なお、帯域管理部166は、予め定められた計測時間内でアプリケーション実行期間中に処理できるデータ取得要求メッセージの数を、要求メッセージ処理レートとし、計測時間内でアプリケーション待機期間中に受信できるデータ取得要求メッセージの数を、バッファあふれ防止レートとし、計測時間内に処理できるデータ取得要求メッセージの数を、上限受信パケットレートとしても良い。この場合、帯域管理部166は、計測時間をアプリケーション実行周期としても良い。   The bandwidth management unit 166 uses the number of data acquisition request messages that can be processed during the application execution period within a predetermined measurement time as the request message processing rate, and obtains data that can be received during the application standby period within the measurement time. The number of request messages may be the buffer overflow prevention rate, and the number of data acquisition request messages that can be processed within the measurement time may be the upper limit reception packet rate. In this case, the bandwidth management unit 166 may use the measurement time as the application execution cycle.

データ取得要求メッセージを送信する送信処理の時間は、アプリケーション実行時間やデータ取得処理時間に比べて小さく、他の処理に与える影響は小さいため、ノード100は、要求メッセージ処理レートの算出に送信処理の時間を考慮しなくても良い。また、ノード100は、アプリケーション待機期間の長さから予め設定された送信処理の時間を減じて、要求メッセージ処理レートを算出しても良い。   Since the transmission processing time for transmitting the data acquisition request message is smaller than the application execution time and the data acquisition processing time, and the influence on other processing is small, the node 100 uses the transmission processing for calculating the request message processing rate. There is no need to consider time. Further, the node 100 may calculate the request message processing rate by subtracting a preset transmission processing time from the length of the application waiting period.

以下、要求元であるノード100aが要求先であるノード100bと通信を行うことにより対象データを取得する通信処理について説明する。   Hereinafter, a communication process in which the target data is acquired by the node 100a as the request source communicating with the node 100b as the request destination will be described.

図7は、通信処理のシーケンスを示す。   FIG. 7 shows a communication processing sequence.

ノード100aで動作するアプリケーション170aは、通信ミドルウェア160に対して、データ取得要求を送信する(S610)。この要求には要求先のノードアドレスや対象データが格納されたメモリアドレスを指定する。周期型要求メッセージ方式の場合、データ取得要求は更に、データ取得の周期である応答送信周期を指定する。   The application 170a operating on the node 100a transmits a data acquisition request to the communication middleware 160 (S610). In this request, the node address of the request destination and the memory address storing the target data are designated. In the case of the periodic request message method, the data acquisition request further specifies a response transmission cycle that is a data acquisition cycle.

データ取得要求を受信した通信ミドルウェア160は、必要に応じてコネクション確立処理を行う(S700)。なお、コネクション確立処理の詳細はのちに説明する。コネクション確立処理によって、ノード100aの要求により、ノード100bは電源起動に算出した上限受信パケットレートを超えるか否かを判断する。これにより、ノード100bとのコネクションを確立済みのノード100の動作に影響を与えることを防ぐ。   The communication middleware 160 that has received the data acquisition request performs connection establishment processing as necessary (S700). Details of the connection establishment process will be described later. Through the connection establishment process, the node 100b determines whether or not the upper limit received packet rate calculated for power activation exceeds the request from the node 100a. This prevents the operation of the node 100 that has already established a connection with the node 100b from being affected.

コネクション確立処理(S700)の結果、コネクション確立が困難な場合(S720のNoの場合)、通信ミドルウェア160はアプリケーション170aに対して、データ取得ができないことを通知する(S820)。   If it is difficult to establish a connection as a result of the connection establishment process (S700) (No in S720), the communication middleware 160 notifies the application 170a that data cannot be obtained (S820).

コネクション確立処理(S700)の結果、コネクション確立ができる場合(S720のYesの場合)、通信ミドルウェア160はノード100bの記憶部111に格納されたデータにアクセスするデータ取得処理を実行し(S800)、その実行結果であるデータ取得応答を、アプリケーション170aに通知する(S820)。周期型要求メッセージ方式の場合、S800及びS820が繰り返し行われる。   If the connection can be established as a result of the connection establishment process (S700) (Yes in S720), the communication middleware 160 executes a data acquisition process for accessing the data stored in the storage unit 111 of the node 100b (S800). A data acquisition response as the execution result is notified to the application 170a (S820). In the case of the periodic request message method, S800 and S820 are repeatedly performed.

以上の通信処理によれば、要求元は、要求先との通信によりコネクションを確立し、コネクションが確立されれば、要求先からデータを取得することができる。   According to the above communication processing, the request source establishes a connection by communication with the request destination, and if the connection is established, data can be acquired from the request destination.

図8は、要求元におけるコネクション確立処理及びデータ取得処理のフローを示す。   FIG. 8 shows a flow of connection establishment processing and data acquisition processing at the request source.

コネクション確立処理(S700)において、ノード100aの通信ミドルウェア160のデータ取得要求受付部163は、アプリケーション170aよりデータ取得要求を受信すると、その受信内容を解析し、要求送信管理テーブル140を参照する(S710、S712)。   In the connection establishment process (S700), when receiving the data acquisition request from the application 170a, the data acquisition request receiving unit 163 of the communication middleware 160 of the node 100a analyzes the received content and refers to the request transmission management table 140 (S710). , S712).

要求送信管理テーブル140に、要求先のノードアドレスが含まれている場合、データ取得要求受付部163は、コネクション確立済みと判断し(S714のYesの場合)、データ取得処理(S810以降)を実行する。   If the request transmission management table 140 includes the node address of the request destination, the data acquisition request receiving unit 163 determines that the connection has been established (Yes in S714), and executes the data acquisition process (S810 and later). To do.

要求送信管理テーブル140に、要求先のノードアドレスが含まれていない場合、データ取得要求受付部163は、コネクションが未確立と判断し(S714のNoの場合)、コネクション処理を実行するために、メッセージ生成/送信部161は、コネクション確立要求メッセージを生成し、コネクション確立要求メッセージをノード100bに対して送信する(S716)。   When the request transmission management table 140 does not include the node address of the request destination, the data acquisition request reception unit 163 determines that the connection has not been established (No in S714), and executes the connection process. The message generation / transmission unit 161 generates a connection establishment request message and transmits the connection establishment request message to the node 100b (S716).

コネクション確立要求メッセージを送信後、メッセージ解析/受信部162が、その要求に対するコネクション確立応答メッセージを受信、解析した結果(S718)、コネクション確立が可能と判断された場合(S720のYesの場合)、データ取得要求受付部163は、要求先ノードアドレス141と、その応答に含まれる要求送信周期141とを、要求送信管理テーブル140に設定し、データ取得処理(S810以降)へ移行する。   After transmitting the connection establishment request message, the message analysis / reception unit 162 receives and analyzes the connection establishment response message corresponding to the request (S718). If it is determined that the connection can be established (Yes in S720), The data acquisition request reception unit 163 sets the request destination node address 141 and the request transmission cycle 141 included in the response in the request transmission management table 140, and proceeds to data acquisition processing (S810 and subsequent steps).

解析した結果、コネクション確立が困難と判断された場合(S720のNoの場合)、データ取得要求受付部163は、アプリケーション170aに対して、データ取得ができないことを通知する(S820)。   As a result of the analysis, when it is determined that connection establishment is difficult (No in S720), the data acquisition request receiving unit 163 notifies the application 170a that data acquisition is not possible (S820).

以上が要求元のノード100aにおけるコネクション確立処理の説明である。次に、ノード100aにおけるデータ取得処理(S800)を説明する。   The above is the description of the connection establishment process in the requesting node 100a. Next, the data acquisition process (S800) in the node 100a will be described.

通信ミドルウェア160のデータ取得要求受付部163は、要求送信管理テーブル140に含まれる要求送信周期142を参照して、データ取得要求メッセージを送信するタイミングか否かを判断する(S810)。   The data acquisition request reception unit 163 of the communication middleware 160 refers to the request transmission cycle 142 included in the request transmission management table 140 and determines whether it is time to transmit the data acquisition request message (S810).

送信するタイミングであると判断された場合(S810のYesの場合)、メッセージ生成/送信部161は、データ取得要求メッセージの生成、ならびに送信を行う(S812)。   When it is determined that it is time to transmit (Yes in S810), the message generation / transmission unit 161 generates and transmits a data acquisition request message (S812).

送信したデータ取得要求メッセージに対する応答メッセージを、メッセージ解析/受信部162が受信し解析すると(S814)、データ取得要求受付部163は、その結果をアプリケーション170aに通知する(S820)。   When the message analysis / reception unit 162 receives and analyzes the response message to the transmitted data acquisition request message (S814), the data acquisition request reception unit 163 notifies the application 170a of the result (S820).

一方、データ取得要求メッセージを送信するタイミングではないと判断された場合(S810のNoの場合)、データ取得要求受付部163は、データ取得要求メッセージの待ち状態になり、アプリケーション170a又は他アプリケーションからのデータ取得要求を待つ(S816)。   On the other hand, when it is determined that it is not the timing to transmit the data acquisition request message (No in S810), the data acquisition request reception unit 163 enters a wait state for the data acquisition request message, and receives from the application 170a or another application. It waits for a data acquisition request (S816).

以上の要求元の処理によれば、要求先とのコネクションが確立されていなければ、コネクションを確立すると共に、要求先から要求送信周期を受信することができる。これにより、要求元は、要求送信周期に従ってデータ取得要求メッセージを送信することができる。   According to the above processing of the request source, if the connection with the request destination is not established, the connection can be established and the request transmission cycle can be received from the request destination. Thereby, the request source can transmit the data acquisition request message according to the request transmission cycle.

図9は、要求先におけるコネクション確立処理及びデータ取得処理のフローを示す。   FIG. 9 shows a flow of connection establishment processing and data acquisition processing at the request destination.

メッセージ解析/受信部162はノード100aからコネクション確立要求メッセージを受信すると(S750のYesの場合)、帯域管理部166にその旨を通知、通知を受けた帯域管理部166は、応答送信管理テーブル130を参照し(S752)、確立されたコネクションにより受信されるデータ取得要求メッセージ数と、受信されたコネクション確立要求メッセージとの合計を算出し、単位時間あたりの合計のメッセージ数である受信パケットレートを算出し、算出された受信パケットレートが上限受信パケットレートを超えるか否かを判断する(S754)。データ取得要求メッセージ数は例えば、応答送信管理テーブル130のエントリ数である。単位時間は例えば、アプリケーション実行周期171である。   When the message analysis / reception unit 162 receives the connection establishment request message from the node 100a (Yes in S750), the message management / notification unit 162 notifies the bandwidth management unit 166 to that effect, and the bandwidth management unit 166 that has received the notification transmits the response transmission management table 130. (S752), the total of the number of data acquisition request messages received by the established connection and the received connection establishment request message is calculated, and the received packet rate which is the total number of messages per unit time is calculated. It is calculated, and it is determined whether or not the calculated received packet rate exceeds the upper limit received packet rate (S754). The number of data acquisition request messages is, for example, the number of entries in the response transmission management table 130. The unit time is, for example, the application execution cycle 171.

受信パケットレートが上限受信パケットレートを超えないと判断された場合(S754のNoの場合)、メッセージ生成/送信部161は、要求送信周期を示すコネクション確立応答メッセージを送信し(S756)、処理をS750へ移行させる。   If it is determined that the received packet rate does not exceed the upper limit received packet rate (No in S754), the message generation / transmission unit 161 transmits a connection establishment response message indicating the request transmission cycle (S756), and performs processing. The process proceeds to S750.

受信パケットレートが上限受信パケットレートを超えると判断された場合、(S754のYesの場合)、メッセージ生成/送信部161は、コネクション確立不可を示すコネクション確立応答メッセージを送信し(S758)、処理をS750へ移行させる。   When it is determined that the received packet rate exceeds the upper limit received packet rate (Yes in S754), the message generation / transmission unit 161 transmits a connection establishment response message indicating that the connection cannot be established (S758), and performs processing. The process proceeds to S750.

以上が要求先のノード100bにおけるコネクション確立処理の説明である。次に、ノード100bにおけるデータ取得処理(S800)を説明する。   The above is the description of the connection establishment process in the requested node 100b. Next, the data acquisition process (S800) in the node 100b will be described.

メッセージ解析/受信部162は、コネクション確立要求メッセージでなく(S750のNoの場合)、データ取得要求メッセージを受信すると(S850のYesの場合)、データ取得部164にその旨を通知する。その通知を受けたデータ取得部164は、要求先の共有メモリ領域180より該当データを取得し(S854)、メッセージ生成/送信部161は、取得されたデータを含む応答をノード100aへ送信し(S856)、処理をコネクション確立処理のS750へ移行させる。   When the message analysis / reception unit 162 receives the data acquisition request message (in the case of No in S750) instead of the connection establishment request message (in the case of No in S750), the message analysis / reception unit 162 notifies the data acquisition unit 164 to that effect. Upon receiving the notification, the data acquisition unit 164 acquires the corresponding data from the request-destination shared memory area 180 (S854), and the message generation / transmission unit 161 transmits a response including the acquired data to the node 100a ( S856), the process proceeds to S750 of the connection establishment process.

また、周期データ管理部165は、応答送信管理テーブル130を参考し、周期データを送信するタイミングか否か、即ち、前回の周期データの送信から応答送信周期134が経過したか否かを判断する(S858)。周期データは、周期型要求メッセージ方式において、要求先が応答送信周期134毎に送信する応答メッセージである。   Further, the periodic data management unit 165 refers to the response transmission management table 130 and determines whether or not it is time to transmit the periodic data, that is, whether or not the response transmission period 134 has elapsed since the previous transmission of the periodic data. (S858). The periodic data is a response message that the request destination transmits every response transmission period 134 in the periodic request message method.

判断した結果、周期データを送信するタイミングであると判断された場合(S858のYesの場合)、データ取得部164にその旨を通知する。通知を受けたデータ取得部164は、要求先の共有メモリ領域180より該当データを取得し(S854)、メッセージ生成/送信部161は、取得したデータを含む応答をノード100aへ送信する(S856)。   As a result of the determination, if it is determined that it is time to transmit the periodic data (Yes in S858), the data acquisition unit 164 is notified of this. The data acquisition unit 164 that has received the notification acquires the corresponding data from the shared memory area 180 of the request destination (S854), and the message generation / transmission unit 161 transmits a response including the acquired data to the node 100a (S856). .

S858において、周期データを送信するタイミングではないと判断された場合(S858のNoの場合)、周期データ管理部165は、周期データを送信するタイミングになるまで待つ。   In S858, when it is determined that it is not the timing for transmitting the periodic data (No in S858), the periodic data management unit 165 waits until the timing for transmitting the periodic data is reached.

以上の要求先の処理によれば、要求元からコネクション確立要求メッセージを受信した場合に、アプリケーション実行周期171内に受信されるデータ取得要求メッセージの数に基づいて、コネクションを確立するか否かを判定することができる。これにより、アプリケーション実行周期171内に受信されるデータ取得要求メッセージの数を制限することができ、データ取得要求メッセージの数の増大による応答メッセージの遅れを防ぐことができる。また、要求先は、コネクション確立と共に周期型要求メッセージ方式のデータ取得要求メッセージを受信した場合、その後、データ取得要求メッセージを受信することなく、応答送信周期134毎に応答メッセージを送信することができる。   According to the above processing of the request destination, whether or not to establish a connection based on the number of data acquisition request messages received within the application execution period 171 when a connection establishment request message is received from the request source. Can be determined. As a result, the number of data acquisition request messages received within the application execution cycle 171 can be limited, and a response message delay due to an increase in the number of data acquisition request messages can be prevented. In addition, when a request destination receives a data acquisition request message of a periodic request message method together with connection establishment, it can transmit a response message every response transmission period 134 without receiving a data acquisition request message thereafter. .

以上の動作により、ノード100aはノード100bに格納された対象データを取得することができる。   With the above operation, the node 100a can acquire the target data stored in the node 100b.

以上に説明したように、コネクション確立要求メッセージを受信した要求先は、コネクションを確立すると判定した場合に、要求送信周期を示すコネクション確立応答メッセージを送信することにより、アプリケーション170が共有メモリ領域180内のデータを更新するタイミングに対して、データ取得応答メッセージを送信するタイミングを一定に保つことができる。   As described above, when the request destination that has received the connection establishment request message determines to establish a connection, the application 170 transmits a connection establishment response message indicating the request transmission cycle, so that the application 170 in the shared memory area 180 The timing of transmitting the data acquisition response message can be kept constant with respect to the timing of updating the data.

また、要求先が確立済のコネクションの情報に基づいて、新たに要求されたコネクションを確立するか否かを判定することにより、要求先が他ノードから受信するデータ取得要求メッセージの量を制限することができる。また、要求先がデータ取得要求メッセージの受信からデータ取得応答メッセージの送信までの応答処理を、予め定められた応答時間内に完了することができる。これにより、要求先のアプリケーション170が共有メモリ領域180内のデータを更新するタイミングに対して、データ取得要求メッセージを受信するタイミングを一定に保つことができる。また、応答時間をアプリケーション実行周期とすることにより、アプリケーション実行周期内に処理することができるデータ取得要求メッセージの量を制限することができる。   In addition, the request destination limits the amount of data acquisition request messages received from other nodes by determining whether or not to establish a newly requested connection based on information on connections that have already been established. be able to. Further, the response process from the reception of the data acquisition request message to the transmission of the data acquisition response message by the request destination can be completed within a predetermined response time. As a result, the timing at which the data acquisition request message is received can be kept constant with respect to the timing at which the requested application 170 updates the data in the shared memory area 180. Also, by setting the response time as the application execution cycle, the amount of data acquisition request messages that can be processed within the application execution cycle can be limited.

図10は、データ取得要求メッセージの受信タイミングを示す。   FIG. 10 shows the reception timing of the data acquisition request message.

要求先がアプリケーション実行周期の終了直前にデータ取得要求メッセージを受信した場合など、データ取得要求メッセージの受信タイミングによっては、データ取得処理の途中でアプリケーション実行期間になってデータ取得処理が中断され、アプリケーション実行期間後にデータ取得処理が再開される可能性がある。このように、データ取得処理が次のアプリケーション実行周期に跨ると、対象データがアプリケーションにより更新される恐れがある。ここでは、データ取得処理が次のアプリケーション実行周期に跨る場合を検出するデータ取得処理について説明する。   Depending on the reception timing of the data acquisition request message, such as when the request destination receives a data acquisition request message just before the end of the application execution cycle, the data acquisition process is interrupted during the data acquisition process, and the data acquisition process is interrupted. Data acquisition processing may be resumed after the execution period. Thus, when the data acquisition process extends over the next application execution cycle, the target data may be updated by the application. Here, a data acquisition process for detecting a case where the data acquisition process extends over the next application execution cycle will be described.

図11は、要求先におけるデータ取得処理のフローを示す。   FIG. 11 shows the flow of data acquisition processing at the request destination.

要求先であるノード100bのメッセージ解析/受信部162は、要求元であるノード100aからデータ取得要求メッセージを受信し(S850)、そのメッセージを解析した後(S852)、データ取得部164は処理部112等に含まれる時計を利用して現時刻を確認し、時刻Aとして記憶部111に保存する(S1000)。   The message analysis / reception unit 162 of the requesting node 100b receives the data acquisition request message from the requesting node 100a (S850), analyzes the message (S852), and then the data acquisition unit 164 is a processing unit. The current time is confirmed using a clock included in 112, etc., and stored in the storage unit 111 as time A (S1000).

次に、データ取得部164は要求先の共有メモリ領域180より該当データを取得する(S854)。   Next, the data acquisition unit 164 acquires the corresponding data from the requested shared memory area 180 (S854).

データ取得後、データ取得部164は、S1000と同様、現時刻を確認し、その時刻Bと時刻Aを比較する(S1010、S1020)。   After data acquisition, the data acquisition unit 164 confirms the current time, and compares the time B with the time A (S1010, S1020), as in S1000.

比較した結果、2つの時刻の差が、アプリケーション実行時間172より長い場合(S1020のYesの場合)、データ取得部164は、データ取得処理中にアプリケーション170の実行が行われたと判断し、エラーとして応答をノード100aへ送信し(S1030)、処理を前述のS750へ移行させる。   As a result of the comparison, if the difference between the two times is longer than the application execution time 172 (Yes in S1020), the data acquisition unit 164 determines that the application 170 has been executed during the data acquisition process, and an error occurs. A response is transmitted to the node 100a (S1030), and the process proceeds to S750 described above.

比較した結果、2つの時刻の差が、アプリケーション実行時間172より短い場合(S1020のNoの場合)、データ取得部164は、データ取得処理が正常に行われたと判断し、取得したデータを応答として送信し(S1040)、処理を前述のS750へ移行させる。   As a result of the comparison, if the difference between the two times is shorter than the application execution time 172 (No in S1020), the data acquisition unit 164 determines that the data acquisition process has been performed normally, and uses the acquired data as a response. (S1040), and the process proceeds to S750 described above.

このデータ取得処理によれば、データ取得前と、データ取得後の時刻を確かめることにより、データ取得処理中にアプリケーションの実行が行われた否かを判断することが可能となる。   According to this data acquisition process, it is possible to determine whether or not the application has been executed during the data acquisition process by checking the time before the data acquisition and the time after the data acquisition.

なお、他ノードから要求メッセージにより要求される処理は、共有メモリ領域180に格納されたデータの送信だけでなく、そのデータを用いた演算とその演算結果の送信など、他の処理であっても良い。また、データ取得要求メッセージが、コネクション確立要求メッセージの代わりに用いられても良い。周期型要求メッセージにおいて、コネクション確立要求メッセージが、データ取得要求メッセージの代わりに用いられても良い。   The process requested by the request message from the other node is not only the transmission of the data stored in the shared memory area 180, but also other processes such as the calculation using the data and the transmission of the calculation result. good. A data acquisition request message may be used instead of the connection establishment request message. In the periodic request message, a connection establishment request message may be used instead of the data acquisition request message.

以上に説明したように、要求先のアプリケーション170が共有メモリ領域180内のデータを更新するタイミングと、データ取得要求メッセージを受信するタイミングとの順序が異なる場合に、要求元へエラーを送信することにより、要求元が誤ったデータを用いることを防ぐことができる。また、要求元は、或るアプリケーション実行周期内に要求したデータをその周期内に取得できると共に、取得されたデータがその周期内に更新されたデータであることを保証することができる。   As described above, an error is transmitted to the request source when the timing at which the request destination application 170 updates the data in the shared memory area 180 and the timing at which the data acquisition request message is received are different. Therefore, it is possible to prevent the request source from using incorrect data. Further, the request source can acquire the requested data within a certain application execution cycle within the cycle, and can ensure that the acquired data is the data updated within the cycle.

本発明の表現のための用語について説明する。制御装置として、ノード100b等が用いられても良い。他制御装置として、ノード100a等が用いられても良い。アプリケーション実行周期として、アプリケーション実行周期171等が用いられても良い。記憶部として、記憶部111等が用いられても良い。処理部として、処理部112等が用いられても良い。処理情報として、設定ファイル120等が用いられても良い。通信情報として、応答送信管理テーブル130及び要求送信管理テーブル140等が用いられても良い。通信及び第2通信として、コネクション等が用いられても良い。処理として、共有メモリ領域180に格納されたデータを取得する処理等が用いられても良い。判定情報として、コネクション確立応答メッセージ等が用いられても良い。通信要求メッセージ及び第2通信要求メッセージとして、コネクション確立要求メッセージ等が用いられても良い。処理要求メッセージ及び第2処理要求メッセージとして、データ取得要求メッセージ等が用いられても良い。処理応答メッセージとして、データ取得応答メッセージ等が用いられても良い。受信時間として、単位時間やアプリケーション実行周期等が用いられても良い。上限受信数として、上限受信パケットレート等が用いられても良い。受信数として、データ取得要求メッセージ数等が用いられても良い。上限応答処理数として、要求メッセージ処理レート等が用いられても良い。上限格納数として、バッファあふれ防止レート等が用いられても良い。動作期間として、アプリケーション実行期間等が用いられても良い。動作期間以外の期間として、アプリケーション待機時間等が用いられても良い。動作時間として、アプリケーション実行時間172等が用いられても良い。応答処理時間として、処理時間等が用いられても良い。要求送信周期及び第2要求送信周期として、要求送信周期142等が用いられても良い。応答送信周期として、応答送信周期134等が用いられても良い。   Terms for the expression of the present invention will be described. The node 100b or the like may be used as the control device. As another control device, the node 100a or the like may be used. As the application execution cycle, an application execution cycle 171 or the like may be used. The storage unit 111 or the like may be used as the storage unit. The processing unit 112 or the like may be used as the processing unit. As the processing information, the setting file 120 or the like may be used. As the communication information, the response transmission management table 130, the request transmission management table 140, etc. may be used. A connection or the like may be used as the communication and the second communication. As the process, a process for obtaining data stored in the shared memory area 180 may be used. A connection establishment response message or the like may be used as the determination information. A connection establishment request message or the like may be used as the communication request message and the second communication request message. A data acquisition request message or the like may be used as the processing request message and the second processing request message. A data acquisition response message or the like may be used as the processing response message. As the reception time, a unit time, an application execution cycle, or the like may be used. The upper limit reception packet rate or the like may be used as the upper limit reception number. As the number of receptions, the number of data acquisition request messages may be used. A request message processing rate or the like may be used as the upper limit response processing number. A buffer overflow prevention rate or the like may be used as the upper limit storage number. An application execution period or the like may be used as the operation period. An application waiting time or the like may be used as a period other than the operation period. An application execution time 172 or the like may be used as the operation time. A processing time or the like may be used as the response processing time. The request transmission cycle 142 or the like may be used as the request transmission cycle and the second request transmission cycle. The response transmission cycle 134 or the like may be used as the response transmission cycle.

以上、実施形態を具体的に説明したが、上記開示に限定されるものでなく、その趣旨を逸脱しない範囲において種々変更可能であることは言うまでもない。   The embodiment has been specifically described above, but the present invention is not limited to the above disclosure, and it goes without saying that various modifications can be made without departing from the spirit of the embodiment.

100…ノード 111…記憶部 112…処理部 113…通信インタフェース 114…ネットワーク 120…設定ファイル 130…応答送信管理テーブル 140…要求送信管理テーブル 150…OS 160…通信ミドルウェア 170…アプリケーション 180…共有メモリ領域
DESCRIPTION OF SYMBOLS 100 ... Node 111 ... Memory | storage part 112 ... Processing part 113 ... Communication interface 114 ... Network 120 ... Setting file 130 ... Response transmission management table 140 ... Request transmission management table 150 ... OS 160 ... Communication middleware 170 ... Application 180 ... Shared memory area

Claims (7)

予め定められたアプリケーション実行周期を示す処理情報と、ネットワークを介して接続された他制御装置との通信の計画を示す通信情報とを記憶する記憶部と、
前記アプリケーション実行周期毎に前記アプリケーションを実行し、処理の要求である処理要求メッセージを前記他制御装置から受信した場合に前記処理を実行し前記処理の結果を含む処理応答メッセージを前記他制御装置へ送信する応答処理を実行する処理部と、
を備え、
前記処理部は、
予め定められた前記アプリケーション実行周期である応答時間内に前記応答処理を完了することを通信条件とし、前記他制御装置からの前記通信の要求を受信した場合、前記処理情報及び前記通信情報に基づいて、前記通信が前記通信条件を満たすか否かを判定し、前記判定の結果を示す判定情報を前記他制御装置へ送信し、
前記通信の要求である通信要求メッセージを前記他制御装置から受信した場合、前記通信が前記通信条件を満たすか否かを判定し、
前記通信が前記通信条件を満たすために、予め定められた前記アプリケーション実行周期である受信時間内に受信可能な処理要求メッセージの数である上限受信数を算出し、
前記通信要求メッセージを前記他制御装置から受信した場合、前記通信情報に基づいて、前記受信時間内に受信される予定の処理要求メッセージの数である受信数を算出し、前記受信数が前記上限受信数以下であることを前記通信条件とし、
前記処理情報は更に、前記アプリケーション実行周期内の前記アプリケーションの動作期間の長さである動作時間と、前記応答処理の時間の長さである応答処理時間とを含み、
前記処理部は、前記アプリケーション実行周期内で前記動作期間以外の期間に実行可能な応答処理の数である上限応答処理数を算出し、前記上限応答処理数に基づいて上限受信数を決定する、
制御装置。
A storage unit for storing processing information indicating a predetermined application execution cycle and communication information indicating a plan of communication with another control apparatus connected via a network;
The application is executed at each application execution cycle, and a processing response message including a result of the processing is executed to the other control device when the processing request message which is a processing request is received from the other control device. A processing unit for executing a response process to be transmitted;
With
The processor is
Based on the processing information and the communication information when the communication processing is received from the other control device, and the response processing is completed within a response time that is a predetermined application execution cycle. Determining whether or not the communication satisfies the communication condition, and transmitting determination information indicating the result of the determination to the other control device ,
When a communication request message that is a request for the communication is received from the other control device, it is determined whether the communication satisfies the communication condition,
In order for the communication to satisfy the communication condition, an upper limit reception number that is the number of processing request messages that can be received within a reception time that is a predetermined application execution cycle is calculated,
When the communication request message is received from the other control device, a reception number that is the number of processing request messages scheduled to be received within the reception time is calculated based on the communication information, and the reception number is the upper limit The communication condition must be less than the number of receptions,
The processing information further includes an operation time that is the length of the operation period of the application within the application execution cycle, and a response processing time that is the length of the response processing time,
The processing unit calculates an upper limit response process number that is the number of response processes that can be executed in a period other than the operation period within the application execution cycle, and determines an upper limit reception number based on the upper limit response process number.
Control device.
前記処理情報は更に、前記動作期間中に受信して格納することが可能な処理要求メッセージの数である上限格納数を含み、
前記処理部は、前記上限格納数に基づいて上限受信数を決定する、
請求項に記載の制御装置。
The processing information further includes an upper limit storage number that is the number of processing request messages that can be received and stored during the operation period,
The processing unit determines an upper limit reception number based on the upper limit storage number.
The control device according to claim 1 .
前記処理部は、前記上限応答処理数及び前記上限格納数のうち小さい方を前記上限受信数として決定する、
請求項に記載の制御装置。
The processing unit determines the smaller of the upper limit response processing number and the upper limit storage number as the upper limit reception number,
The control device according to claim 2 .
前記通信が前記通信条件を満たすと判定された場合、前記処理部は、処理要求メッセージの送信周期である要求送信周期を示す情報を、前記他制御装置へ送信し、
前記処理要求メッセージは、前記要求送信周期毎に、前記他制御装置から送信される、
請求項に記載の制御装置。
When it is determined that the communication satisfies the communication condition, the processing unit transmits information indicating a request transmission cycle, which is a transmission cycle of a processing request message, to the other control device,
The processing request message is transmitted from the other control device for each request transmission cycle.
The control device according to claim 3 .
前記処理部は、前記処理要求メッセージを受信した時刻から、前記処理を完了した時刻までの処理時間を計測し、前記処理時間が前記動作時間より長いか否かを判定し、前記処理時間が前記動作時間より長いと判定された場合、前記他制御装置へエラーを示す応答を送信する、
請求項に記載の制御装置。
The processing unit measures a processing time from a time at which the processing request message is received to a time at which the processing is completed, determines whether the processing time is longer than the operation time, and the processing time When it is determined that the operation time is longer, a response indicating an error is transmitted to the other control device.
The control device according to claim 4 .
前記処理部は、第2通信を要求する第2通信要求メッセージを前記他制御装置へ送信し、前記他制御装置により前記第2通信が前記通信条件を満たすと判定され、第2要求送信周期を示す情報を前記他制御装置から受信した場合、前記第2要求送信周期毎に、前記第2処理要求メッセージを前記他制御装置へ送信する、
請求項に記載の制御装置。
The processing unit transmits a second communication request message requesting second communication to the other control device, and the second control device determines that the second communication satisfies the communication condition, and sets a second request transmission cycle. When receiving the information indicating from the other control device, the second processing request message is transmitted to the other control device every second request transmission cycle.
The control device according to claim 1 .
前記通信が前記通信条件を満たすと判定され、且つ前記他制御装置から応答送信周期を示す情報を受信した場合、前記処理部は、前記応答送信周期毎に、前記処理を実行し前記処理の結果を示す処理応答メッセージを前記他制御装置へ送信する、
請求項1に記載の制御装置。
When it is determined that the communication satisfies the communication condition and information indicating a response transmission period is received from the other control device, the processing unit executes the process for each response transmission period, and the result of the process A processing response message indicating
The control device according to claim 1.
JP2014110402A 2014-05-28 2014-05-28 Control device Active JP6247597B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014110402A JP6247597B2 (en) 2014-05-28 2014-05-28 Control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014110402A JP6247597B2 (en) 2014-05-28 2014-05-28 Control device

Publications (2)

Publication Number Publication Date
JP2015226215A JP2015226215A (en) 2015-12-14
JP6247597B2 true JP6247597B2 (en) 2017-12-13

Family

ID=54842699

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014110402A Active JP6247597B2 (en) 2014-05-28 2014-05-28 Control device

Country Status (1)

Country Link
JP (1) JP6247597B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2967999B2 (en) * 1989-07-06 1999-10-25 富士通株式会社 Process execution multiplicity control processor
JP4298679B2 (en) * 2005-05-27 2009-07-22 株式会社ソニー・コンピュータエンタテインメント Information processing method, information processing apparatus, and server

Also Published As

Publication number Publication date
JP2015226215A (en) 2015-12-14

Similar Documents

Publication Publication Date Title
JP6378057B2 (en) Connection control device, connection control method, connection control system, and computer program
Govindan et al. End-to-end service assurance in IoT MQTT-SN
JP7142641B2 (en) Distributed transaction management in network service layer
US10700964B1 (en) Centralized application-layer routing at the edge of an online application service provider network
AU2013315239A1 (en) Data stream division to increase data transmission rates
US10200287B2 (en) Network resource processing apparatus, method, and system
US10802896B2 (en) Rest gateway for messaging
US20170251428A1 (en) Methods and Nodes for M2M Communication
Li et al. Mobility prediction based opportunistic computational offloading for mobile device cloud
US20140244728A1 (en) Controller, method for controlling, and computer-readable recording medium having stored therein control program
JP6247597B2 (en) Control device
JPWO2014061314A1 (en) Content distribution method
JP2013206112A (en) Computer system and sub-system management method
US8495216B2 (en) Communication control system, communication control method and computer-readable storage medium
JP6290055B2 (en) COMMUNICATION DEVICE, COMMUNICATION CONTROL METHOD, AND COMPUTER PROGRAM
CN111064618B (en) Method, device, equipment and storage medium for realizing high availability of server
JP2013143732A (en) Communication terminal device
US10778585B1 (en) Connection and application state migration for uninterrupted service availability
US10263795B2 (en) System and method for reducing the energy consumption of an interconnection device
WO2018025491A1 (en) Control network system and node device thereof
JP2014233054A (en) Radio system, radio base station and radio terminal
US20170222879A1 (en) Service optimization method, transport controller, client controller, and system
JP6233141B2 (en) Database system, database server, database server program, database client, and database client program
US11777821B2 (en) Systems and methods for performance-aware controller node selection in high availability containerized environment
JP2014068126A (en) Communication apparatus and communication method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161129

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170810

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170926

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171010

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171117

R150 Certificate of patent or registration of utility model

Ref document number: 6247597

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150