JP4920567B2 - Equipment network system and data access control method - Google Patents

Equipment network system and data access control method Download PDF

Info

Publication number
JP4920567B2
JP4920567B2 JP2007321085A JP2007321085A JP4920567B2 JP 4920567 B2 JP4920567 B2 JP 4920567B2 JP 2007321085 A JP2007321085 A JP 2007321085A JP 2007321085 A JP2007321085 A JP 2007321085A JP 4920567 B2 JP4920567 B2 JP 4920567B2
Authority
JP
Japan
Prior art keywords
data
access
management
log
unit
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
JP2007321085A
Other languages
Japanese (ja)
Other versions
JP2009146051A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2007321085A priority Critical patent/JP4920567B2/en
Publication of JP2009146051A publication Critical patent/JP2009146051A/en
Application granted granted Critical
Publication of JP4920567B2 publication Critical patent/JP4920567B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、設備機器の動作を管理する設備管理装置有する設備機器ネットワークシステム、および、設備管理装置のデータアクセス制御方に関するものである。 The present invention is equipment network system having a facility management apparatus for managing the operation of the equipment, and to a data access control how the equipment management device.

従来、『データの処理を通信系で結合された各システム内で原本及びコピーに対して個別に行う場合におけるデータの不一致及び参照更新衝突の発生を防止する。』ことを目的とした技術として、『アプリケーション実行部16で実行されるクライアント1上のアプリケーションからの更新要求をクライアントスプール13に一時保存する。クライアント1とサーバ2との接続を待って、サーバスプール23に、アプリケーションからの更新要求を転送保存する。サーバ制御部21は、更新要求に他の参照要求と衝突がないかを調べる。衝突がない場合には、原本格納部22のデータ原本及びキャッシュ12内のデータを要求にしたがって更新する。衝突があった場合には、データ更新を行わない。そして、衝突の有無を参照要求者へ通知し、更新要求者に対して更新結果を通知する。』というものが提案されている(特許文献1)。   Conventionally, “a data mismatch and a reference update collision are prevented when data processing is individually performed on an original and a copy in each system coupled by a communication system. As a technique for the purpose, “the update request from the application on the client 1 executed by the application execution unit 16 is temporarily stored in the client spool 13. Waiting for the connection between the client 1 and the server 2, the update request from the application is transferred and stored in the server spool 23. The server control unit 21 checks whether the update request has a collision with another reference request. When there is no collision, the data original in the original storage unit 22 and the data in the cache 12 are updated according to the request. If there is a collision, the data is not updated. Then, the presence or absence of a collision is notified to the reference requester, and the update result is notified to the update requester. Is proposed (Patent Document 1).

また、『障害時のデータを採取して障害原因を解析し、障害を早期に復旧させる』ことを目的とした技術として、プログラムの実行所用時間と処理完了状態とを一定時間毎にチェックし,各プログラムが所定時間内に終了していない場合あるいは実行終了時に全処理が完了していない場合に異常と判定し、その時点で主メモリの内容を保存することによって障害原因の解析に必要な情報を得るソフトウェア障害検出方法が提案されている(特許文献2)。   In addition, as a technology aimed at “collecting data at the time of failure, analyzing the cause of failure, and recovering from failure early”, the execution time of the program and the processing completion status are checked at regular intervals, Information necessary for analyzing the cause of failure by determining that there is an error if each program has not finished within the prescribed time or if all processing has not been completed at the end of execution, and saving the contents of the main memory at that time A software fault detection method has been proposed (Patent Document 2).

特開平10−133928号公報(要約)JP-A-10-133828 (summary) 特開平2−207347号公報JP-A-2-207347

設備機器の動作を管理する設備管理装置上では、記憶部が格納するデータに対する読み取りまたは書き込みを要求する複数の制御プロセスが、非同期に実行される場合がある。
このような非同期のデータアクセスは、設備機器に対する管理命令や状態取得命令などを行うアプリケーションの処理が、設備管理装置上で個別に実行されることが一因となっている。
On the equipment management device that manages the operation of the equipment, a plurality of control processes that request reading or writing of data stored in the storage unit may be executed asynchronously.
One of the reasons for such asynchronous data access is that processing of an application that performs a management command, a status acquisition command, or the like for the equipment is individually executed on the equipment management device.

複数の制御プロセスが個別にデータに対する読み取りまたは書き込みを要求すると、そのタイミングによってはデータアクセスが競合し、アクセスしたデータが破壊されてしまう可能性がある。
しかし、このようなデータアクセスの競合に起因する不具合は、設備管理装置出荷前の試験で明らかになる場合もあるが、出荷前の試験ではそのような問題を発見することができず、出荷後に設置現場で運用を開始した後に発生することもある。
When a plurality of control processes individually request reading or writing of data, data access may compete depending on the timing, and the accessed data may be destroyed.
However, such troubles due to data access conflicts may become apparent in a test before shipping the equipment management device, but such a problem cannot be found in the test before shipping. It may occur after starting operation at the installation site.

従来の設備管理装置では、上述のようなデータアクセスの競合に起因する不具合の原因を開発者が簡単にトレースできるような仕組みがなく、そのため、不具合発生時の原因解析に多大な工数が必要となるという課題があった。   In the conventional equipment management device, there is no mechanism that allows the developer to easily trace the cause of the failure caused by the data access conflict as described above, and therefore, a large amount of man-hour is required for the cause analysis when the failure occurs. There was a problem of becoming.

本発明は、上記のような課題を解決するためになされたものであり、データアクセスの競合に起因する不具合を低減し、通信トラフィックを緩和して安定動作が可能な設備機器ネットワークシステムおよびデータアクセス制御方法を提供することを目的とする。 The present invention has been made in order to solve the above-described problems, and reduces the problems caused by data access competition, eases communication traffic, and enables stable operation and equipment network system and data access. An object is to provide a control method .

本発明に係る設備機器ネットワークシステムは、設備機器と、当該設備機器の動作を制御する制御部、前記制御部が使用するデータを格納する記憶部、前記記憶部が格納しているデータにアクセスするとともにそのデータの使用状態フラグを管理するデータアクセス部、及び、前記設備機器に対する管理命令の送信またはその応答の受信を行う通信部を有する設備管理装置と、を備え、前記記憶部は、前記設備機器の管理データおよびその管理データの使用間隔を定義した間隔管理テーブルを格納し、前記制御部は、前記記憶部が格納する管理データに対する読み取りまたは書き込みを要求する複数の制御プロセスを非同期に実行し、前記間隔管理テーブルは、前記制御プロセス毎に前記使用間隔を保持し、前記制御部は、前記間隔管理テーブルに定義され、同一の前記管理データを参照する複数の制御プロセスに対応する前記使用間隔を、前記データアクセス部を介して参照し、当該使用間隔の最大公約数を算出し、前記複数の制御プロセスがそれぞれ対応する前記使用間隔によって前記管理命令を送信する単位時間あたりの通信回数と、前記最大公約数を使用間隔として前記複数の制御プロセスが共通に当該使用間隔によって前記管理命令を送信する単位時間あたりの通信回数とを比較して、小さい方の前記通信回数に対応する使用間隔を新たな使用間隔とし、前記制御プロセスは、前記新たな使用間隔で前記通信部を介して前記設備機器に対する前記管理命令の送信を行い、その管理命令に対する前記設備機器からの応答に基づき前記記憶部に前記データアクセス部を介してその設備機器の管理データを格納し、前記データアクセス部は、前記制御プロセスからの前記管理データ読取要求または書込要求を受け付け、当該管理データの使用状態フラグが使用不可状態であれば、当該管理データにアクセスできない旨を当該制御プロセスに返却し、当該管理データの使用状態フラグが使用可能状態であれば、使用状態フラグを使用不可状態にセットしてその管理データにアクセスし、当該管理データの読み取りまたは書き込みが終了すると、当該管理データの使用状態フラグを使用可能状態にセットして、当該管理データの読み取りまたは書き込みの結果を当該制御プロセスに返却するものである。
The equipment network system according to the present invention accesses equipment, a control unit that controls the operation of the equipment, a storage unit that stores data used by the control unit, and data stored in the storage unit. And a data access unit that manages a use state flag of the data, and a facility management device that includes a communication unit that transmits a management command to the facility device or receives a response thereof, and the storage unit includes the facility The device management data and an interval management table that defines the usage interval of the management data are stored, and the control unit asynchronously executes a plurality of control processes that request reading or writing of the management data stored in the storage unit. the interval management table holds the used intervals for each of the control process, the control unit, the interval management tape Is defined in Le, the use interval corresponding to a plurality of control processes to refer to the same of the management data, reference via the data access unit, calculates the greatest common divisor of the used intervals, said plurality of control The number of communication per unit time at which the process transmits the management command according to the corresponding usage interval, and the unit at which the plurality of control processes commonly transmit the management command at the usage interval with the greatest common divisor as the usage interval Compared with the number of communications per hour, the usage interval corresponding to the smaller number of communications is set as a new usage interval, and the control process is performed on the equipment via the communication unit at the new usage interval . It performs transmission of the management instructions via the data access unit in the storage unit based on the response from the equipment for the management instructions Storing the management data of the equipment, the data access unit receives a read request or write request of the management data from the control process, if the use state flag disabled state of the management data, the inaccessible fact to manage data returned to the control process, if the use state flag is usable state of the management data, accesses the management data by setting the use state flag to a disabled state, the management data When the reading or writing of the management data is completed, the use status flag of the management data is set to a usable state, and the result of the reading or writing of the management data is returned to the control process.

本発明に係る設備機器ネットワークシステムによれば、使用状態フラグを用いてデータアクセスを制御することにより、複数の制御プロセスが同一のデータに対して同時に読み取りまたは書き込みを行うことがなくなるので、データアクセスの競合に起因する不具合を低減することができる。 According to the equipment network system according to the present invention, the data access is controlled by using the use state flag so that a plurality of control processes do not read or write the same data at the same time. Can be reduced.

実施の形態1.
図1は、本発明の実施の形態1に係る設備機器ネットワークシステムの構成図である。
図1において、100は設備管理装置、200aは照明器、200bは空調機、300は監視装置、400はネットワークである。
設備管理装置100は、照明器200aと空調機200bの動作を管理する。以後、照明器200aと空調機200bを総称するときは、設備機器200とする。
監視装置300は、ネットワーク400を介して設備管理装置100に接続され、設備機器200に対する管理命令の発行を、設備管理装置100に依頼する。設備管理装置100は、その依頼を受けて設備機器200に管理命令を発行し、その結果を監視装置300に送信する。
ネットワーク400は、例えばLAN(Local Area Network)などの通信ネットワークである。
Embodiment 1 FIG.
FIG. 1 is a configuration diagram of a facility equipment network system according to Embodiment 1 of the present invention.
In FIG. 1, 100 is an equipment management device, 200a is an illuminator, 200b is an air conditioner, 300 is a monitoring device, and 400 is a network.
The facility management apparatus 100 manages the operations of the illuminator 200a and the air conditioner 200b. Hereinafter, the illuminator 200a and the air conditioner 200b are collectively referred to as the equipment 200.
The monitoring apparatus 300 is connected to the facility management apparatus 100 via the network 400 and requests the facility management apparatus 100 to issue a management command for the facility apparatus 200. In response to the request, the facility management device 100 issues a management command to the facility device 200 and transmits the result to the monitoring device 300.
The network 400 is a communication network such as a LAN (Local Area Network).

設備管理装置100は、通信部110、制御部120、データアクセス部130、記憶部140を備える。   The facility management apparatus 100 includes a communication unit 110, a control unit 120, a data access unit 130, and a storage unit 140.

通信部110は、設備機器200と接続可能なインターフェースを備え、制御部120の指示に基づき、設備機器200に対して管理命令を発行する。ここでいう管理命令とは、例えば動作指示命令や、機器状態を取得する命令のことである。
また、通信部110は、ネットワーク300と接続可能なインターフェースも備え、監視装置300との間で通信を行う。
これら2つのインターフェースを個別に構成してもよい。
The communication unit 110 includes an interface that can be connected to the facility device 200, and issues a management command to the facility device 200 based on an instruction from the control unit 120. The management command here is, for example, an operation instruction command or a command for acquiring a device state.
The communication unit 110 also includes an interface that can be connected to the network 300, and performs communication with the monitoring apparatus 300.
These two interfaces may be configured individually.

制御部120は、設備管理装置100の全体動作を制御するものであり、後述の図2で説明する複数の制御プロセスを非同期で並列的に実行する。
ここでいう制御プロセスとは、制御部120の動作を規定するプログラム等の機能要素のことであり、制御部120の配下で実行される。この制御プロセスは、記憶部140が格納しているデータに対するアクセスを、データアクセス部130に要求する。
The control unit 120 controls the overall operation of the facility management apparatus 100, and asynchronously executes a plurality of control processes described later with reference to FIG.
The control process here is a functional element such as a program that regulates the operation of the control unit 120, and is executed under the control of the control unit 120. This control process requests the data access unit 130 to access the data stored in the storage unit 140.

データアクセス部130は、制御部120が実行する制御プロセスからのデータ読取要求またはデータ書込要求を受け付け、既定のデータ粒度(データ管理単位)毎にアクセス制御を行ってアクセス競合が生じないように管理しながら、記憶部140が格納しているデータにアクセスする。アクセス制御の詳細は、後述の図2〜図4で説明する。
データアクセス部130が、記憶部140に格納されているデータを読み取り、または書き込んだ結果は、データ読取要求またはデータ書込要求を発行した制御プロセスに返される。
The data access unit 130 receives a data read request or a data write request from a control process executed by the control unit 120 and performs access control for each predetermined data granularity (data management unit) so that access conflict does not occur. While managing, the data stored in the storage unit 140 is accessed. Details of the access control will be described with reference to FIGS.
The result of the data access unit 130 reading or writing the data stored in the storage unit 140 is returned to the control process that issued the data read request or data write request.

記憶部140は、制御部120が実行する制御プロセスが、データアクセス部130を介して読み取り、または書き込みを行う管理データを格納している。ここでいう管理データとは、設備機器200の動作状態などを表すデータのことである。
例えば、空調機200bの現時点での設定温度が記憶部140に格納されており、制御プロセスは、この値を読み取ることで、空調機200bの設定温度を取得することができる。
制御プロセスは、空調機200bの設定温度を変更するときは、通信部110を介して設定温度を変更すべき旨の管理命令を発行し、その結果を受信して、更新後の設定温度の値を記憶部140に書き込む。
The storage unit 140 stores management data that is read or written by the control process executed by the control unit 120 via the data access unit 130. The management data here is data representing the operating state of the equipment device 200.
For example, the current set temperature of the air conditioner 200b is stored in the storage unit 140, and the control process can acquire the set temperature of the air conditioner 200b by reading this value.
When the control process changes the set temperature of the air conditioner 200b, the control process issues a management instruction to change the set temperature via the communication unit 110, receives the result, and updates the set temperature value Is written in the storage unit 140.

制御部120とデータアクセス部130は、これらの機能を実現する回路デバイスのようなハードウェアで実現することもできるし、CPUやマイコンのような演算装置とその動作を規定する制御プログラムで実現することもできる。
ハードウェアで構成した場合、先に述べた制御プロセスとは、ハードウェアの機能で実現される制御動作のことを指す。演算装置とソフトウェアで実現した場合、先に述べた制御プロセスとは、演算装置上で実行される制御プログラムの制御動作のことを指す。
制御部120とデータアクセス部130は、図1に示すように分離して構成してもよいし、両者を一体的に構成してもよい。
The control unit 120 and the data access unit 130 can be realized by hardware such as a circuit device that realizes these functions, or by an arithmetic device such as a CPU or a microcomputer and a control program that defines its operation. You can also
When configured by hardware, the control process described above refers to a control operation realized by a function of hardware. When implemented by an arithmetic device and software, the control process described above refers to a control operation of a control program executed on the arithmetic device.
The control unit 120 and the data access unit 130 may be configured separately as illustrated in FIG. 1 or may be configured integrally.

なお、図1に示す構成では、通信部110と設備機器200を直接接続しているが、設備機器200がネットワーク400とのインターフェースを備えるのであれば、ネットワーク400を介して設備管理装置100と設備機器200を接続してもよい。
いずれの構成を採用するかは、各機器のインターフェース仕様に準じて適宜定める。
In the configuration illustrated in FIG. 1, the communication unit 110 and the facility device 200 are directly connected. However, if the facility device 200 includes an interface with the network 400, the facility management apparatus 100 and the facility device are connected via the network 400. The device 200 may be connected.
Which configuration is adopted is appropriately determined according to the interface specifications of each device.

以上、図1の設備機器ネットワークを構成する各機器と、設備管理装置100の構成、および設備機器200に対する管理命令の発行に係る概略動作について説明した。
次に、設備管理装置100上で実行される制御プロセスのデータアクセス制御について説明する。
Heretofore, the general operations relating to each device configuring the equipment device network of FIG.
Next, data access control of a control process executed on the facility management apparatus 100 will be described.

図2は、データアクセスの競合により、記憶部140が格納しているデータに不具合が発生する例を説明するものである。ここでは、制御部120が2つの制御プロセス120Aおよび120Bを非同期に並列実行しているものとする。
制御プロセス120Aは、記憶部140が格納しているある管理データの値に30を加算して更新しようとしている。
制御プロセス120Bは、制御プロセス120Aが更新しようとしている同じ管理データの値から60を減算して更新しようとしている。
以下、図2に示す各制御プロセスの処理ステップについて説明する。
FIG. 2 illustrates an example in which a failure occurs in data stored in the storage unit 140 due to a data access conflict. Here, it is assumed that the control unit 120 asynchronously executes the two control processes 120A and 120B in parallel.
The control process 120A intends to add 30 to the value of certain management data stored in the storage unit 140 and update it.
The control process 120B is going to update by subtracting 60 from the same management data value that the control process 120A is trying to update.
Hereinafter, processing steps of each control process shown in FIG. 2 will be described.

(0)記憶部140が格納している管理データは、初期値として「100」がセットされている。
(1)制御プロセス120Aは、管理データの初期値「100」を取得する。
(2)制御プロセス120Bは、管理データの初期値「100」を取得する。
(3)制御プロセス120Aは、取得した管理データの値に30を加算する。
(4)制御プロセス120Bは、取得した管理データの値から60を減算する。
(0) The management data stored in the storage unit 140 is set to “100” as an initial value.
(1) The control process 120A acquires the initial value “100” of the management data.
(2) The control process 120B acquires the initial value “100” of the management data.
(3) The control process 120A adds 30 to the acquired management data value.
(4) The control process 120B subtracts 60 from the acquired management data value.

(5)制御プロセス120Aは、加算後の値「130」を記憶部140に書き込む。
(6)記憶部140には、加算後の値「130」が格納される。
(7)制御プロセス120Bは、減算後の値「40」を記憶部140に書き込む。
(8)記憶部140には、減算後の値「40」が格納される。
(5) The control process 120 </ b> A writes the added value “130” in the storage unit 140.
(6) The storage unit 140 stores the added value “130”.
(7) The control process 120B writes the value “40” after subtraction into the storage unit 140.
(8) The subtraction value “40” is stored in the storage unit 140.

本来であれば、初期値「100」に30を加算して60を減算すると、記憶部140に格納される最終的な値は「70」になるはずであるが、制御プロセス120Aと120Bがそれぞれ独自に値を更新すると、図2のように不整合が生じることになる。
特に、設備管理装置100では、管理対象の設備機器ごとに、管理データの参照周期や更新周期が異なる場合があり、同一の管理データに対して図2のような非同期更新が生じやすい。
そこで、本実施の形態1に係る設備管理装置100は、制御プロセスが読み取りまたは書き込みを行う管理データに対するアクセスを、データアクセス部130が一括して管理し、図2のようなアクセス競合による不整合が生じないようにする。
Originally, when 30 is added to the initial value “100” and 60 is subtracted, the final value stored in the storage unit 140 should be “70”, but the control processes 120A and 120B are respectively If the value is updated independently, inconsistency occurs as shown in FIG.
In particular, in the facility management apparatus 100, the management data reference cycle and update cycle may be different for each management target device, and asynchronous updating as shown in FIG. 2 is likely to occur for the same management data.
Therefore, in the facility management apparatus 100 according to the first embodiment, the data access unit 130 collectively manages access to the management data that is read or written by the control process, and inconsistency due to access contention as shown in FIG. Make sure that does not occur.

以上、図2を用いて、設備管理装置100でデータアクセスの競合が生じることによる不具合について説明した。
次に、データアクセス部130の具体的なデータアクセス制御の手法を説明する。
As described above, the malfunction caused by the data access conflict in the facility management apparatus 100 has been described with reference to FIG.
Next, a specific data access control method of the data access unit 130 will be described.

図3は、制御プロセス120Aが、記憶部140に格納されている管理データにアクセスする際の処理フローである。
データアクセス部130は、図3中で説明する使用状態フラグを、記憶部140または図示しないメモリ中に格納して管理しており、同フラグを用いてアクセス制御を行う。
以下、各ステップについて説明する。
FIG. 3 is a processing flow when the control process 120 </ b> A accesses management data stored in the storage unit 140.
The data access unit 130 stores and manages a use state flag described in FIG. 3 in the storage unit 140 or a memory (not shown), and performs access control using the flag.
Hereinafter, each step will be described.

(S300)
制御部120は、制御プロセス120Aを起動する。以下、制御プロセス120Aは制御部120の配下で実行される。制御プロセス120Aは、記憶部140に格納されている管理データにアクセスするものである。
以後のステップで、制御プロセス120Aが実行する処理は、実体的には制御部120が実行するものである。
(S301)
制御プロセス120Aは、データアクセス部130に対して管理データへのアクセス要求を発行する。ここでのアクセス要求は、読み取り要求でも書き込み要求でもよい。
(S300)
The control unit 120 activates the control process 120A. Hereinafter, the control process 120A is executed under the control of the control unit 120. The control process 120 </ b> A accesses management data stored in the storage unit 140.
In the subsequent steps, the processing executed by the control process 120A is actually executed by the control unit 120.
(S301)
The control process 120A issues an access request for management data to the data access unit 130. The access request here may be a read request or a write request.

(S302)
データアクセス部130は、アクセス要求を受けた管理データの使用状態フラグに対するアクセス権の取得を試みる。使用状態フラグは、管理データ毎に設定されている。
本ステップは、使用状態フラグそのもののアクセス競合を防ぐための手続きで、例えば設備管理装置100のOS(Operating System)が有するセマフォなどの機能により、使用状態フラグのアクセス競合を防ぐ。セマフォの機能と、使用状態フラグを用いてアクセス制御を行う理由については、後述の図5で説明する。
(S302)
The data access unit 130 attempts to acquire the access right for the use state flag of the management data that has received the access request. The use state flag is set for each management data.
This step is a procedure for preventing an access conflict of the usage status flag itself, and prevents an access conflict of the usage status flag by a function such as a semaphore included in the OS (Operating System) of the facility management apparatus 100, for example. The reason for performing the access control using the semaphore function and the use state flag will be described later with reference to FIG.

(S303)
使用状態フラグへのアクセス権が取得できた場合はステップS304へ進み、取得できなかった場合はステップS305へ進む。
(S304)
データアクセス部130は、当該管理データの使用状態フラグの値を読み出す。
(S305)
使用状態フラグへのアクセス権が取得できないときは、他の制御プロセスが当該管理データの使用状態フラグへのアクセスを行なっている状態であるため、管理データそのものへのアクセスも不可である状態とみなし、データアクセス部130は、その旨を制御プロセス120Aに返して処理を終了する。
(S303)
If the access right to the use state flag can be acquired, the process proceeds to step S304. If the access right cannot be acquired, the process proceeds to step S305.
(S304)
The data access unit 130 reads the value of the use status flag of the management data.
(S305)
If the access right to the usage status flag cannot be obtained, it means that another control process is accessing the usage status flag of the management data, and therefore it is considered that the management data itself cannot be accessed. The data access unit 130 returns this fact to the control process 120A and ends the process.

(S306)
データアクセス部130は、ステップS304で取得した使用状態フラグの値が負であるか否かを判定する。負であればステップS307へ進み、負でなければステップS310へ進む。
なお、使用状態フラグには、当該管理データが使用可能状態の場合には負値、管理データが使用不可状態の場合には使用している制御プロセスのID(正値)がセットされるものとする。
すなわち、使用状態フラグが正値の場合、当該管理データが現在どのアプリケーションに使用されているのかが、使用状態フラグの値(=制御プロセスのID)によって分かるようになっている。
(S306)
The data access unit 130 determines whether or not the value of the use state flag acquired in step S304 is negative. If negative, the process proceeds to step S307, and if not negative, the process proceeds to step S310.
The usage status flag is set to a negative value when the management data is available, and an ID (positive value) of the control process being used when the management data is unavailable. To do.
In other words, when the use state flag is a positive value, it is possible to know which application is currently using the management data by the value of the use state flag (= ID of the control process).

(S307)
使用状態フラグの値が負の場合は、当該管理データを他の制御プロセスが使用しておらず、制御プロセス120Aが使用可能であることが分かる。
データアクセス部130は、当該管理データに制御プロセス120Aがアクセス中であることを他の制御プロセスが検知できるようにするために、当該管理データの使用状態フラグの値として、制御プロセス120AのID(正値)をセットする。
このようにしておくことで、制御プロセス120Aが当該管理データを使用している最中に他の制御プロセスが同管理データにアクセスしようとした際、使用状態フラグにセットされたIDから、管理データは「制御プロセス120Aによって使用中」であることが検知可能となる。
(S307)
When the value of the use state flag is negative, it is understood that the control data is not used by another control process and the control process 120A can be used.
In order to allow another control process to detect that the control process 120A is accessing the management data, the data access unit 130 uses the ID (of the control process 120A as the value of the use state flag of the management data). Set a positive value.
In this way, when another control process tries to access the management data while the control process 120A is using the management data, the management data is obtained from the ID set in the use state flag. Can be detected as “in use by the control process 120A”.

(S308)
データアクセス部130は、使用状態フラグへのアクセス権を返却する。
使用状態フラグへのアクセスは、即座に他の制御プロセスに解放して他の制御プロセスから管理データの使用状態を確認できるようにする必要があるため、本ステップはステップS307に続いて直ちに実行される。
(S309)
制御プロセス120Aは、当該管理データへのアクセス権を得る。以後、データアクセス部130は、当該管理データにアクセスし、制御プロセス120Aにその結果を返す。
管理データの読み書きは、データアクセス部130が行ってもよいし、制御プロセス120Aが直接行ってもよい。
(S308)
The data access unit 130 returns the access right to the use state flag.
Since access to the use state flag needs to be immediately released to another control process so that the use state of the management data can be confirmed from the other control process, this step is executed immediately following step S307. The
(S309)
The control process 120A obtains an access right to the management data. Thereafter, the data access unit 130 accesses the management data and returns the result to the control process 120A.
Management data can be read and written by the data access unit 130 or directly by the control process 120A.

(S310)
データアクセス部130は、ステップS304で取得した使用状態フラグの値と、制御プロセス120AのIDとを比較する。
両者が一致すれば、制御プロセス120A自身がその管理データを使用中であることが分かるので、ステップS308へ進み、そのまま当該管理データを使い続けることができる。一致しなければステップS311へ進む。
(S310)
The data access unit 130 compares the value of the use state flag acquired in step S304 with the ID of the control process 120A.
If the two match, it can be seen that the control process 120A itself is using the management data, so the process proceeds to step S308, and the management data can be used as it is. If not, the process proceeds to step S311.

(S311)
データアクセス部130は、使用状態フラグへのアクセス権を直ちに返却する。
ステップS308と同様に、使用状態フラグへのアクセスは即座に他の制御プロセスに解放する必要があることによる。
(S312)
使用状態フラグの値と、制御プロセス120AのIDとが一致しないときは、当該管理データは現在の使用状態フラグの値で示されるIDを持つ制御プロセスによって使用中であるため、データアクセス部130は、当該管理データにアクセス不可である旨を制御プロセス120Aに返して処理を終了する。
(S311)
The data access unit 130 immediately returns the access right to the use state flag.
Similar to step S308, access to the usage status flag needs to be immediately released to another control process.
(S312)
When the value of the usage status flag does not match the ID of the control process 120A, the management data is being used by the control process having the ID indicated by the current usage status flag value. Then, the management process 120A is returned to the effect that the management data cannot be accessed, and the process is terminated.

図4は、制御プロセス120Aが、図3の処理フローで管理データへのアクセスを許可された後、記憶部140に格納されている管理データへのアクセスを終了しようとする際の処理フローである。以下、各ステップについて説明する。   FIG. 4 is a processing flow when the control process 120A attempts to end access to the management data stored in the storage unit 140 after the access to the management data is permitted in the processing flow of FIG. . Hereinafter, each step will be described.

(S400)
制御プロセス120Aは、管理データの読み取りまたは書き込みを終了しようとする際に、本処理フローを開始する。
(S401)
制御プロセス120Aは、データアクセス部130に対して管理データへのアクセス権解放を要求する。
(S402)
データアクセス部130は、当該管理データの使用状態フラグへのアクセス権取得を試みる。
本ステップは、ステップS302と同様、使用状態フラグそのもののアクセス競合を防ぐための手続きで、例えばOSが有するセマフォなどの機能により、使用状態フラグのアクセス競合を防ぐのも同様である。
(S400)
The control process 120A starts this processing flow when it finishes reading or writing management data.
(S401)
The control process 120A requests the data access unit 130 to release the access right to the management data.
(S402)
The data access unit 130 tries to acquire the access right to the use state flag of the management data.
Similar to step S302, this step is a procedure for preventing access contention of the usage status flag itself. For example, the access status flag may be prevented from being accessed by a function such as a semaphore included in the OS.

(S403)
使用状態フラグへのアクセス権が取得できた場合はステップS404へ進み、取得できなかった場合はステップS405へ進む。
(S404)
データアクセス部130は、当該管理データの使用状態フラグの値を読み出す。
(S405)
使用状態フラグへのアクセス権が取得できないときは、他の制御プロセスが使用状態フラグへのアクセスを行なって当該管理データへのアクセス可否について調べている状態であるため、管理データのアクセス権解放も不可である状態とみなす。
データアクセス部130は、アクセス権解放失敗(使用状態フラグへのアクセス失敗)の旨を制御プロセス120Aに返して処理を終了する。
(S403)
If the access right to the use state flag can be acquired, the process proceeds to step S404. If the access right cannot be acquired, the process proceeds to step S405.
(S404)
The data access unit 130 reads the value of the use status flag of the management data.
(S405)
When the access right to the usage status flag cannot be obtained, the other control processes are accessing the usage status flag to check whether the management data can be accessed. It is considered to be impossible.
The data access unit 130 returns to the control process 120A that access right release has failed (access to the use state flag has failed), and ends the process.

(S406)
データアクセス部130は、ステップS404で取得した使用状態フラグの値と、制御プロセス120AのIDとを比較する。
両者が一致すればステップS407へ進み、アクセス権を解放する。一致しなければステップS410へ進む。
(S407)
データアクセス部130は、他の制御プロセスからの当該管理データに対するアクセス要求に応えられるように、使用状態フラグを、未使用状態を表す負値にセットする。
(S406)
The data access unit 130 compares the value of the use state flag acquired in step S404 with the ID of the control process 120A.
If they match, the process proceeds to step S407, where the access right is released. If not, the process proceeds to step S410.
(S407)
The data access unit 130 sets the use state flag to a negative value indicating an unused state so that it can respond to an access request for the management data from another control process.

(S408)
データアクセス部130は、使用状態フラグへのアクセス権を返却する。
このようにしておくことで、データアクセス部130は、当該管理データに対する他の制御プロセスからのアクセス要求に応えられるようになる。
(S409)
使用状態フラグの値が制御プロセス120AのIDと一致した場合、制御プロセス120A自身がその管理データを使用中であることが分かるので、そのアクセス権解放が認められ、アクセス権解放成功の旨が制御プロセス120Aに返される。
(S408)
The data access unit 130 returns the access right to the use state flag.
In this way, the data access unit 130 can respond to access requests from other control processes for the management data.
(S409)
When the value of the use state flag matches the ID of the control process 120A, it can be seen that the control process 120A itself is using the management data, so that the access right release is recognized and the success of the access right release is controlled. Returned to process 120A.

(S410)
データアクセス部130は、使用状態フラグへのアクセス権を直ちに返却する。
ステップS308やS408と同様に、使用状態フラグへのアクセスは即座に他の制御プロセスに解放する必要があることによる。
(S411)
制御プロセス120AのIDと使用状態フラグの値が一致しないときは、制御プロセス120Aが当該管理データを使用しているのではないため、アクセス権の解放は許可されない。
データアクセス部130は、アクセス権解放失敗(ID不一致)の旨を制御プロセス120Aに返して処理を終了する。
(S410)
The data access unit 130 immediately returns the access right to the use state flag.
Similar to steps S308 and S408, access to the usage status flag needs to be immediately released to another control process.
(S411)
When the ID of the control process 120A does not match the value of the usage status flag, the control process 120A does not use the management data, and thus release of the access right is not permitted.
The data access unit 130 returns an access right release failure (ID mismatch) to the control process 120A and ends the process.

以上、データアクセス部130が、使用状態フラグを用いて管理データに対するデータアクセス制御を行う手順を説明した。
次に、図3〜図4の説明中で用いているセマフォの機能と、管理データに対する直接的なアクセス制御ではなく使用状態フラグを介してアクセス制御を行うことに関し、以下に補足説明する。
In the foregoing, the procedure in which the data access unit 130 performs data access control on management data using the use state flag has been described.
Next, the semaphore function used in the description of FIGS. 3 to 4 and the access control through the use state flag rather than the direct access control to the management data will be supplementarily described below.

図5は、設備管理装置100が備えるセマフォの機能を説明するものである。
本実施の形態1では、設備管理装置100のOSが備えるセマフォ等の機能を使用して、使用状態フラグのアクセス制御を行う。セマフォ以外の機能を用いて使用状態フラグのアクセス制御を行ってもよい。ここでは1例としてセマフォを取り上げ、その機能を説明する。
なお、図5では、図2と同様に制御プロセス120Aと120Bが存在し、セマフォが管理する使用状態フラグへのアクセス権取得を、図3のS302や図4のS402などで試みているものと仮定する。以下、図5の各ステップについて説明する。
FIG. 5 illustrates the functions of the semaphore provided in the facility management apparatus 100.
In the first embodiment, access control of the use state flag is performed using a function such as a semaphore provided in the OS of the facility management apparatus 100. The access control of the use state flag may be performed using a function other than the semaphore. Here, a semaphore is taken as an example and its function is explained.
In FIG. 5, control processes 120A and 120B exist as in FIG. 2, and access right acquisition to the use state flag managed by the semaphore is attempted in S302 of FIG. 3, S402 of FIG. Assume. Hereinafter, each step of FIG. 5 will be described.

(0)セマフォは、割り当て可能な個数を管理する計数ボックスのような役割を果たす。ここでは、制御プロセス120Aと120Bがアクセス権取得を試みようとしている使用状態フラグの個数を管理する。
初期状態では、いずれの制御プロセスも使用状態フラグのアクセス権を取得していないため、セマフォの初期値は「1」である。
(0) The semaphore plays a role like a counting box that manages the assignable number. Here, the control processes 120A and 120B manage the number of usage status flags that are about to acquire the access right.
In the initial state, since no control process has acquired the access right of the use state flag, the initial value of the semaphore is “1”.

(1)制御プロセス120Aは、使用状態フラグのアクセス権取得を試みる。その旨がセマフォに通知される。
(2)制御プロセス120Aは、使用状態フラグのアクセス権を取得する。
(3)制御プロセス120Aが使用状態フラグのアクセス権を取得することにより、割り当て可能なアクセス権はなくなるので、セマフォの値は「0」に更新される。
(1) The control process 120A tries to acquire the access right of the use state flag. That is notified to the semaphore.
(2) The control process 120A acquires the access right of the use state flag.
(3) Since the control process 120A acquires the access right of the use state flag, there is no access right that can be assigned, so the value of the semaphore is updated to “0”.

(4)制御プロセス120Bは、使用状態フラグのアクセス権取得を試みる。その旨がセマフォに通知される。
(5)セマフォの値が「0」であるため、その使用状態フラグにアクセスすることはできないことが分かる。使用状態フラグにアクセスできない旨が、制御プロセス120Bに返却される。本ステップは、図3のS305や図4のS405に相当する。
(6)制御プロセス120Bは、制御プロセス120Aが使用状態フラグのアクセス権を解放するまで、待機状態となる。もっとも、使用状態フラグのアクセス権は即座に解放されるため、待機時間はわずかである。
(4) The control process 120B tries to acquire the access right of the use state flag. That is notified to the semaphore.
(5) Since the value of the semaphore is “0”, it can be seen that the use state flag cannot be accessed. The fact that the use state flag cannot be accessed is returned to the control process 120B. This step corresponds to S305 in FIG. 3 or S405 in FIG.
(6) The control process 120B enters a standby state until the control process 120A releases the access right of the use state flag. However, since the access right of the use state flag is released immediately, the waiting time is short.

(7)制御プロセス120Aは、使用状態フラグのアクセス権を解放する。
(8)制御プロセス120Aがアクセス権を解放することにより、使用状態フラグのアクセス権を割り当て可能となるので、セマフォの値は「1」に更新される。
(9)制御プロセス120Bは、使用状態フラグのアクセス権取得が可能となる。
(7) The control process 120A releases the access right of the use state flag.
(8) Since the control process 120A releases the access right, the access right of the use state flag can be assigned, so the value of the semaphore is updated to “1”.
(9) The control process 120B can acquire the access right of the use state flag.

以上、セマフォの機能について説明した。
一般にセマフォは、データの読み書きアクセスの瞬間に記憶部140の排他アクセス制御を行うといった、OSレベルもしくはこれに近い階層で行われる処理の排他制御に用いられることが多い。
したがって、セマフォを用いた排他制御は、瞬時的なアクセス制御に比較的向いていると言える。
The function of the semaphore has been described above.
In general, a semaphore is often used for exclusive control of processing performed at the OS level or a hierarchy close thereto, such as exclusive access control of the storage unit 140 at the moment of data read / write access.
Therefore, it can be said that exclusive control using a semaphore is relatively suitable for instantaneous access control.

一方、設備管理装置100のデータアクセス制御においては、OSレベルよりも上位階層の、例えばアプリケーションレベルの排他制御を行いたい場合もある。
ここでいうアプリケーションレベルの排他制御とは、あるアプリケーションが開始してから終了するまでの間や、あるアプリケーション内の特定の処理区間の間、そのアプリケーションが使用するデータを独占使用するような場合に、他のアプリケーションからそのデータに対するアクセスを排除することである。
例えば、ある監視アプリケーションが起動している際は、他のアプリケーションによる同じデータの更新を禁止する、といった場合が考えられる。
On the other hand, in the data access control of the facility management apparatus 100, there is a case where it is desired to perform exclusive control, for example, at the application level higher than the OS level.
Application-level exclusive control here refers to a case where data used by an application is exclusively used from the start to the end of the application or during a specific processing section in an application. To eliminate access to that data from other applications.
For example, when a certain monitoring application is activated, it can be considered that updating of the same data by another application is prohibited.

このような、アプリケーションレベルのアクセス制御を行う場合、その排他制御の基準となる仕組みも、同様にアプリケーションレベルであることが好ましい。
そこで、本実施の形態1に係る設備管理装置100では、使用状態フラグなるアプリケーションレベルのフラグを用いて、データアクセス制御を行うのである。
もっとも、使用状態フラグ自体のアクセス制御も必要であるので、そのアクセス制御には、例えばOSレベルのセマフォを用いることとした。
When such application-level access control is performed, it is preferable that the mechanism serving as a reference for the exclusive control is also the application level.
Therefore, the facility management apparatus 100 according to the first embodiment performs data access control using an application level flag that is a use state flag.
However, since access control of the use state flag itself is also necessary, for example, an OS level semaphore is used for the access control.

なお、上記の説明において、「アプリケーション」と「制御プロセス」は、概ね同義に用いていることを付言しておく。   It should be noted that in the above description, “application” and “control process” are generally used synonymously.

以上の説明では、データへのアクセスとしてデータの読み込み、書き込みの区別なく、双方同様に扱う場合を一例として述べたが、例えば書き込みが発生する場合のみ本実施の形態1で述べた例のように競合を管理し、読み込みのみの場合は複数のアプリケーションから同時に行なえるようにする、などとしてもよい。   In the above description, the case of handling both in the same manner without any distinction between reading and writing of data has been described as an example of access to data. However, for example, only when writing occurs, as in the example described in the first embodiment. It is also possible to manage conflicts so that multiple applications can be executed simultaneously when reading only.

また、ここまでデータへのアクセスの競合を制御することについて述べたが、これをアプリケーションによる制御の競合と置き換えて考えてもよい。
例えば、空調機200bの省エネ制御ではある機器を停止しておきたいが、快適制御では運転しておきたい、といった場合が考えられる。このような場合の競合の管理にも本発明は適用可能である。
Further, although control of contention for access to data has been described so far, this may be replaced with control contention by an application.
For example, there may be a case where it is desired to stop a certain device for energy saving control of the air conditioner 200b but to operate for comfort control. The present invention is also applicable to conflict management in such a case.

以上のように、本実施の形態1では、各制御プロセスがデータへのアクセスの開始および終了に際し、図3〜図4の手続きを踏むようにすることによって、データアクセスの競合を容易に検知することが可能となる。
これにより、ソフトウェア実行時におけるデータアクセスの競合に起因する問題点の抽出が容易となって、不具合解析のための工数を削減し、不具合対応力強化を行なうことができる。
As described above, in the first embodiment, when each control process starts and ends access to data, the procedure shown in FIGS. 3 to 4 is followed to easily detect a data access conflict. Is possible.
This facilitates the extraction of problems caused by data access contention during software execution, reduces the man-hours for failure analysis, and enhances failure response capability.

また、本実施の形態1では、データのアクセス権管理について、OS資源を用いた管理のみではなく、使用状態フラグというアプリケーションレベルの管理単位を持たせたことにより、あるデータに対するアプリケーションからのアクセス権の取得が、読み込みの瞬間、書き込みの瞬間といったOSレベルのプリミティブなもののみではなく、「あるアプリケーション機能を実現している間」等、一定の処理を行なうのに必要となる時間区間連続で可能となる。
このため、機能単位での競合管理が可能となるなど、競合管理の自由度が増し、適用可能範囲が広まるため、ソフトウェア実行時の問題点の抽出がより容易になり、不具合対応力強化に役立つ。
In the first embodiment, not only management using OS resources for data access right management, but also an access right from an application for certain data by having an application level management unit called a usage state flag. Can be acquired not only for OS-level primitives such as the moment of reading and the moment of writing, but also in the time interval necessary for performing certain processing such as “while implementing an application function” It becomes.
This increases the degree of freedom of conflict management, such as enabling conflict management on a functional unit basis, and broadens the applicable range, making it easier to identify problems during software execution and helping to strengthen defect response capabilities. .

実施の形態2.
実施の形態1では、使用状態フラグを用いてデータアクセス制御を行う構成と動作例について説明した。
本発明の実施の形態2では、複数の制御プロセスによるデータアクセスの競合が発生した際に、データアクセス状況のログを生成し、後の不具合解析に役立てるための構成と動作例を説明する。
Embodiment 2. FIG.
In the first embodiment, the configuration and the operation example for performing data access control using the use state flag have been described.
In the second embodiment of the present invention, a configuration and an operation example will be described for generating a data access status log when a data access conflict occurs by a plurality of control processes, which is useful for later failure analysis.

図6は、本実施の形態2に係る設備管理装置100の機能ブロック図である。
本実施の形態2に係る設備管理装置100は、実施の形態1の図1で説明した構成に加えて、新たにログ生成部150を備える。その他の構成は、実施の形態1と同様であるため、説明を省略する。
FIG. 6 is a functional block diagram of the facility management apparatus 100 according to the second embodiment.
The facility management apparatus 100 according to the second embodiment includes a new log generation unit 150 in addition to the configuration described in FIG. 1 of the first embodiment. Since other configurations are the same as those of the first embodiment, description thereof is omitted.

本実施の形態2において、データアクセス部130は、データアクセスの競合が発生すると、そのときのアクセス状況をログ生成部150に通知する。
ログ生成部150は、その通知を受けて、所定の書式に従ってログを生成する。生成したログは、記憶部140に格納してもよいし、図示しないメモリなどに保持しておいてもよい。
In the second embodiment, when a data access conflict occurs, the data access unit 130 notifies the log generation unit 150 of the access status at that time.
In response to the notification, the log generation unit 150 generates a log according to a predetermined format. The generated log may be stored in the storage unit 140 or may be held in a memory (not shown).

ログ生成部150は、その機能を実現する回路デバイスのようなハードウェアで実現することもできるし、CPUやマイコンのような演算装置とその動作を規定する制御プログラムで実現することもできる。
また、制御部120やデータアクセス部130と一体的に構成することもできる。
The log generation unit 150 can be realized by hardware such as a circuit device that realizes the function, or can be realized by an arithmetic device such as a CPU or a microcomputer and a control program that defines its operation.
Further, it can be configured integrally with the control unit 120 and the data access unit 130.

ログ生成部150は、例えば以下の(1)〜(3)のような内容を、既定の内容として保持する。保持先は、記憶部140に格納するものでもよいし、図示しないメモリなどに保持してもよい。また、ログ生成部150を構成する回路デバイスやソフトウェア上に組み込んでもよい。
(1)データアクセスの競合条件、すなわちログ生成を行なうか否かの判定条件
(2)ログへの記録内容
(3)ログの記録形式
The log generation unit 150 holds, for example, the following contents (1) to (3) as default contents. The storage destination may be stored in the storage unit 140 or may be stored in a memory (not shown). Alternatively, the log generation unit 150 may be incorporated on a circuit device or software.
(1) Competition conditions for data access, that is, conditions for determining whether or not to generate a log (2) Contents recorded in a log (3) Log recording format

また、これらの内容を、設備管理装置100の外部から、ユーザが設定できるようにしてもよい。
設定に際しては、例えば通信部110を介して監視装置300の表示画面に適当な選択肢を表示させ、設備管理装置100の動作設定項目としてユーザに提示したり、設定値の入力を同画面上でユーザに促したりして、設定作業によりこれらの内容をユーザに設定させてもよい。
また、設備管理装置100の開発時に、開発者がプログラムでこれらの内容を記述するなどしてもよい。これら以外の方法で自由にユーザが設定できるようにしてもよい。
Moreover, you may enable it for a user to set these contents from the exterior of the equipment management apparatus 100. FIG.
At the time of setting, for example, an appropriate option is displayed on the display screen of the monitoring device 300 via the communication unit 110 and presented to the user as an operation setting item of the equipment management device 100. The user may be prompted to set these contents by setting work.
Further, when the facility management apparatus 100 is developed, the developer may describe these contents in a program. The user may be able to freely set by a method other than these.

さらには、ユーザがこれらの内容を設定する場合は、例えば通信部110を介してその設定内容を制御部120が取得し、制御部120は、その設定内容をログ定義データとして記憶部140や図示しないメモリに格納しておく。
ログ生成部150は、このログ定義データを参照し、ログの生成条件や書式(ログへの記録内容と記録形式)を取得して、これに従いアクセス状況ログを生成する。
Furthermore, when the user sets these contents, for example, the control part 120 acquires the setting contents via the communication unit 110, and the control part 120 stores the setting contents as log definition data in the storage unit 140 or illustrated in FIG. Do not store in memory.
The log generation unit 150 refers to the log definition data, acquires log generation conditions and format (record contents and recording format in the log), and generates an access status log according to the acquired condition.

以上、ログ生成部150の機能について説明した。
次に、データアクセスの競合が発生した際の、ログ生成部150が行う動作について説明する。
The function of the log generation unit 150 has been described above.
Next, an operation performed by the log generation unit 150 when a data access conflict occurs will be described.

ログ生成部150によるログ生成は、制御プロセスによるデータアクセスが競合した場合、すなわち図3のステップS305やS312のように、当該管理データへのアクセスが不可であるとする場合に行うとよい。   The log generation by the log generation unit 150 may be performed when data access by the control process competes, that is, when access to the management data is impossible as in steps S305 and S312 of FIG.

例えば、図3のステップS303において、使用状態フラグに対するアクセス権を取得できなかった場合には、以下の(1)〜(3)のような情報を、ログとして生成しておくと、後の不具合の解析に役立つ。
(1)使用状態フラグへのアクセス競合発生の旨
(2)当該管理データを識別するID
(3)当該管理データにアクセスしようとした制御プロセスのID
For example, in the case where the access right for the use state flag could not be acquired in step S303 in FIG. 3, if information such as the following (1) to (3) is generated as a log, a later problem Useful for analysis.
(1) Access competition to the use state flag has occurred (2) ID for identifying the management data
(3) ID of the control process that tried to access the management data

また、使用状態フラグの値が他の制御プロセスのIDとなっていた場合、すなわち他の制御プロセスによって当該管理データが使用されていた場合には、以下の(1)〜(3)のような情報を、ログとして生成しておくと、後の不具合の解析に役立つ。
(1)データアクセス競合発生の旨
(2)当該管理データを識別するID
(3)当該管理データにアクセスしようとした制御プロセスのID、および当該管理データを使用中の制御プロセスのID(=使用状態フラグの値)
Further, when the value of the use state flag is an ID of another control process, that is, when the management data is used by another control process, the following (1) to (3) If information is generated as a log, it will be useful for later analysis of defects.
(1) Data access conflict occurrence (2) ID for identifying the management data
(3) The ID of the control process that attempted to access the management data, and the ID of the control process that is using the management data (= value of use state flag)

また、図4で説明した、管理データへのアクセスを終了しようとする際の処理フローにおいても、同様にログ生成を行うことができる。
ただし、この場合のログ生成の考え方は、データアクセスの競合というよりはアクセス権解放失敗の記録を残すか否かということを趣旨とする。
当然、データアクセスの開始の場合もデータアクセスの終了の場合も同様であるが、処理に成功した場合や成功と失敗の双方の場合において、ログを生成するようにしても構わない。
Further, the log generation can be performed in the same manner in the processing flow when the access to the management data is to be terminated as described with reference to FIG.
However, the concept of log generation in this case is not to compete for data access but to leave a record of access right release failure.
Of course, the same applies to the case of the start of data access and the case of the end of data access, but a log may be generated in the case of successful processing or in both cases of success and failure.

以上の説明では、実施の形態1で説明した、使用状態フラグによるデータアクセス制御に加えて、ログ生成部150によるアクセス状況ログの生成を行うことで、不具合解析に役立てることを説明したが、アクセス制御を行わずログ生成のみを行う場合でも、一定の効果を発揮することができる。
この場合のアクセス競合の検出は、例えば実施の形態1で説明したような構成と手順で行い、アクセス制御は行わずに競合発生の旨をログ出力しておく、などとすればよい。
特に、不具合の原因が解明されていない時点においては、上述のようにログ生成のみを行っておき、ログの解析により原因がある程度解明された段階で、実施の形態1で説明したようなアクセス競合の回避を行う、などとすることもできる。
In the above description, in addition to the data access control based on the use state flag described in the first embodiment, it has been described that the log generation unit 150 generates an access status log, which is useful for failure analysis. Even when only log generation is performed without performing control, a certain effect can be exhibited.
In this case, access conflict detection may be performed with the configuration and procedure described in the first embodiment, for example, and output of the contention may be output without performing access control.
In particular, when the cause of the failure has not been elucidated, only the log generation is performed as described above, and the access contention described in the first embodiment is performed when the cause is elucidated to some extent by the analysis of the log. Can also be avoided.

以上のように、本実施の形態2によれば、設備管理装置100が設置された現場における実稼動時の複数のソフトウェアモジュールからのデータアクセス要求、および制御要求の競合状態を、ログ記録として容易に得ることができるので、アクセス競合に起因する問題点の抽出が容易となり、不具合解析のための工数を削減し、不具合対応力強化を行なうことができる。   As described above, according to the second embodiment, it is easy to log the data access requests and control request contention states from a plurality of software modules during actual operation at the site where the facility management apparatus 100 is installed. Therefore, it is easy to extract problems caused by access competition, reduce the man-hours for failure analysis, and strengthen the failure response capability.

実施の形態3.
図7は、本発明の実施の形態3に係る設備管理装置100の機能ブロック図である。
本実施の形態3に係る設備管理装置100は、実施の形態2の図6で説明した構成に加え、新たにログ表示部160を備える。その他の構成は図6と同様であるため、説明を省略する。
Embodiment 3 FIG.
FIG. 7 is a functional block diagram of the facility management apparatus 100 according to Embodiment 3 of the present invention.
The facility management apparatus 100 according to the third embodiment is newly provided with a log display unit 160 in addition to the configuration described in FIG. 6 of the second embodiment. Other configurations are the same as those in FIG.

ログ表示部160は、液晶ディスプレイなどの画面表示装置からなり、ログ生成部150が生成したログの情報を利用して、例えば競合の発生したデータや競合する制御プロセスのID等の情報を画面表示する。
ログの取得は、ログ表示部160が自ら行ってもよいし、ログ表示部160は画面表示のみを行い、ログ表示部160の動作指示は制御部120またはログ生成部150が行うようにしてもよい。
ログ表示部160を備えることにより、問題の発生状況を画面表示により簡単に確認することができる。
The log display unit 160 includes a screen display device such as a liquid crystal display. The log display unit 160 uses the log information generated by the log generation unit 150 to display, for example, information such as conflicting data and IDs of competing control processes. To do.
Log acquisition may be performed by the log display unit 160 itself, or the log display unit 160 may perform only screen display, and the operation instruction of the log display unit 160 may be performed by the control unit 120 or the log generation unit 150. Good.
By providing the log display unit 160, it is possible to easily check the occurrence status of the problem by screen display.

実施の形態4.
図8は、本発明の実施の形態4に係る設備管理装置100の機能ブロック図である。
本実施の形態4に係る設備管理装置100は、実施の形態2の図6で説明した構成に加え、新たにログ情報通知部170を備える。その他の構成は図6と同様であるため、説明を省略する。
Embodiment 4 FIG.
FIG. 8 is a functional block diagram of the facility management apparatus 100 according to Embodiment 4 of the present invention.
The facility management apparatus 100 according to the fourth embodiment is newly provided with a log information notification unit 170 in addition to the configuration described in FIG. 6 of the second embodiment. Other configurations are the same as those in FIG.

ログ情報通知部170は、ログ生成部150が生成したログの情報を利用して、例えば競合の発生したデータに関する情報等を、制御部120の配下で実行中の競合する制御プロセス等に通知する。   The log information notifying unit 170 uses the information of the log generated by the log generating unit 150 to notify, for example, information on the data in which conflict has occurred to the competing control process being executed under the control of the control unit 120. .

ログ情報通知部170は、その機能を実現する回路デバイスのようなハードウェアで実現することもできるし、CPUやマイコンのような演算装置とその動作を規定する制御プログラムで実現することもできる。
また、制御部120、データアクセス部130、またはログ生成部150と一体的に構成することもできる。
The log information notification unit 170 can be realized by hardware such as a circuit device that realizes the function, or can be realized by an arithmetic device such as a CPU or a microcomputer and a control program that defines its operation.
Further, the control unit 120, the data access unit 130, or the log generation unit 150 can be configured integrally.

ログ情報通知部170を備えることにより、問題の発生状況を各制御プロセスに直接通知できるので、通知を受けた各制御プロセスは、一定時間待機した後に再度データアクセスを試みるなど、適切な対処を行うことができる。   By providing the log information notifying unit 170, it is possible to directly notify each control process of the occurrence of the problem, so that each control process that has received the notification takes appropriate measures such as trying to access data again after waiting for a certain period of time. be able to.

また、図8に示したような、ログ生成部150が生成したログ情報をログ情報通知部170から制御部120に通知する手法の他、ログ情報を介さず、データアクセス部130が直接、競合情報を元に、該当する制御プロセスに競合状況を通知するような構成(図示せず)にしてもよい。   In addition to the method of notifying log information generated by the log generation unit 150 from the log information notification unit 170 to the control unit 120 as shown in FIG. 8, the data access unit 130 directly competes without using log information. A configuration (not shown) that notifies the corresponding control process of the competition status based on the information may be used.

本実施の形態4における「競合状況通知部」は、ログ情報通知部170がこれに相当する。   The “competition status notification unit” in the fourth embodiment corresponds to the log information notification unit 170.

実施の形態5.
図9は、本発明の実施の形態5に係る設備管理装置100の機能ブロック図である。
本実施の形態5に係る設備管理装置100は、実施の形態2の図6で説明した構成に加え、新たにログ出力部180を備える。その他の構成は図6と同様であるため、説明を省略する。
Embodiment 5 FIG.
FIG. 9 is a functional block diagram of the facility management apparatus 100 according to Embodiment 5 of the present invention.
The facility management apparatus 100 according to the fifth embodiment includes a log output unit 180 in addition to the configuration described in FIG. 6 of the second embodiment. Other configurations are the same as those in FIG.

ログ出力部180は、ログ生成部150が生成したログ情報を設備管理装置100の外部に出力する。
出力方式は、例えば外付けのメモリ装置にログデータをコピーする方法、シリアルケーブルやLAN等による接続を介した通信によりログデータを出力する方法、等を利用することができる。
また、出力されるログデータの形式は、生のログデータそのまま、XML等によりデータ構造記述されたもの、外部からの指示により特定の形式に変更されたもの、外部からの指示により選抜されたもの、等とすることができる。
ログデータを設備管理装置100の外部に出力することにより、ログデータの解析を設備管理装置100の外部で行うことができる。
The log output unit 180 outputs the log information generated by the log generation unit 150 to the outside of the facility management apparatus 100.
As an output method, for example, a method of copying log data to an external memory device, a method of outputting log data by communication via a serial cable, a LAN, or the like can be used.
The output log data format is raw log data as it is described in XML or other data structure, changed to a specific format by an external instruction, or selected by an external instruction. , Etc.
By outputting the log data to the outside of the facility management apparatus 100, the log data can be analyzed outside the facility management apparatus 100.

ログ出力部180は、その機能を実現する回路デバイスのようなハードウェアで実現することもできるし、CPUやマイコンのような演算装置とその動作を規定する制御プログラムで実現することもできる。
また、制御部120、データアクセス部130、またはログ生成部150と一体的に構成することもできる。
ログ出力時のインターフェースは、出力方式やログデータの形式に応じて適宜定める。
The log output unit 180 can be realized by hardware such as a circuit device that realizes the function, or can be realized by an arithmetic device such as a CPU or a microcomputer and a control program that defines its operation.
Further, the control unit 120, the data access unit 130, or the log generation unit 150 can be configured integrally.
The interface for log output is appropriately determined according to the output method and log data format.

実施の形態6.
図10は、本発明の実施の形態6に係る設備管理装置500の機能ブロック図である。
図10において、通信部510、制御部520、データアクセス部530、記憶部540の機能や役割は、概ね実施の形態1の図1で説明した同名の構成部と同様であるため、本実施の形態6では差異点のみを説明する。
Embodiment 6 FIG.
FIG. 10 is a functional block diagram of the facility management apparatus 500 according to Embodiment 6 of the present invention.
In FIG. 10, the functions and roles of the communication unit 510, the control unit 520, the data access unit 530, and the storage unit 540 are substantially the same as the components having the same names described in FIG. In form 6, only the differences will be described.

記憶部540は、後述の図11で説明する使用間隔管理テーブル541を格納している。
制御部520が実行する制御プロセスは、使用間隔管理テーブル541を参照し、同テーブルに定義されている各管理データの使用間隔を取得して、その使用間隔で記憶部540に格納されている各管理データを参照し、または更新する。使用間隔の詳細は後述する。
なお、制御プロセスが各管理データにアクセスする際は、実施の形態1と同様に、データアクセス部530を介して行う。
The storage unit 540 stores a use interval management table 541 described later with reference to FIG.
The control process executed by the control unit 520 refers to the use interval management table 541, acquires the use interval of each management data defined in the table, and stores each use data stored in the storage unit 540 at the use interval. View or update management data. Details of the use interval will be described later.
The control process accesses each management data through the data access unit 530 as in the first embodiment.

使用間隔管理テーブル541が格納するデータは、設備管理装置500の外部から、ユーザが設定できるようにしてもよい。
設定に際しては、例えば通信部510を介して監視装置300の表示画面に適当な選択肢を表示させ、設備管理装置500の動作設定項目としてユーザに提示したり、設定値の入力を同画面上でユーザに促したりして、設定作業によりこれらの内容をユーザに設定させてもよい。
Data stored in the use interval management table 541 may be set by the user from outside the facility management apparatus 500.
When setting, for example, an appropriate option is displayed on the display screen of the monitoring device 300 via the communication unit 510 and presented to the user as an operation setting item of the equipment management device 500, or the input of the setting value is displayed on the user screen. The user may be prompted to set these contents by setting work.

図11は、使用間隔管理テーブル541の構成とデータ例である。
使用間隔管理テーブル541は、「データ識別ID」列、「制御プロセスID」列、「使用間隔」列を有する。
「データ識別ID」列には、記憶部540が格納する各管理データを一意に識別するIDが格納される。
「制御プロセスID」列には、「データ識別ID」列の値で特定される管理データを使用する制御プロセスの識別IDが格納される。
「使用間隔」列には、「制御プロセスID」列の値で特定される制御プロセスが、「データ識別ID」列の値で特定される管理データを、参照しまたは更新する時間間隔が数値で格納される。
図11のデータ例では、1〜2行目のデータを参照すると、以下のことが分かる。
FIG. 11 shows a configuration and data example of the use interval management table 541.
The use interval management table 541 has a “data identification ID” column, a “control process ID” column, and a “use interval” column.
In the “data identification ID” column, an ID for uniquely identifying each management data stored in the storage unit 540 is stored.
The “control process ID” column stores the identification ID of the control process that uses the management data specified by the value of the “data identification ID” column.
In the “usage interval” column, the time interval at which the control process identified by the value of the “control process ID” column refers to or updates the management data identified by the value of the “data identification ID” column is a numerical value. Stored.
In the data example of FIG. 11, the following can be understood by referring to the data in the first and second rows.

(1)制御プロセス520Aは、空調機200bの設定温度を10分毎に使用することが定義されているので、制御部520は、通信部510へ10分毎に、空調機200bの設定温度を取得すべき旨の管理命令を発行させる。 (1) Since it is defined that the control process 520A uses the set temperature of the air conditioner 200b every 10 minutes, the control unit 520 sends the set temperature of the air conditioner 200b to the communication unit 510 every 10 minutes. Issue a management order to the effect that it should be acquired.

なお、管理データを提供すべきタイミングとしては、以下のような例が考えられる。
(1.1)制御プロセス520Aが同管理データを要求した際に、その時点より前の10分以内に更新された最新の管理データを提供する。
(1.2)10分毎に最新の管理データを取得し、制御プロセスにその旨の通知を出力する。
In addition, the following examples can be considered as timing when management data should be provided.
(1.1) When the control process 520A requests the management data, the latest management data updated within 10 minutes before that time is provided.
(1.2) The latest management data is acquired every 10 minutes, and a notification to that effect is output to the control process.

(2)制御プロセス520Bも同様に、空調機200bの設定温度を15分毎に使用するので、制御部520は、同管理データを15分毎に更新するよう、通信部510へ15分毎に、空調機200bの設定温度を取得すべき旨の管理命令を発行させる。 (2) Similarly, the control process 520B uses the set temperature of the air conditioner 200b every 15 minutes, so the control unit 520 sends the management data to the communication unit 510 every 15 minutes so that the management data is updated every 15 minutes. Then, a management instruction is issued to the effect that the set temperature of the air conditioner 200b should be acquired.

各「使用間隔」列の値に基づき、制御部520が空調機200bの設定温度を取得すると、制御部520は、記憶部540が格納している該当管理データの値を更新する。   When the control unit 520 acquires the set temperature of the air conditioner 200b based on the value in each “use interval” column, the control unit 520 updates the value of the corresponding management data stored in the storage unit 540.

なお、管理データの更新周期のみならず、例えばネットワーク400に接続されている各設備機器200に所定の管理命令を定時発報する時間間隔など、種々のデータの使用間隔について、使用間隔管理テーブル541を用いて定義することができる。   In addition, not only the management data update cycle but also the usage interval management table 541 for the usage intervals of various data such as a time interval for regularly issuing a predetermined management command to each equipment device 200 connected to the network 400. Can be defined using

以上、使用間隔管理テーブル541を用いた各管理データの使用間隔の定義、および制御部520の動作について、原則となる事項を説明した。
次に、上記の原則の下、さらに各管理データの使用間隔を最適化して通信トラフィックを低減する動作について説明する。
In the foregoing, the basic matters have been described regarding the definition of the use interval of each management data using the use interval management table 541 and the operation of the control unit 520.
Next, an operation for reducing communication traffic by further optimizing the use interval of each management data under the above principle will be described.

図11で説明した通り、通信部510は、同一の管理データに対して10分毎と15分毎それぞれに、データ更新を行うための管理命令を発行するのが原則であるが、このように、同一の管理データを制御プロセス毎に個別に更新するのは煩雑である。
そこで、制御部520は、いずれの使用間隔で管理データを使用すれば最も効率的かを判断し、その周期をもって各管理データを読み取りまたは書き込みするよう、最適化を行う。
As described in FIG. 11, the communication unit 510 issues a management command for updating data every 10 minutes and 15 minutes for the same management data in principle. It is complicated to individually update the same management data for each control process.
Therefore, the control unit 520 determines which use interval is most efficient when the management data is used, and performs optimization so that each management data is read or written with the cycle.

ここでいう最適化とは、通信部510の通信トラフィックを低減する観点から、例えば通信部510と各設備機器200との間の通信回数が最小となる使用間隔を求めることである。
例えば、10分と15分の最大公約数をとった5分間隔でその管理データを更新し、各制御プロセスの更新周期を共通化する、といった最適化処理が考えられる。
以下、図11のデータ例を用いて、最適化の手法の1例を下記ステップ(1)〜(3)で説明する。
The optimization referred to here is, for example, obtaining a use interval that minimizes the number of communication between the communication unit 510 and each facility device 200 from the viewpoint of reducing communication traffic of the communication unit 510.
For example, an optimization process can be considered in which the management data is updated at intervals of 5 minutes taking the greatest common divisor of 10 minutes and 15 minutes, and the update cycle of each control process is made common.
Hereinafter, an example of the optimization method will be described in the following steps (1) to (3) using the data example of FIG.

(1)制御プロセス520Aが使用するための10分毎の更新と、制御プロセス520Bが使用するための15分毎の更新を、個別に実行するものと仮定する。
この場合、1時間で行われる更新回数は、以下のようになる。
(1.1)制御プロセス520Aのための更新:60分/10分=6回
(1.2)制御プロセス520Bのための更新:60分/15分=4回
(1.3)合計更新回数:6回+4回=10回
(1) It is assumed that the update every 10 minutes for use by the control process 520A and the update every 15 minutes for use by the control process 520B are executed separately.
In this case, the number of updates performed in one hour is as follows.
(1.1) Update for control process 520A: 60 minutes / 10 minutes = 6 times (1.2) Update for control process 520B: 60 minutes / 15 minutes = 4 times (1.3) Total number of updates : 6 times + 4 times = 10 times

(2)一方、制御プロセス520Aと520Bの更新間隔の最大公約数を取り、5分間隔で更新を実行するものと仮定する。
この場合、1時間で行われる更新回数は、以下のようになる。
(2.1)制御プロセス520Aと520Bの共通更新:60分/5分=12回
(2) On the other hand, it is assumed that the greatest common divisor of the update intervals of the control processes 520A and 520B is taken and updates are performed at intervals of 5 minutes.
In this case, the number of updates performed in one hour is as follows.
(2.1) Common update of control processes 520A and 520B: 60 minutes / 5 minutes = 12 times

(3)制御部520は、上記(1)〜(2)の演算を行い、いずれの更新間隔を用いる方が更新回数が少ないかを判定する。この場合は、制御プロセス520Aと520Bそれぞれのための更新を個別に行った方がよいことが分かる。
したがって制御部520は、使用間隔管理テーブル541の「使用間隔」列の値をそのまま用いて、空調機200bの設定温度の更新のための管理命令を発行する。
(3) The control unit 520 performs the calculations (1) to (2) above, and determines which update interval is used to reduce the number of updates. In this case, it can be seen that it is better to perform the update for each of the control processes 520A and 520B individually.
Therefore, the control unit 520 issues a management command for updating the set temperature of the air conditioner 200b using the value in the “use interval” column of the use interval management table 541 as it is.

一方、制御プロセス520Aが5分毎に更新し、制御プロセス520Bが10分毎に更新する場合は、以下のようになる。   On the other hand, when the control process 520A is updated every 5 minutes and the control process 520B is updated every 10 minutes, it is as follows.

(1)制御プロセス520Aが使用するための5分毎の更新と、制御プロセス520Bが使用するための10分毎の更新を、個別に実行するものと仮定する。
この場合、1時間で行われる更新回数は、以下のようになる。
(1.1)制御プロセス520Aのための更新:60分/ 5分=12回
(1.2)制御プロセス520Bのための更新:60分/10分= 6回
(1.3)合計更新回数:12回+6回=18回
(1) It is assumed that the update every 5 minutes for use by the control process 520A and the update every 10 minutes for use by the control process 520B are executed separately.
In this case, the number of updates performed in one hour is as follows.
(1.1) Update for control process 520A: 60 minutes / 5 minutes = 12 times (1.2) Update for control process 520B: 60 minutes / 10 minutes = 6 times (1.3) Total number of updates : 12 times + 6 times = 18 times

(2)一方、制御プロセス520Aと520Bの更新間隔の最大公約数を取り、5分間隔で更新を実行するものと仮定する。
この場合、1時間で行われる更新回数は、以下のようになる。
(2.1)制御プロセス520Aと520Bの共通更新:60分/5分=12回
(2) On the other hand, it is assumed that the greatest common divisor of the update intervals of the control processes 520A and 520B is taken and updates are performed at intervals of 5 minutes.
In this case, the number of updates performed in one hour is as follows.
(2.1) Common update of control processes 520A and 520B: 60 minutes / 5 minutes = 12 times

(3)この場合は、制御プロセス520Aと520Bの更新を共通にした方が、合計の更新回数が少ないことが分かる。 (3) In this case, it is understood that the total number of updates is smaller when the control processes 520A and 520B are updated in common.

なお、上記の説明では、各管理命令とその応答に要する通信データ量が、制御プロセス520Aと520Bで同一であるものと仮定したが、通信データ量の差異がある場合は、通信回数に通信データ量を乗算し、合計の通信データ量が少なくなる方の更新周期を選択するようにしてもよい。   In the above description, it is assumed that the communication data amount required for each management command and its response is the same in the control processes 520A and 520B. The update cycle that reduces the total amount of communication data may be selected by multiplying the amount.

本実施の形態6では、実施の形態1と同様の構成の下、使用間隔テーブル541を用いた管理データの更新周期の最適化について説明したが、実施の形態2〜5と同様の構成の下で、同様に管理データの更新周期の最適化を行うようにしてもよい。   In the sixth embodiment, optimization of the management data update cycle using the use interval table 541 has been described under the same configuration as in the first embodiment. However, the same configuration as in the second to fifth embodiments is used. Similarly, the management data update cycle may be optimized.

以上のように、本実施の形態6では、制御部520は、使用間隔テーブル541に格納されている各管理データの使用間隔を最適化する。
これにより、設備管理装置500と各設備機器200の間の通信トラフィックを緩和することができ、安定動作可能な設備管理装置500を得ることができる。
As described above, in the sixth embodiment, the control unit 520 optimizes the use interval of each management data stored in the use interval table 541.
Thereby, the communication traffic between the facility management device 500 and each facility device 200 can be reduced, and the facility management device 500 capable of stable operation can be obtained.

実施の形態1に係る設備機器ネットワークシステムの構成図である。1 is a configuration diagram of a facility equipment network system according to Embodiment 1. FIG. データアクセスの競合により、記憶部140が格納しているデータに不具合が発生する例を説明するものである。An example will be described in which a failure occurs in data stored in the storage unit 140 due to a data access conflict. 制御プロセス120Aが、記憶部140に格納されている管理データにアクセスする際の処理フローである。It is a processing flow when the control process 120A accesses the management data stored in the storage unit 140. 制御プロセス120Aが、記憶部140に格納されている管理データへのアクセスを終了しようとする際の処理フローである。This is a processing flow when the control process 120A attempts to end access to management data stored in the storage unit 140. 設備管理装置100が備えるセマフォの機能を説明するものである。The function of the semaphore provided in the facility management apparatus 100 will be described. 実施の形態2に係る設備管理装置100の機能ブロック図である。It is a functional block diagram of the equipment management device 100 according to the second embodiment. 実施の形態3に係る設備管理装置100の機能ブロック図である。It is a functional block diagram of the equipment management device 100 according to the third embodiment. 実施の形態4に係る設備管理装置100の機能ブロック図である。It is a functional block diagram of the equipment management apparatus 100 which concerns on Embodiment 4. 実施の形態5に係る設備管理装置100の機能ブロック図である。FIG. 10 is a functional block diagram of a facility management apparatus 100 according to a fifth embodiment. 実施の形態6に係る設備管理装置500の機能ブロック図である。It is a functional block diagram of the equipment management apparatus 500 which concerns on Embodiment 6. FIG. 使用間隔管理テーブル541の構成とデータ例である。It is a structure and data example of the use interval management table 541.

符号の説明Explanation of symbols

100 設備管理装置、110 通信部、120 制御部、130 データアクセス部、140 記憶部、150 ログ生成部、160 ログ表示部、170 ログ情報通知部、180 ログ出力部、200a 照明器、200b 空調機、300 監視装置、400 ネットワーク、500 設備管理装置、510 通信部、520 制御部、530 データアクセス部、540 記憶部、541 使用間隔テーブル。   DESCRIPTION OF SYMBOLS 100 Equipment management apparatus, 110 Communication part, 120 Control part, 130 Data access part, 140 Storage part, 150 Log generation part, 160 Log display part, 170 Log information notification part, 180 Log output part, 200a Illuminator, 200b Air conditioner , 300 monitoring device, 400 network, 500 facility management device, 510 communication unit, 520 control unit, 530 data access unit, 540 storage unit, 541 use interval table.

Claims (18)

設備機器と、
当該設備機器の動作を制御する制御部、前記制御部が使用するデータを格納する記憶部、前記記憶部が格納しているデータにアクセスするとともにそのデータの使用状態フラグを管理するデータアクセス部、及び、前記設備機器に対する管理命令の送信またはその応答の受信を行う通信部を有する設備管理装置と、
を備え、
前記記憶部は、前記設備機器の管理データおよびその管理データの使用間隔を定義した間隔管理テーブルを格納し、
前記制御部は、
前記記憶部が格納する管理データに対する読み取りまたは書き込みを要求する複数の制御プロセスを非同期に実行し、
前記間隔管理テーブルは、前記制御プロセス毎に前記使用間隔を保持し、
前記制御部は、
前記間隔管理テーブルに定義され、同一の前記管理データを参照する複数の制御プロセスに対応する前記使用間隔を、前記データアクセス部を介して参照し、
当該使用間隔の最大公約数を算出し、
前記複数の制御プロセスがそれぞれ対応する前記使用間隔によって前記管理命令を送信する単位時間あたりの通信回数と、前記最大公約数を使用間隔として前記複数の制御プロセスが共通に当該使用間隔によって前記管理命令を送信する単位時間あたりの通信回数とを比較して、小さい方の前記通信回数に対応する使用間隔を新たな使用間隔とし、
前記制御プロセスは、
前記新たな使用間隔で前記通信部を介して前記設備機器に対する前記管理命令の送信を行い
その管理命令に対する前記設備機器からの応答に基づき前記記憶部に前記データアクセス部を介してその設備機器の管理データを格納し、
前記データアクセス部は、
前記制御プロセスからの前記管理データ読取要求または書込要求を受け付け、
当該管理データの使用状態フラグが使用不可状態であれば、
当該管理データにアクセスできない旨を当該制御プロセスに返却し、
当該管理データの使用状態フラグが使用可能状態であれば、
使用状態フラグを使用不可状態にセットしてその管理データにアクセスし、当該管理データの読み取りまたは書き込みが終了すると、当該管理データの使用状態フラグを使用可能状態にセットして、当該管理データの読み取りまたは書き込みの結果を当該制御プロセスに返却する
ことを特徴とする設備機器ネットワークシステム。
Equipment and equipment
A control unit for controlling the operation of the equipment, a storage unit for storing data used by the control unit, a data access unit for accessing data stored in the storage unit and managing a use state flag of the data; And the equipment management device which has a communication part which performs transmission of the management command to the equipment, or reception of the response,
With
The storage unit stores a management data of the equipment and an interval management table defining a use interval of the management data,
The controller is
Asynchronously executing a plurality of control processes that request reading or writing of management data stored in the storage unit,
The interval management table holds the use interval for each control process,
The controller is
The use interval corresponding to a plurality of control processes defined in the interval management table and referring to the same management data is referred to via the data access unit ,
Calculate the greatest common divisor of the usage interval,
The number of communications per unit time for transmitting the management command according to the use interval corresponding to the plurality of control processes, and the control command shared by the plurality of control processes using the greatest common divisor as the use interval. Is compared with the number of communications per unit time to transmit a new usage interval corresponding to the smaller number of communications,
The control process is
It performs transmission of the management command for the facility device via the communication unit in the new use intervals,
Based on the response from the equipment to the management instruction, the management data of the equipment is stored in the storage unit via the data access unit ,
The data access unit
Receiving a read request or a write request for the management data from the control process;
If the usage status flag of the management data is unavailable,
Return to the control process that the management data cannot be accessed,
If the usage status flag of the management data is available,
Set the use status flag to the disabled state, access the management data, and when the management data is read or written, set the use status flag for the management data to the enabled state and read the management data. Alternatively, a facility equipment network system that returns the result of writing to the control process.
前記データアクセス部は、
前記使用状態フラグを使用不可状態にセットする際には、
当該データに対する読み取りまたは書き込みの結果の返却先である前記制御プロセスの識別IDをその使用状態フラグの値としてセットする
ことを特徴とする請求項1に記載の設備機器ネットワークシステム。
The data access unit
When setting the use state flag to the unusable state,
The equipment network system according to claim 1, wherein an identification ID of the control process that is a return destination of a result of reading or writing the data is set as a value of the use state flag.
前記データアクセス部は、
前記使用状態フラグに対し複数の制御プロセスから同時にアクセス要求があった際は、
1の制御プロセスのみその使用状態フラグに対するアクセスを許可し、
先の制御プロセスがその使用状態フラグへのアクセスを終了するまで他の制御プロセスを待機させる
ことを特徴とする請求項1または請求項2に記載の設備機器ネットワークシステム。
The data access unit
When there are simultaneous access requests from a plurality of control processes to the use state flag,
Only one control process is allowed access to its usage flag,
The equipment network system according to claim 1 or 2, wherein another control process is made to wait until the previous control process ends access to the use state flag.
前記設備管理装置は、前記記憶部が格納するデータに対するアクセス状況ログを生成するログ生成部を備え、
前記ログ生成部は、
前記記憶部が格納するデータに対する前記制御プロセスからの読み取りまたは書き込みの要求が競合した際に、
その競合状況を表すアクセス状況ログを生成する
ことを特徴とする請求項1ないし請求項のいずれかに記載の設備機器ネットワークシステム。
The facility management apparatus includes a log generation unit that generates an access status log for data stored in the storage unit,
The log generation unit
When a read or write request from the control process for data stored in the storage unit competes,
The facility equipment network system according to any one of claims 1 to 3 , wherein an access situation log representing the competition situation is generated.
前記制御部は、
前記ログ生成部が生成するアクセス状況ログの生成条件または書式の指定を受け付け、
その生成条件または書式を定義するログ定義データを前記記憶部に格納し、
前記ログ生成部は、
前記アクセス状況ログを生成する際に、
前記ログ定義データを参照してその生成条件または書式に基づき前記アクセス状況ログを生成する
ことを特徴とする請求項に記載の設備機器ネットワークシステム。
The controller is
Accepting the specification of the generation condition or format of the access status log generated by the log generation unit,
Log definition data defining the generation conditions or format is stored in the storage unit;
The log generation unit
When generating the access status log,
The equipment network system according to claim 4 , wherein the access status log is generated based on the generation condition or format with reference to the log definition data.
前記設備管理装置は、画面表示を行う表示部を備え、
前記制御部は、
前記ログ生成部が生成した前記アクセス状況ログを取得し、
その内容を前記表示部に画面表示させる
ことを特徴とする請求項または請求項に記載の設備機器ネットワークシステム。
The facility management apparatus includes a display unit that performs screen display.
The controller is
Obtaining the access status log generated by the log generation unit;
The equipment network system according to claim 4 or 5 , wherein the contents are displayed on the screen of the display unit.
前記設備管理装置は、前記制御部が実行する前記制御プロセスに対し、前記記憶部が格納するデータに対する読み取りまたは書き込みの要求が競合した旨を通知する競合状況通知部を備え、
前記競合状況通知部は、
前記ログ生成部が生成した前記アクセス状況ログを取得し、
そのアクセス状況ログに基づき前記通知を行う
ことを特徴とする請求項または請求項に記載の設備機器ネットワークシステム。
The facility management apparatus includes a contention status notification unit that notifies the control process executed by the control unit that a read or write request for data stored in the storage unit has competed,
The competition status notification unit
Obtaining the access status log generated by the log generation unit;
The equipment network system according to claim 4 or 5 , wherein the notification is performed based on the access status log.
前記設備管理装置は、前記ログ生成部が生成した前記アクセス状況ログを当該設備管理装置の外部に出力するログ出力部を備えた
ことを特徴とする請求項または請求項に記載の設備機器ネットワークシステム。
The equipment management apparatus, equipment according to claim 4 or claim 5, characterized in that with a log output unit which outputs the access status log said log generating unit has generated to the outside of the facility management apparatus Network system.
前記データアクセス部は、
前記制御プロセスから受け付けたデータ読取要求または書込要求が競合した際は、
要求元の前記制御プロセスにその競合状況を通知する
ことを特徴とする請求項1ないし請求項のいずれかに記載の設備機器ネットワークシステム。
The data access unit
When the data read request or write request received from the control process conflicts,
The equipment network system according to any one of claims 1 to 3 , wherein the contention status is notified to the control process of the request source.
設備機器の動作を管理する設備管理装置のデータアクセスを制御する方法であって、
当該設備管理装置が備える記憶部が格納する前記設備機器の管理データに対して読み取りまたは書き込みを要求する複数の制御プロセスを非同期に実行するステップと、
前記記憶部が格納している前記管理データにアクセスするとともに当該管理データの使用状態フラグを管理するデータアクセスステップと、
前記記憶部に格納され、前記設備機器の前記管理データおよび前記制御プロセス毎に当該管理データの使用間隔を定義した間隔管理テーブルから、同一の前記管理データを参照する複数の制御プロセスに対応する前記使用間隔を参照し、当該使用間隔の最大公約数を参照し、前記複数の制御プロセスがそれぞれ対応する前記使用間隔によって前記設備機器に対する管理命令を送信する単位時間あたりの通信回数と、前記最大公約数を使用間隔として前記複数の制御プロセスが共通に当該使用間隔によって前記管理命令を送信する単位時間あたりの通信回数とを比較して、小さい方の前記通信回数に対応する使用間隔を新たな使用間隔とする間隔取得ステップと、
前記新たな使用間隔で前記設備機器に対する管理命令を送信する通信ステップと、
その管理命令に対する前記設備機器からの応答に基づき前記記憶部にその設備機器の管理データを格納するステップと、
を有し、
前記データアクセスステップはさらに、
前記制御プロセスからの前記管理データ読取要求または書込要求を受け付けるステップと、
当該管理データの使用状態フラグの状態を判定するステップと、
を有し、
前記データアクセスステップにおいて、
当該管理データの使用状態フラグが使用不可状態であれば、
当該管理データにアクセスできない旨を当該制御プロセスに返却し、
当該管理データの使用状態フラグが使用可能状態であれば、
使用状態フラグを使用不可状態にセットしてその管理データにアクセスし、当該管理データの読み取りまたは書き込みが終了すると、当該管理データの使用状態フラグを使用可能状態にセットして、当該管理データの読み取りまたは書き込みの結果を当該制御プロセスに返却する
ことを特徴とするデータアクセス制御方法。
A method for controlling data access of a facility management apparatus that manages the operation of facility equipment,
Asynchronously executing a plurality of control processes for requesting reading or writing to management data of the equipment stored in the storage unit provided in the equipment management device;
And data access step of managing the use status flag of the management data together with access to the management data which the storage unit stores,
Stored in the storage unit, from said interval management table that defines the use interval of the management data for each of the management data and the control process of the equipment, said corresponding to a plurality of control processes to refer to the same of the management data Refers to the use interval, refers to the greatest common divisor of the use interval, the number of communications per unit time at which the plurality of control processes transmit management commands to the equipment according to the corresponding use interval, and the greatest promise The plurality of control processes commonly using the number as a use interval is compared with the number of communication per unit time in which the management command is transmitted according to the use interval, and the use interval corresponding to the smaller number of communication is newly used. An interval acquisition step as an interval;
A communication step of transmitting a management command for the equipment at the new use interval;
Storing management data of the equipment in the storage unit based on a response from the equipment to the management command;
Have
The data access step further includes
Receiving a read request or a write request for the management data from the control process;
Determining a state of a use state flag of the management data;
Have
In the data access step,
If the usage status flag of the management data is unavailable,
Return to the control process that the management data cannot be accessed,
If the usage status flag of the management data is available,
Set the use status flag to the disabled state, access the management data, and when the management data is read or written, set the use status flag for the management data to the enabled state and read the management data. Alternatively, a data access control method characterized by returning a write result to the control process.
前記データアクセスステップにおいて、
前記使用状態フラグを使用不可状態にセットする際には、
当該データに対する読み取りまたは書き込みの結果の返却先である前記制御プロセスの識別IDをその使用状態フラグの値としてセットする
ことを特徴とする請求項10に記載のデータアクセス制御方法。
In the data access step,
When setting the use state flag to the unusable state,
11. The data access control method according to claim 10 , wherein an identification ID of the control process that is a return destination of a result of reading or writing the data is set as a value of the use state flag.
前記使用状態フラグに対し複数の制御プロセスから同時にアクセス要求があった際は、
前記データアクセスステップにおいて、
1の制御プロセスのみその使用状態フラグに対するアクセスを許可し、
先の制御プロセスがその使用状態フラグへのアクセスを終了するまで他の制御プロセスを待機させる
ことを特徴とする請求項10または請求項11に記載のデータアクセス制御方法。
When there are simultaneous access requests from a plurality of control processes to the use state flag,
In the data access step,
Only one control process is allowed access to its usage flag,
The data access control method according to claim 10 or 11 , wherein another control process is made to wait until the previous control process ends access to the use state flag.
前記記憶部が格納するデータに対するアクセス状況ログを生成するログ生成ステップを有し、
前記ログ生成ステップにおいて、
前記記憶部が格納するデータに対する前記制御プロセスからの読み取りまたは書き込みの要求が競合した際に、
その競合状況を表すアクセス状況ログを生成する
ことを特徴とする請求項10ないし請求項12のいずれかに記載のデータアクセス制御方法。
A log generation step of generating an access status log for data stored in the storage unit;
In the log generation step,
When a read or write request from the control process for data stored in the storage unit competes,
The data access control method according to any one of claims 10 to 12 , wherein an access status log representing the contention status is generated.
前記ログ生成ステップにおいて生成されるアクセス状況ログの生成条件または書式の指定を受け付け、その生成条件または書式を定義するログ定義データを前記記憶部に格納する格納ステップを有し、
前記ログ生成ステップにおいて、
前記アクセス状況ログを生成する際に、
前記格納ステップにおいて前記記憶部に格納された前記ログ定義データを参照してその生成条件または書式に基づき前記アクセス状況ログを生成する
ことを特徴とする請求項13に記載のデータアクセス制御方法。
Receiving a generation condition or format specification of the access status log generated in the log generation step, and storing the log definition data defining the generation condition or format in the storage unit,
In the log generation step,
When generating the access status log,
The data access control method according to claim 13 , wherein in the storing step, the access status log is generated based on the generation condition or format with reference to the log definition data stored in the storage unit.
前記ログ生成ステップで生成した前記アクセス状況ログを取得し、
当該設備管理装置に設けられ、画面表示を行う表示部に前記アクセス状況ログの内容を画面表示させる表示ステップを有した
ことを特徴とする請求項13または請求項14に記載のデータアクセス制御方法。
Obtain the access status log generated in the log generation step,
The data access control method according to claim 13 or 14 , further comprising a display step that is provided in the facility management apparatus and causes a display unit that displays a screen to display the contents of the access status log on a screen.
前記制御プロセスに対し、前記記憶部が格納するデータに対する読み取りまたは書き込みの要求が競合した旨を通知する競合状況通知ステップを有し、
前記競合状況通知ステップにおいて、
前記ログ生成ステップで生成した前記アクセス状況ログを取得し、
そのアクセス状況ログに基づき前記通知を行う
ことを特徴とする請求項13または請求項14に記載のデータアクセス制御方法。
A contention status notification step of notifying the control process that a read or write request for data stored in the storage unit has competed;
In the competition status notification step,
Obtain the access status log generated in the log generation step,
The data access control method according to claim 13 or 14 , wherein the notification is performed based on the access status log.
前記ログ生成ステップで生成した前記アクセス状況ログを当該設備管理装置の外部に出力するステップを有する
ことを特徴とする請求項13または請求項14に記載のデータアクセス制御方法。
Data access control method according to claim 13 or claim 14, characterized by the step of outputting the access status log generated by the log generation step to the outside of the facility management apparatus.
前記データアクセスステップにおいて、
前記制御プロセスから受け付けたデータ読取要求または書込要求が競合した際は、
要求元の前記制御プロセスにその競合状況を通知する
ことを特徴とする請求項10ないし請求項12のいずれかに記載のデータアクセス制御方法。
In the data access step,
When the data read request or write request received from the control process conflicts,
The data access control method according to any one of claims 10 to 12 , wherein the contention status is notified to the control process of the request source.
JP2007321085A 2007-12-12 2007-12-12 Equipment network system and data access control method Active JP4920567B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007321085A JP4920567B2 (en) 2007-12-12 2007-12-12 Equipment network system and data access control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007321085A JP4920567B2 (en) 2007-12-12 2007-12-12 Equipment network system and data access control method

Publications (2)

Publication Number Publication Date
JP2009146051A JP2009146051A (en) 2009-07-02
JP4920567B2 true JP4920567B2 (en) 2012-04-18

Family

ID=40916611

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007321085A Active JP4920567B2 (en) 2007-12-12 2007-12-12 Equipment network system and data access control method

Country Status (1)

Country Link
JP (1) JP4920567B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5534863B2 (en) * 2010-02-26 2014-07-02 株式会社東芝 Image storage location management device
JP5473787B2 (en) * 2010-06-04 2014-04-16 三菱電機株式会社 Air conditioning control program and air conditioning control device
WO2012147203A1 (en) * 2011-04-28 2012-11-01 三菱電機株式会社 System controller and program
JP5971958B2 (en) * 2012-01-18 2016-08-17 三菱電機株式会社 Competitive processing apparatus and air conditioning system
JP6733704B2 (en) * 2018-05-31 2020-08-05 ダイキン工業株式会社 Air conditioning management system and communication control device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3101825B2 (en) * 1991-04-04 2000-10-23 日本信号株式会社 Fault diagnosis device for multitasking system
JPH09330240A (en) * 1996-06-10 1997-12-22 Nec Corp Exclusive resource control system
JP2004046812A (en) * 2002-05-21 2004-02-12 Daikin Ind Ltd Equipment controller, and equipment management system
JP3822852B2 (en) * 2002-09-19 2006-09-20 三菱電機株式会社 Memory access device
JP4428099B2 (en) * 2004-03-12 2010-03-10 パナソニック電工株式会社 Relay master device and remote monitoring system
JP2006171915A (en) * 2004-12-13 2006-06-29 Matsushita Electric Ind Co Ltd Exclusive controller

Also Published As

Publication number Publication date
JP2009146051A (en) 2009-07-02

Similar Documents

Publication Publication Date Title
KR100641988B1 (en) Method to provide atomic update primitives in an asymmetric heterogeneous multiprocessor environment
CN101802798B (en) Avoiding livelock using intervention messages in multiple core processors
US7653788B2 (en) Cache coherency in a shared-memory multiprocessor system
US8171248B2 (en) Storage system controlling method, switch device and storage system
JP4920567B2 (en) Equipment network system and data access control method
CN102541661B (en) Realize the method and apparatus of wait on address synchronization interface
JP6838222B2 (en) Vehicle control device and vehicle system
JP2010160704A (en) Debug support device
US7587543B2 (en) Apparatus, method and computer program product for dynamic arbitration control
US5692153A (en) Method and system for verifying execution order within a multiprocessor data processing system
US11169500B2 (en) Control system, control device and control program for verifying soundness of data on a transmission path
JP2003529819A (en) Automation device and update method
CN113094430A (en) Data processing method, device, equipment and storage medium
JP2009217721A (en) Data synchronization method in multiprocessor system and multiprocessor system
US20100088471A1 (en) Field device
US11316710B2 (en) Control system and control method
CN101044459B (en) Method and apparatus for modifying an information unit using an atomic operation in a system with a mixed architecture
CN112799922A (en) Log management method, electronic equipment and storage device
CN109358903A (en) Data access equipment and access errors notification method
JP2010026626A (en) Method, system and program for recording data
JPH0844662A (en) Information processor
JPH0844661A (en) Information processor
JP3443787B2 (en) Autonomous decentralized plant control man-machine device
JP4102769B2 (en) Information processing system, failure location identification method, information processing apparatus
US20210303487A1 (en) Programmable logic controller, external apparatus, method, and recording medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101005

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110802

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110927

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120201

R150 Certificate of patent or registration of utility model

Ref document number: 4920567

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150210

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250