JP6587031B2 - Control device, data processing device, control system, control method, data processing method, control program, and data processing program - Google Patents
Control device, data processing device, control system, control method, data processing method, control program, and data processing program Download PDFInfo
- Publication number
- JP6587031B2 JP6587031B2 JP2018503941A JP2018503941A JP6587031B2 JP 6587031 B2 JP6587031 B2 JP 6587031B2 JP 2018503941 A JP2018503941 A JP 2018503941A JP 2018503941 A JP2018503941 A JP 2018503941A JP 6587031 B2 JP6587031 B2 JP 6587031B2
- Authority
- JP
- Japan
- Prior art keywords
- script
- sensor device
- measurement data
- data
- control 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q9/00—Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
Description
本件は、制御装置、データ処理装置、制御システム、制御方法、データ処理方法、制御プログラム、及びデータ処理プログラムに関する。 The present invention relates to a control device, a data processing device, a control system, a control method, a data processing method, a control program, and a data processing program.
例えばセンサ機器の測定結果を無線通信によりパーソナルコンピュータ、スマートフォン、及びクラウドサーバなどに送信する技術が知られている。測定結果を受信した機器は、測定結果の表示やデータ処理などを行う。 For example, a technique for transmitting a measurement result of a sensor device to a personal computer, a smartphone, a cloud server, or the like by wireless communication is known. The device that has received the measurement result displays the measurement result and performs data processing.
このようなセンサ機器は、例えばI2C(Inter-Integrated Circuit)やSPI(Serial Parallel Interface)などの汎用インターフェースを介して制御用のマイクロコンピュータと接続される。マイクロコンピュータは、デバイスドライバと呼ばれるプログラムによりセンサ機器を制御する。デバイスドライバは、例えば、センサ機器に搭載されたセンサデバイスの追加や変更が行われる場合、センサデバイスにあわせて更新する必要がある。 Such a sensor device is connected to a control microcomputer via a general-purpose interface such as I2C (Inter-Integrated Circuit) or SPI (Serial Parallel Interface). The microcomputer controls the sensor device by a program called a device driver. For example, when a sensor device mounted on a sensor device is added or changed, the device driver needs to be updated according to the sensor device.
デバイスドライバを更新するためには、コンパイラやライブラリなどの開発環境、及びデバイスドライバをROM(Read only Memory)に書き込むためのROMライタなどの特別なツールを用意する必要がある。このため、デバイスドライバの更新には多くの手間がかかる。 In order to update the device driver, it is necessary to prepare a development environment such as a compiler and a library, and a special tool such as a ROM writer for writing the device driver into a ROM (Read Only Memory). For this reason, it takes much time to update the device driver.
これに対し、センサデバイスを制御するプログラムを、マイクロコンピュータの種類によらないスクリプトにより記述すれば(例えば特許文献1参照)、開発環境や特別なツールを必要とせずに、簡単にデバイスドライバを更新することができる。 On the other hand, if the program for controlling the sensor device is described by a script that does not depend on the type of microcomputer (see, for example, Patent Document 1), the device driver can be easily updated without the need for a development environment or special tools. can do.
しかし、マイクロコンピュータがスクリプトを実行するためには、スクリプトの記述内容をバイナリー形式のコードに解釈するプログラム(インタプリタなど)を実行する必要がある。このため、センサ機器の制御処理の負荷は、スクリプトを用いる場合、コンパイラにより生成したバイナリー形式のコードを直接用いる場合より高くなる。これに対し、例えば、高性能プロセッサによりセンサ機器を制御すれば、問題なく制御処理を行うことができるが、装置コストは増加してしまう。 However, in order for the microcomputer to execute the script, it is necessary to execute a program (such as an interpreter) that interprets the description content of the script into binary code. For this reason, the load of the control processing of the sensor device is higher when a script is used than when a binary code generated by a compiler is directly used. On the other hand, for example, if the sensor device is controlled by a high-performance processor, control processing can be performed without any problem, but the apparatus cost increases.
また、例えば、パーソナルコンピュータからセンサ機器に対してI2Cの読み書きのコマンドを送信することにより、マイクロコンピュータの制御処理をセンサデバイスに対するデータの読み書きに限定し、その他の処理をパーソナルコンピュータに割り当てることもできる。この場合、マイクロコンピュータの制御処理の負荷が低減されるが、その反面、パーソナルコンピュータとセンサ機器の間の通信が頻繁に行われるため、通信処理の負荷が増加し、通信の輻輳、処理の遅延、及び消費電力の増加などが生ずる。なお、この問題は、センサ機器の制御装置に限らず、他の機器の制御装置にも存在する。 Further, for example, by sending an I2C read / write command from the personal computer to the sensor device, the microcomputer control process can be limited to data read / write to the sensor device, and other processes can be assigned to the personal computer. . In this case, the load of control processing of the microcomputer is reduced, but on the other hand, since communication between the personal computer and the sensor device is frequently performed, the load of communication processing increases, communication congestion, processing delay. Increase in power consumption. In addition, this problem exists not only in the control apparatus of a sensor apparatus but in the control apparatus of another apparatus.
そこで本件は上記の課題に鑑みてなされたものであり、制御処理及び通信処理の負荷が低減された制御装置、データ処理装置、制御システム、制御方法、データ処理方法、制御プログラム、及びデータ処理プログラムを提供することを目的とする。 Therefore, the present case has been made in view of the above problems, and a control device, a data processing device, a control system, a control method, a data processing method, a control program, and a data processing program in which the load of control processing and communication processing is reduced. The purpose is to provide.
本明細書に記載の制御装置は、センサデバイスに接続される制御装置において、前記センサデバイスにアクセスするコマンドを含む第1スクリプト及び第2スクリプトを記憶する記憶部と、前記第1スクリプトを実行し、該実行結果として、前記センサデバイスの補正係数を取得し、前記第2スクリプトを実行し、該実行結果として、前記センサデバイスの測定データを取得する制御部と、前記補正係数に基づき前記測定データの補正を行うデータ処理装置に、前記補正係数及び前記測定データを送信する送信部とを有する。
Control devices described herein, in a control device connected to the sensor device, a storage unit for storing a first script and the second script includes a command to access the sensor device, and executing the first script as the execution result, and obtains a correction coefficient of said sensor device, executes the second script, as the execution result, and a control unit for acquiring the measurement data of the sensor device, the measurement data based on the correction factor The data processing apparatus that performs the correction includes the transmission unit that transmits the correction coefficient and the measurement data .
本明細書に記載のデータ処理装置は、センサデバイスに接続される制御装置と通信するデータ処理装置において、前記制御装置から、前記センサデバイスにアクセスするコマンドを含む第1スクリプト及び第2スクリプトの実行結果として、前記センサデバイスの補正係数及び測定データをそれぞれ受信する受信部と、前記補正係数に基づき前記測定データの補正を行うデータ処理部とを有する。
The data processing apparatus described herein, in a data processing device communicating with a control device connected to the sensor device, from the control device, the execution of the first script and the second script includes a command for accessing to the sensor device as a result, it has a receiving unit for receiving the correction factor and measurement data of the sensor device, respectively, and a data processing unit for correcting the measurement data based on the correction coefficient.
本明細書に記載の制御システムは、センサデバイスに接続される制御装置と、前記制御装置と通信するデータ処理装置とを有し、前記制御装置は、前記センサデバイスにアクセスするコマンドを含む第1スクリプト及び第2スクリプトを記憶する記憶部と、前記第1スクリプトを実行し、該実行結果として、前記センサデバイスの補正係数を取得し、前記第2スクリプトを実行し、該実行結果として、前記センサデバイスの測定データを取得する制御部と、前記データ処理装置に前記補正係数及び前記測定データを送信する送信部とを有し、前記データ処理装置は、前記制御装置から前記第1スクリプト及び前記第2スクリプトの実行結果として、前記補正係数及び前記測定データをそれぞれ受信する受信部と、前記補正係数に基づき前記測定データの補正を行うデータ処理部とを有する。
The control system described in the present specification includes a control device connected to a sensor device and a data processing device communicating with the control device, and the control device includes a first command including a command for accessing the sensor device . A storage unit for storing a script and a second script ; and executing the first script, obtaining a correction coefficient of the sensor device as the execution result , executing the second script, and executing the second script as the execution result. a control unit for acquiring the measurement data of the device, and a transmission unit that transmits the correction coefficient and the measured data to the data processing device, the data processing apparatus, the first script from the control device and the first as 2 result of the script execution, a receiver for receiving the correction factor and the measurement data, respectively, the measurement based on the correction factor And a data processing unit for correcting the data.
本明細書に記載の制御方法は、接続先のセンサデバイスにアクセスするコマンドを含む第1スクリプト及び第2スクリプトを実行する工程と、前記第1スクリプトの実行結果として、前記センサデバイスの補正係数を取得し、前記第2スクリプトの実行結果として、前記センサデバイスの測定データを取得する工程と、前記補正係数に基づき前記測定データの補正を行うデータ処理装置に、前記補正係数及び前記測定データを送信する工程とを、コンピュータが実行する方法である。
The control method described in the present specification includes a step of executing a first script and a second script including a command for accessing a connected sensor device , and a correction coefficient of the sensor device as an execution result of the first script. Acquiring and transmitting the correction coefficient and the measurement data to a data processing apparatus that acquires the measurement data of the sensor device as the execution result of the second script and corrects the measurement data based on the correction coefficient Is a method in which a computer executes the step of performing.
本明細書に記載のデータ処理方法は、センサデバイスに接続される制御装置から、前記センサデバイスにアクセスするコマンドを含む第1スクリプト及び第2スクリプトの実行結果として、前記センサデバイスの補正係数及び測定データをそれぞれ受信する工程と、前記補正係数に基づき前記測定データの補正を行う工程とを、コンピュータが実行する方法である。
The data processing methods described herein, the control device connected to the sensor device, as a result of the execution of the first script and the second script includes a command to access the sensor device, the correction coefficient of said sensor device and measurement a step of receiving data, respectively, and a step of correcting the measurement data based on the correction coefficient, a method executed by a computer.
本明細書に記載の制御プログラムは、接続先のセンサデバイスにアクセスするコマンドを含む第1スクリプト及び第2スクリプトを実行し、前記第1スクリプトの実行結果として、前記センサデバイスの補正係数を取得し、前記第2スクリプトの実行結果として、前記センサデバイスの測定データを取得し、前記補正係数に基づき前記測定データの補正を行うデータ処理装置に、前記補正係数及び前記測定データを送信する、処理をコンピュータに実行させるプログラムである。
The control program described in the present specification executes a first script and a second script including a command for accessing a connected sensor device , and acquires a correction coefficient of the sensor device as an execution result of the first script. The process of acquiring the measurement data of the sensor device as the execution result of the second script and transmitting the correction coefficient and the measurement data to a data processing apparatus that corrects the measurement data based on the correction coefficient. A program to be executed by a computer.
本明細書に記載のデータ処理プログラムは、センサデバイスに接続される制御装置から、前記センサデバイスにアクセスするコマンドを含む第1スクリプト及び第2スクリプトの実行結果として、前記センサデバイスの補正係数及び測定データをそれぞれ受信し、前記補正係数に基づき前記測定データの補正を行う、処理をコンピュータに実行させるプログラムである。
Data processing programs described herein, a control device connected to the sensor device, as a result of executing the first script and the second script includes a command to access the sensor device, the correction coefficient of said sensor device And measurement data are received, and the measurement data is corrected based on the correction coefficient .
制御処理及び通信処理の負荷を低減することができる。 The load of control processing and communication processing can be reduced.
図1は、制御システムの一例を示す構成図である。制御システムは、データ処理装置の一例であるパーソナルコンピュータ(PC: Personal Computer)3と、センサ装置4とを有する。センサ装置4は、制御装置の一例である制御ユニット1と、その制御対象装置の一例であるセンサユニット2とを有する。
FIG. 1 is a configuration diagram illustrating an example of a control system. The control system includes a personal computer (PC) 3 that is an example of a data processing device and a
本例では、制御ユニット1の制御対象装置として、センサデバイス20が実装されたセンサユニット2を挙げるが、これに限定されず、他の用途の機器であってもよい。センサデバイス20としては、例えば温湿度計、気圧計、9軸加速度計などが挙げられるが、限定はない。
In this example, the
PC3と制御ユニット1は、例えば無線LAN(Local Area Network)などにより無線通信を行うが、これに限定されず、LANケーブルなどを介した有線通信を行ってもよい。制御ユニット1は、例えばマイクロコンピュータであり、ケーブル9を介しセンサユニット2と接続されている。制御ユニット1とセンサユニット2の間では、例えばI2Cのインターフェースに従い、バスを介したデータの入出力が行われる。
The PC 3 and the
また、図1には、PC3及び制御ユニット1の動作の流れが示されている。PC3は、制御ユニット1に、センサデバイス20のデバイスドライバを記述したスクリプトを送信する(符号SQ1)。スクリプトを用いると、マイクロコンピュータの種類によらず、開発環境や特別なツールを必要とせずに、簡単にデバイスドライバを更新することができる。スクリプトは、ユーザがPC3により作成したものであってもよいし、他の装置により作成されてPC3に保存されたものであってもよい。
FIG. 1 shows the flow of operations of the
スクリプトは、符号dで示されるように、例えば、インデックス(#1,#2,#3,・・・)が付与されたコマンド列、書き込みデータ列、及び処理データ列から構成されている。インデックスは、一例として、時系列に従い増加する数字で表される。 As indicated by the symbol d, the script is composed of, for example, a command sequence to which indexes (# 1, # 2, # 3,...) Are assigned, a write data sequence, and a processing data sequence. As an example, the index is represented by a number that increases with time.
コマンド列には、インデックス単位のコマンドCMDが並んでいる。書き込みデータ列には、インデックス単位の書き込みデータW_DTが並び、処理データ列には、インデックス単位の処理データP_DTが並んでいる。 In the command string, commands CMD in index units are arranged. In the write data string, index-based write data W_DT is arranged, and in the process data string, index-unit processed data P_DT is arranged.
コマンドCMDは、制御ユニット1がセンサデバイス20に対し実行する処理を示す。書き込みデータW_DTタは、センサデバイス20に対して書き込まれるデータである。処理データP_DTは、センサデバイス20から読み出したデータを加工してフラグチェックするためのデータである。
The command CMD indicates processing executed by the
コマンド列には、例えばセンサデバイス20にアクセスするコマンドCMDが含まれる。コマンド列で実行される処理としては、例えば、センサデバイス20に対するデータの書き込み及び読み出し、センサデバイス20からデータを読み出した後、加工してセンサデバイス20に書き込む処理(以下、「ReadModifyWrite処理」と表記)、及び待機処理などが挙げられる。
The command string includes a command CMD for accessing the
ReadModifyWrite処理は、例えば、センサデバイス20の動作モードや測定レンジなどの設定変更に用いられる。また、待機処理は、センサデバイス20に測定の開始を指示した後、測定データが読み出し可能となるまで待つ場合に用いられる。待機処理には、センサデバイス20に応じた時間だけ待機したり、センサデバイス20の特定のフラグが立つまでフラグチェックを繰り返したり、データの読み出し要求に対する許可応答が得られるまでその要求を繰り返す処理が含まれる。すなわち、待機処理は、センサデバイス20の応答を待つコマンドCMDにより実現される。
The ReadModifyWrite process is used, for example, to change settings such as the operation mode and measurement range of the
上記の処理のため、様々なコマンドCMDが用いられる。例えば、センサデバイス20に対するデータの書き込み、読み出し、読み出したデータの加工及びフラグチェック、指定時間の待機、分岐処理、条件付き分岐処理、及びスクリプトの実行終了を示すコマンドCMDが用いられる。もっとも、上記以外でも、スクリプトの実行を効率化するコマンドCMDや、センサデバイス20の規格に関して必要なコマンドCMDが用いられてもよい。
Various commands CMD are used for the above processing. For example, the command CMD indicating the writing of data to the
制御ユニット1は、PC3からスクリプトを受信するとROMに格納する。制御ユニット1は、所定のイベントが発生すると、スクリプトを実行する(符号SQ2参照)。これにより、制御ユニット1とセンサデバイス20の間でデータが入出力される。
When receiving the script from the
制御ユニット1は、スクリプトの実行結果として、センサデバイス20から測定データを取得し(符号SQ3)、PC3に送信する(符号SQ4)。PC3は、制御ユニット1から測定データを受信すると、測定データの換算や補正などのデータ処理を行う(符号SQ5)。PC3は、その処理済みデータを、所定のアプリケーションを用いてディスプレイなどに表示したり、解析したりする(符号SQ6)。なお、本例において、制御ユニット1へのスクリプトの送信と測定データのデータ処理は同一のPC3で行われるが、別々のPC3で行われてもよい。また、PC3に代えて、スマートフォンや、後述するようにサーバが用いられてもよい。
The
このように、制御ユニット1は、センサデバイス20にアクセスするコマンドを含むスクリプトを記憶して実行し、その実行結果として測定データをPC3に送信する。PC3は、測定データの換算や補正などのデータ処理を行う。
As described above, the
したがって、制御ユニット1は、測定データのデータ処理を行う必要がないため、スクリプトにより実行する制御処理が限定され、スクリプトが単純化される。したがって、制御ユニット1は、制御処理の負荷が低減される。
Therefore, since the
また、PC3は、制御ユニット1から測定データを受信してデータ処理を行うが、センサデバイス20へのアクセスは、スクリプトを実行する制御ユニット1により行われる。このため、PC3は、センサデバイス20に対するデータの書き込み及び読み出しのコマンドを制御ユニット1に送信する必要が無いため、コマンド送信を行う場合と比較すると、PC3と制御ユニット1の間の通信の頻度が低減される。したがって、制御ユニット1は、PC3との通信処理の負荷が低減される。
The
さらに、スクリプトには、上述したように、待機処理のコマンドやReadModifyWrite処理のコマンドを含まれるため、制御ユニット1は、PC3との通信処理の負荷が効果的に低減される。
Further, as described above, since the script includes a standby process command and a ReadModifyWrite process command, the
図2は、制御ユニット1の一例を示す構成図である。制御ユニット1は、CPU(Central Processing Unit)10、ROM(Read Only Memory)11、RAM(Random Access Memory)12、通信モジュール14、及びハードウェアインターフェース(ハードウェアINF)部15を有する。CPU10は、互いに信号の入出力ができるように、ROM11、RAM12、通信モジュール14、及びハードウェアINF部15と、バス19を介して接続されている。
FIG. 2 is a configuration diagram illustrating an example of the
通信モジュール14は、例えば無線LANカードであり、PC3とリンクして無線通信を行う。ハードウェアINF部15は、ケーブルを介してセンサデバイス20と接続され、センサデバイス20との間でデータの入出力を行う。
The communication module 14 is a wireless LAN card, for example, and performs wireless communication by linking with the
ROM11は、CPU10を駆動するプログラムが格納されている。RAM12は、CPU10のワーキングメモリとして機能する。
The ROM 11 stores a program for driving the
ROM11は、記憶部の一例であり、制御プログラム110、スクリプト処理プログラム111、通信ドライバ112、及びスクリプト113を記憶する。制御プログラム110、スクリプト処理プログラム111、及び通信ドライバ112は、センサデバイス20の制御方法を実行する制御プログラムの一例である。
The ROM 11 is an example of a storage unit, and stores a
制御プログラム110は、制御ユニット1の動作を制御するものである。スクリプト処理プログラム111は、ROM11内のスクリプト113をバイナリー形式のコードに解釈して処理するものである。通信ドライバ112は、通信モジュール14による通信を制御するものである。スクリプト113は、PC3から送信されたものである。
The
CPU10は、ROM11からプログラムを読み込むと、機能として、通信処理部100、スクリプト処理部102、及び制御部103が形成される。通信処理部100はROM11内の通信ドライバ112に対応し、スクリプト処理部102はROM11内のスクリプト処理プログラム111に対応する。また、制御部103はROM11内の制御プログラム110に対応する。スクリプト処理部102及び通信処理部100は、制御部103の制御下で動作する。
When the
通信処理部100は、PC3から通信モジュール14を介してスクリプト113を受信すると、制御部103に転送する。制御部103は、スクリプト113をROM11に格納する。ROM11内のスクリプト113は、その種類に応じた領域に格納される。
When receiving the script 113 from the
符号113aは、ROM11内のスクリプト113の格納領域の構成を示す。スクリプト113の格納領域は、初期化スクリプトが格納される初期化スクリプト格納領域、センシングスクリプトが格納される格納領域、及び任意実行スクリプトが格納される任意実行スクリプト格納領域に分かれる。各格納領域には、図1に示されたコマンドCMD、書き込みデータW_DT、及び処理データP_DTの組が書き込まれている。
初期化スクリプトは、センサ装置4の起動時にセンサデバイス20の初期設定などを実行するものである。初期化スクリプト格納領域の先頭は、一例として、ROM11内のオフセットアドレス+0xAAに設定されている。このため、スクリプト処理部102は、初期化スクリプトを実行するとき、オフセットアドレス+0xAAからスクリプト113の読み出しを開始する。
The initialization script executes initial setting of the
センシングスクリプトは、センサデバイス20に測定を指示し、センサデバイス20から測定データを取得するものである。センシングスクリプト格納領域の先頭は、一例として、ROM11内のオフセットアドレス+0xBBに設定されている。このため、スクリプト処理部102は、センシングスクリプトを実行するとき、オフセットアドレス+0xBBからスクリプト113の読み出しを開始する。
The sensing script instructs the
任意実行スクリプトは、PC3からの指示に基づき任意のタイミングで実行されるものである。任意実行スクリプトにより実行される処理としては、例えば、センサデバイス20の固有の補正情報を取得するキャリブレーション処理が挙げられるが、これに限定されない。任意実行スクリプトにより実行される処理は複数種類があってもよく、この場合、ROM11内の格納領域は個別に設けられる。
The arbitrary execution script is executed at an arbitrary timing based on an instruction from the
任意実行スクリプト格納領域の先頭は、一例として、ROM11内のオフセットアドレス+0xCCに設定されている。このため、スクリプト処理部102は、任意実行スクリプトを実行するとき、オフセットアドレス+0xCCからスクリプト113の読み出しを開始する。
As an example, the head of the arbitrary execution script storage area is set to offset address + 0xCC in the ROM 11. Therefore, the
このように、スクリプト113は、その用途に応じた種類ごとにROM11内の格納領域に格納される。このため、PC3は、スクリプト113を送信する場合、制御ユニット1に対しAPI経由でスクリプト113の種類を指定する。
Thus, the script 113 is stored in the storage area in the ROM 11 for each type according to its use. Therefore, when transmitting the script 113, the
図3には、APIコマンドの一例が示されている。APIコマンドの「SendScript」は、PC3から制御ユニット1にスクリプト113を送信するものである。「SendScript」の引数には、カテゴリ、タイプ、サイズ、及びデータが含まれる。
FIG. 3 shows an example of the API command. The API command “SendScript” is used to transmit the script 113 from the
カテゴリは、初期化スクリプト、センシングスクリプト、及び任意実行スクリプトのうち、送信対象のスクリプト113の種類を指定する。なお、任意実行スクリプトは、1種類に限定されず、複数種類があってもよい。タイプは、コマンドCMD、書き込みデータW_DT、及び処理データP_DTのうち、送信対象のものを指定する。サイズはデータのサイズを示し、データはコマンドCMD、書き込みデータW_DT、及び処理データP_DTの何れかである。 The category specifies the type of the script 113 to be transmitted among the initialization script, the sensing script, and the arbitrary execution script. The arbitrary execution script is not limited to one type, and there may be a plurality of types. The type specifies a transmission target among the command CMD, the write data W_DT, and the processing data P_DT. The size indicates the size of the data, and the data is any one of command CMD, write data W_DT, and processing data P_DT.
なお、APIコマンドの「RunScript」は、任意実行スクリプトの実行を指示するものである。複数種類の任意実行スクリプトが存在する場合、識別情報により実行対象の任意実行スクリプトの種類を指定することができる。 The API command “RunScript” instructs execution of an arbitrary execution script. When there are a plurality of types of arbitrary execution scripts, the type of arbitrary execution script to be executed can be specified by the identification information.
再び図2を参照すると、制御部103は、PC3から受信したスクリプト113の種類をAPIコマンドにより識別し、その種類に応じたROM11内の格納領域にスクリプト113を格納する。制御部103は、スクリプト113を実行するイベントを検出すると、スクリプト処理部102に実行対象のスクリプト113の実行を指示する。
Referring to FIG. 2 again, the
スクリプト処理部102は、スクリプト113の実行の指示を受けると、ROM11内の該当する格納領域からスクリプト113を読み出し、バイナリー形式のコードに解釈して実行する。スクリプト処理部102は、センシングスクリプトの場合、ハードウェアINF部15を介してセンサデバイス20に対しデータの書き込み及び読み出しを行う。また、センシングスクリプトには、単なる読み書きのコマンドだけではなく、上述したように、待機処理のコマンド及びReadModifyWrite処理のコマンドも含まれる。
When the
スクリプト処理部102は、センシングスクリプトを実行すると、その実行結果として、センサデバイス20からハードウェアINF部15を介して測定データが入力される。スクリプト処理部102は、センサデバイス20から読み出した測定データなどのデータを格納するための読み込みバッファ120をRAM12内に確保する。
When the
スクリプト処理部102が、スクリプトの終了を示す終了コマンドを実行すると、制御部103は、読み込みバッファ120に格納されたデータを読み出し、通信処理部100に出力する。通信処理部100は、通信モジュール14を介してデータをPC3に送信する。
When the
なお、読み込みバッファ120のサイズは、スクリプト処理部102が必要分を算出してスクリプト情報に追加することで設定してもよいし、制御部103が予め規定された最大容量分をRAM12に確保してもよい。最大容量分の読み込みバッファ120を確保する場合、制御部103は、最大容量を超えるデータが読み出されたとき、スクリプト113の実行を停止するか、あるいはデータの読み捨てを行う。
Note that the size of the read
また、制御部103は、RAM12内にワークエリア121、インデックスデータ領域122、及び補助データ領域123を確保する。ワークエリア121は、スクリプト113の実行時にワーク領域であり、インデックスデータ領域122は、コマンドのインデックスを示すデータの格納領域であり、補助データ領域123は、コマンド実行時の補助的なデータの格納領域である。
In addition, the
センサデバイス20により測定を行う場合、制御部103は、スクリプト処理部102によりセンシングスクリプトを実行し、その実行結果として測定データを読み込みバッファ120から取得する。通信処理部100は、送信部の一例であり、測定データをPC3に送信する。
When the measurement is performed by the
PC3は、上述したように、測定データのデータ処理を行うため、制御ユニット1には、データ処理を実行するスクリプトを用意する必要がない。
As described above, since the
図4は、PC3の一例を示す構成図である。PC3は、CPU30、ROM31、RAM32、HDD(Hard Disk Drive)33、通信モジュール34、入力装置35、及び出力装置36を有する。CPU30は、互いに信号の入出力ができるように、ROM31、RAM32、HDD33、通信モジュール34、入力装置35、及び出力装置36と、バス39を介して接続されている。
FIG. 4 is a configuration diagram illustrating an example of the
ROM31は、CPU30を駆動するプログラムが格納されている。プログラムには、PC3を動作させるOS(Operating System)に加えて、センサ装置4の測定データのデータ処理を行うデータ処理方法を実行するデータ処理プログラムが含まれる。RAM32は、CPU30のワーキングメモリとして機能する。通信モジュール34は、例えば無線LANカードであり、制御ユニット1とリンクして無線通信を行う。
The
入力装置35は、PC3に情報を入力する装置である。入力装置35としては、例えばキーボード、マウス、及びタッチパネルなどが挙げられる。入力装置35は、入力された情報を、バス39を介しCPU30に出力する。
The
出力装置36は、PC3の情報を出力する装置である。出力装置36としては、例えばディスプレイ、タッチパネル、及びプリンタなどが挙げられる。出力装置36は、CPU30からバス39を介して情報を取得して出力する。
The
CPU30は、ROM31からプログラムを読み込むと、機能として、管理部300、通信処理部301、データ処理部302、及びアプリケーション(APL)部303が形成される。また、HDD33には、スクリプト330、キャリブレーションデータ331、及び測定データ332が格納される。
When the
管理部300はセンサ装置4を管理する。通信処理部301、データ処理部302、及びAPL部303は、管理部300の制御下において動作する。
The
通信処理部301は、通信モジュール34を制御する。通信処理部301は、管理部300の指示に従いセンサ装置4の制御ユニット1に対する通信を行う。
The
管理部300は、スクリプトの実行に先立ち、HDD33に格納されたスクリプト330を読み出し制御ユニット1に送信する。このとき、通信処理部301は、送信部の一例として、例えば、スクリプト330を、通信モジュール34を介し制御ユニット1に送信する。スクリプト330の送信は、例えば、図3に示された「SendScript」のようなAPIコマンドにより行われる。
Prior to execution of the script, the
管理部300は制御ユニット1に対し各種のスクリプトの実行を指示する。実行指示は、例えば、図3に示された「RunScript」のようなAPIコマンドにより行われる。
The
より具体的には、管理部300は、任意実行スクリプト及びセンシングスクリプトの実行を指示する。なお、初期化スクリプトの実行は、管理部300の指示とは無関係に制御ユニット1の起動時に実行される。
More specifically, the
任意実行スクリプトは、例えばキャリブレーション処理に用いられる。管理部300は、キャリブレーション処理の任意実行スクリプトの実行を指示した場合、実行結果として、制御ユニット1からキャリブレーションデータ331を取得する。キャリブレーションデータ331には、センサデバイス20の補正係数などが含まれる。管理部300は、取得したキャリブレーションデータ331をHDD33に格納する。
The arbitrary execution script is used for calibration processing, for example. When the
管理部300は、任意実行スクリプトの実行後、センシングスクリプトの実行を指示する。これにより、管理部300は、センシングスクリプトの実行結果として、制御ユニット1から測定データ332を取得してHDD33に格納する。このとき、通信処理部301は、受信部の一例として、通信モジュール34を介し制御ユニット1から測定データ332を受信する。管理部300は、データ処理部302に測定データの処理を指示する。
The
データ処理部302は、管理部300の指示に従い、HDD33から測定データ332を読み出して処理する。データ処理としては、例えば測定データ332の換算処理や補正処理が挙げられるが、これに限定されない。データ処理部302は、例えば、HDD33に格納されたキャリブレーションデータ331に基づきデータ処理を行う。管理部300は、測定データ332のデータ処理の完了後、APL部303に処理を指示する。
The
APL部303は、データ処理部302によりデータ処理された測定データ332の解析や表示を行う。APL部303は、測定データ332の表示を行う場合、測定データ332を所定の形式で出力装置36に出力する。
The
このように、データ処理部302は、制御ユニット1から受信した測定データ332のデータ処理を行う。このため、制御ユニット1は、測定データのデータ処理の負荷が省かれる。また、PC3は、センサデバイス20に対するアクセス、つまりデータの書き込み及び読み出しのコマンドの実行を個別に制御ユニット1に指示することはないので、PC3と制御ユニット1の間の通信処理の負荷が軽減される。これにより、PC3と制御ユニット1の間において、通信の輻輳、処理の遅延、及び消費電力の増加などが防止される。
As described above, the
また、PC3は、データ処理だけでなく、制御ユニット1にスクリプト330を送信する。このため、データ処理用のPC3とは別に、スクリプト330を送信するための機器を設ける必要がなくなり、制御システムの規模を低減することができる。
Further, the
図5は、制御プログラム110の一例を示すフローチャートである。制御プログラム110は、制御ユニット1の起動時に実行される。
FIG. 5 is a flowchart illustrating an example of the
制御部103は、通信モジュール14を初期化する(ステップSt1)。次に、制御部103は、ROM11内のオフセットアドレス+0xAAを参照して、初期化スクリプトが格納済みであるか否かを判定する(ステップSt2)。制御部103は、初期化スクリプトが格納済みである場合(ステップSt2のYes)、初期化スクリプトを実行する(ステップSt3)。制御部103は、初期化スクリプトが未格納である場合(ステップSt2のNo)、次のステップSt4の処理が実行される。
The
次に、制御部103は、通信モジュール14によりPC3との接続を行う(ステップSt4)。次に、制御部103は、PC3からスクリプトを受信したか否かを判定する(ステップSt5)。制御部103は、スクリプトを受信した場合(ステップSt5のYes)、スクリプトをROM11に格納する(ステップSt10)。スクリプトが未受信である場合(ステップSt5のNo)、次にステップSt6の処理が実行される。
Next, the
次に、制御部103は、イベントの発生に備えて待機処理を実行する(ステップSt6)。イベントとは、例えば、PC3からのセンシングスクリプトまたは任意実行スクリプトの実行指示、あるいはスクリプトの受信である。また、センシングスクリプトについては、制御ユニット1が周期的に自発的に実行イベントを発生させてもよい。
Next, the
制御部103は、センシングスクリプトの実行指示の受信、つまりセンシングイベントが発生した場合(ステップSt7のYes)、ROM11内のオフセットアドレス+0xBBを参照して、センシングスクリプトが格納済みであるか否かを判定する(ステップSt8)。制御部103は、センシングスクリプトが格納済みである場合(ステップSt8のYes)、センシングスクリプトを実行する(ステップSt9)。制御部103は、センシングスクリプトが未格納である場合(ステップSt8のNo)、再度ステップSt5の処理が実行される。
When receiving the sensing script execution instruction, that is, when a sensing event occurs (Yes in step St7), the
また、センシングイベントが未発生である場合(ステップSt7のNo)、制御部103は、任意実行イベントの発生の有無を判定する(ステップSt11)。任意実行イベントとは、例えば、PC3からキャリブレーション処理の任意実行スクリプトの実行指示である。任意実行イベントが未発生である場合(ステップSt11のNo)、再度ステップSt5の処理が実行される。
If no sensing event has occurred (No in step St7), the
制御部103は、任意実行イベントが発生した場合(ステップSt11のYes)、ROM11内のオフセットアドレス+0xCCを参照して、任意実行スクリプトが格納済みであるか否かを判定する(ステップSt12)。制御部103は、任意実行スクリプトが格納済みである場合(ステップSt12のYes)、任意実行スクリプトを実行する(ステップSt13)。その後、再度ステップSt5の処理が実行される。制御部103は、任意実行スクリプトが未格納である場合(ステップSt12のNo)、再度ステップSt5の処理が実行される。このようにして、制御プログラム110は動作する。
When the arbitrary execution event occurs (Yes in step St11), the
図6は、スクリプト処理プログラム111の一例を示すフローチャートである。スクリプト処理プログラム111は、起動時の初期化、または上記のイベントの発生時に実行される。
FIG. 6 is a flowchart illustrating an example of the
スクリプト処理部102は、変数i(=0,1,2,・・・)を0にセットする(ステップSt21)。次に、スクリプト処理部102は、該当するスクリプトのインデックス#iのコマンドCMDを取得する(ステップSt22)。次に、スクリプト処理部102は、取得したコマンドCMDが終了コマンドであるか否かを判定する(ステップSt23)。スクリプト処理部102は、取得したコマンドCMDが終了コマンドである場合(ステップSt23のYes)、処理を終了する。
The
スクリプト処理部102は、取得したコマンドCMDが終了コマンドではない場合(ステップSt23のNo)、コマンドCMDを実行する(ステップSt24)。次に、スクリプト処理部102は、取得したコマンドCMDが分岐コマンドであるか否かを判定する(ステップSt25)。
If the acquired command CMD is not an end command (No in step St23), the
スクリプト処理部102は、取得したコマンドCMDが分岐コマンドである場合(ステップSt25のYes)、変数iに1を加算する(ステップSt26)。その後、再度ステップSt22の処理が実行される。
If the acquired command CMD is a branch command (Yes in step St25), the
スクリプト処理部102は、取得したコマンドCMDが分岐コマンドではない場合(ステップSt25のNo)、再度ステップSt22の処理を実行する。このようにして、スクリプト処理プログラム111は実行される。
If the acquired command CMD is not a branch command (No in step St25), the
図7は、起動処理の一例を示すシーケンス図である。まず、PC3が起動し(符号SQ101)、制御ユニット1が起動する(符号SQ201)。このとき、制御ユニット1は、ROM11にスクリプトが格納されていないため、初期化スクリプトを実行することができない。次に、PC3と制御ユニット1は、各々の通信モジュール14,34により接続される。
FIG. 7 is a sequence diagram illustrating an example of the startup process. First, the
次に、PC3の管理部300は、HDD33に格納されたスクリプトを読み出して、通信処理部301により制御ユニット1に送信する(符号SQ102)。制御ユニット1は、スクリプトを受信してROM11に格納する(符号SQ202)。このとき、制御ユニット1は、「SendScript」コマンドの引数「カテゴリ」からスクリプトの種類を識別し、スクリプトの種類に応じたROM11内の格納領域にスクリプトを格納する。
Next, the
次に、PC3は、制御ユニット1に再起動を指示する(符号SQ103)。制御ユニット1は、再起動の指示を受けて再起動する(符号SQ203)。
Next, the
次に、制御ユニット1の制御部103は、スクリプト処理部102により初期化スクリプトを実行する(符号SQ204)。なお、センサ装置4にセンサデバイス20が複数設けられている場合でも、1つの初期化スクリプトにより複数のセンサデバイス20を初期化する。初期化スクリプトは、制御ユニット1の起動時に自動的に実行される。
Next, the
スクリプト処理部102は、センサデバイス20に対し読み出しコマンドを発行する(符号SC1)。センサデバイス20は、読み出しコマンドに応じてデータを読み出す(符号SQ301)。スクリプト処理部102は、制御ユニット1から入力されたデータを取得する(符号SC2)。次に、スクリプト処理部102は、読み出したデータの内容(例えばフラグ設定)を変更する(符号SC3)。
The
次に、スクリプト処理部102は、センサデバイス20に対し書き込みコマンドを発行する(符号SC4)。次に、スクリプト処理部102は、変更したデータをセンサデバイス20に出力する(符号SC5)。センサデバイス20は、スクリプト処理部102から入力されたデータの書き込みを行う(符号SQ302)。次に、スクリプト処理部102は、終了コマンドを発行する(符号SC6)。
Next, the
制御ユニット1は、初期化スクリプトの実行後、PC3と接続する。このようにして、起動処理は実行される。
The
図8は、キャリブレーション処理の一例を示すシーケンス図である。PC3の管理部300は、起動処理の実行後、制御ユニット1に対しキャリブレーション処理を指示する(符号SQ111)。センサデバイス20は、出荷時のキャリブレーションの結果から得られた補正係数が書き込まれている。このため、PC3は、測定データの補正処理のために、補正係数を予め取得する。
FIG. 8 is a sequence diagram illustrating an example of the calibration process. After executing the startup process, the
制御ユニット1は、イベントの待機処理を実行中(符号SQ211)、PC3からキャリブレーション処理の指示を受けると、任意実行イベントを検出する(符号SQ212)。次に、制御ユニット1の制御部103は、スクリプト処理部102により任意実行スクリプトを実行する(符号SQ213)。なお、センサ装置4に複数のセンサデバイス20が設けられる場合、例えばIDなどにより任意実行スクリプトの実行対象となるセンサデバイス20を指定することもできる。
When the
スクリプト処理部102は、センサデバイス20に対し補正係数要求コマンドを発行する(符号SC11)。センサデバイス20は、補正係数要求コマンドに応じ補正係数を読み出す(符号SQ311)。スクリプト処理部102は、センサデバイス20から補正係数が入力される(符号SC12)。次に、スクリプト処理部102は、終了コマンドを発行する(符号SC13)。
The
次に、制御ユニット1は、任意実行スクリプトの実行結果として、補正係数をPC3に送信する(符号SQ214)。その後、制御ユニット1は、イベントの待機処理を行う(符号SQ215)。
Next, the
PC3の管理部300は、制御ユニット1から補正係数を受信する(符号SQ112)。次に、管理部300は、補正係数をキャリブレーションデータ331としてHDD33に格納する(符号SQ113)。このようにして、キャリブレーション処理は実行される。
The
図9は、測定処理の一例を示すシーケンス図である。PC3の管理部300は、キャリブレーション処理の実行後、制御ユニット1に対し測定処理を指示する(符号SQ121)。
FIG. 9 is a sequence diagram illustrating an example of the measurement process. After executing the calibration process, the
制御ユニット1は、イベントの待機処理を実行中(符号SQ221)、PC3から測定処理の指示を受けると、センシングイベントを検出する(符号SQ222)。次に、制御ユニット1の制御部103は、スクリプト処理部102によりセンシングスクリプトを実行する(符号SQ223)。なお、センサ装置4に複数のセンサデバイス20が設けられる場合、例えばIDなどによりセンシングスクリプトの実行対象となるセンサデバイス20を指定することもできる。
When the
スクリプト処理部102は、センサデバイス20に対し、測定開始を指示する測定開コマンドを発行する(符号SC21)。センサデバイス20は、測定開始コマンドに応じて測定を行う(符号SQ321)。
The
スクリプト処理部102は、測定開始コマンドの発行後、所定時間(例えば10(ms))だけ待機する(符号SC22)。この待機時間は、センサデバイス20の測定データが読み出し可能となるまでの時間に基づき決定される。
After issuing the measurement start command, the
次に、スクリプト処理部102は、センサデバイス20に対し測定データ要求コマンドを発行する(符号SC23)。センサデバイス20は、測定データ要求コマンドに応じて測定データを読み出す(符号SQ321)。センサデバイス20は、一例として、測定データ#1,#2を読み出して制御ユニット1に出力する。
Next, the
スクリプト処理部102は、測定データ#1が入力され(符号SC24)、測定データ#2が入力される(符号SC25)。次に、スクリプト処理部102は、終了コマンドを発行する(符号SC26)。
The
次に、制御部103は、測定データ#1、#2をRAM12内の読み込みバッファ120に格納する(符号SQ223a)。すなわち、制御部103は、センシングスクリプトを実行結果として、測定データ#1、#2を取得する。
Next, the
制御ユニット1は、通信モジュール14によりRAM12内の測定データ#1,#2をPC3に送信する(符号SQ224)。その後、制御ユニット1の制御部103は、イベントの待機処理を行う(符号SQ225)。
The
また、PC3は、通信モジュール34により、制御ユニット1から測定データ#1、#2を受信する(符号SQ122)。次に、PC3は、データ処理部302により測定データ#1,#2のデータ処理を行う(符号SQ123)。このようにして、測定処理は実行される。
Further, the
このように、制御ユニット1は、センサデバイス20へアクセスするコマンドを含むセンシングスクリプトを実行し、その実行結果として、測定データ#1、#2を取得する。PC3は、測定データ#1、#2を受信して、測定データ#1、#2の受信処理を行う。
As described above, the
このため、PC3はセンサデバイス20にアクセスする必要がないので、PC3と制御ユニット1の間の通信処理の負荷が低減される。仮に、PC3が、センサデバイス20に対するデータの書き込み及び読み出しの個別のコマンドを発行した場合、以下の比較例のように、PC3と制御ユニット1の間の通信処理の負荷が増加する。
For this reason, since it is not necessary for the
図10は、測定処理の比較例を示すシーケンス図である。PC3は、測定開始コマンドを制御ユニット1に送信する(符号SQ121a)。制御ユニット1は、測定開始コマンドをセンサデバイス20に転送する。センサデバイス20は、測定開始コマンドに応じて測定を行う(符号SQ321a)。
FIG. 10 is a sequence diagram illustrating a comparative example of measurement processing. The
PC3は、測定開始コマンドの発行後、所定時間だけ待機して、センサデバイス20に対する測定データ要求コマンドを制御ユニット1に送信する(符号SQ122a)。制御ユニット1は、測定データ要求コマンドをセンサデバイス20に転送する。センサデバイス20は、測定データ要求コマンドに応じて測定データ#1、#2を読み出す(符号SQ322a)。センサデバイス20は、測定データ#1、#2を制御ユニット1に出力する。
After issuing the measurement start command, the
次に、制御ユニット1は、測定データ#1、#2をPC3に送信する。PC3は、制御ユニット1から測定データ#1、#2を受信する(符号SQ123a)。PC3は、測定データ#1、#2のデータ処理を行う(符号SQ124a)。
Next, the
このように、比較例において、PC3は、測定開始コマンド及び測定データ要求コマンドを個別に制御ユニット1に送信する。このため、PC3と制御ユニット1の通信頻度が、実施例の場合より増加する。
Thus, in the comparative example, the
これにより、PC3と制御ユニット1の消費電力が増加する。とりわけ、PC3と制御ユニット1が無線通信する場合、通信モジュール14,34の消費電力は、有線通信の場合と比べると、増加量が大きい。また、消費電力の増加は、制御ユニット1が内蔵バッテリにより駆動される場合、駆動時間を大きく低下させる。
Thereby, the power consumption of PC3 and the
また、通信頻度が増加すると、通信の遅延の影響も問題となる。このため、例えば、2つのコマンドの送信の時間間隔が規定されている場合、その規定時間が順守されない場合がある。図10の例において、測定開始コマンドと測定データ要求コマンドの送信間隔が10(ms)に規定されている場合、PC3が、測定開始コマンドを送信して10(ms)後に測定データ要求コマンドを送信しても、センサデバイス20に対する測定開始コマンド及び測定データ要求コマンドの送信間隔は10(ms)となる保証は無い。
Further, when the communication frequency increases, the influence of communication delay becomes a problem. For this reason, for example, when a time interval between two command transmissions is specified, the specified time may not be observed. In the example of FIG. 10, when the transmission interval between the measurement start command and the measurement data request command is defined as 10 (ms), the
また、無線通信の場合、通信エラーが、有線通信の場合より多く発生するため、PC3及び制御ユニット1に通信エラー発生時の対応処理が必要となる。とりわけ、制御系のコマンドの送信エラーが発生した場合、通信エラーの対応処理を行うことなく、処理が進んでしまうと、センサデバイス20が、復旧が不可能な想定外の状態に遷移することが考え得る。このような状態遷移は、通信の遅延により、本来の順序とは異なる順序でコマンドが実行された場合も起こり得る。
Further, in the case of wireless communication, more communication errors occur than in the case of wired communication, and therefore, the
これに対し、制御ユニット1が、PC3からコマンドを受信するたびに応答を返信すれば、確実に所定のシーケンスでコマンドが実行されるため、上記のような状態遷移を防止することができる。しかし、この場合、応答の返信により通信頻度が増加するだけでなく、応答自体の通信エラー及び遅延も考慮する必要が生ずるため、シーケンスが複雑化する。
On the other hand, if the
実施例において、PC3は、制御ユニット1に対しスクリプトの実行指示を送信し、また、制御ユニット1から測定データを受信しているだけであるため、通信エラーが発生しても、指示や測定データが受信されないに留まり、センサデバイス20の制御自体には影響が生じない。さらに、指示や測定データは、通信エラーで未受信となっても、再送信処理により確実に受信することが可能である。なお、制御ユニット1とセンサデバイス20の間は、ケーブルを介した有線通信が行われるが、PC3と制御ユニット1の間の通信と比べると、短距離の通信であるうえ、通信速度も遅いため、通信エラー、消費電力、及び遅延の影響は極めて小さい。
In the embodiment, since the
また、以下の実施例のように、制御ユニット1が、自律的にセンシングスクリプトを周期的に実行する場合、図9の例より通信処理の負荷を低減できる。
Moreover, when the
図11は、測定処理の他例を示すシーケンス図である。図11において、図9と共通する処理については同一の符号を付し、その説明を省略する。 FIG. 11 is a sequence diagram illustrating another example of the measurement process. In FIG. 11, processes that are the same as those in FIG.
制御ユニット1は、イベントの待機中(符号SQ221)、PC3から測定開始の指示を受けると、測定周期タイマをスタートさせる(符号SQ221a)。測定周期タイマは、例えば制御部103内に形成され、所定の測定周期をカウントする。制御部103は、イベントとして、測定周期の到来を検出する。
When the
制御ユニット1は、測定周期の到来のイベントを検出すると(符号SQ221b)、センシングスクリプトを実行する(符号SQ223)。なお、センシングスクリプトの処理内容は、上述した通りである。制御ユニット1は、測定データ#1、#2をRAM12に格納して(符号SQ223a)、PC3に送信する(符号SQ224)。PC3は、測定データ#1、#2を受信し(符号SQ122)、データ処理を行う(符号SQ123)。
When the
測定周期の到来のイベントは、測定周期の期間Tごとに検出される。このため、制御ユニット1は、PC3から指示を受けることなく、期間Tをおいて測定処理を繰り返し実行することができる。このため、PC3と制御ユニット1の間の通信処理の負荷が低減される。
The arrival event of the measurement cycle is detected every period T of the measurement cycle. For this reason, the
本例において、PC3が、制御ユニット1にスクリプトを送信し、制御ユニット1から測定データを受信したが、これに限定されない。
In this example, the
図12は、制御システムの他例を示す構成図である。制御システムは、サーバ60、ゲートウェイ装置7、及びセンサ装置4を有する。
FIG. 12 is a configuration diagram illustrating another example of the control system. The control system includes a
サーバ60は、データ処理装置の他例であり、インターネットなどのネットワークNWと接続されている。ゲートウェイ装置7は、無線通信を介しセンサ装置4に接続され、また、ネットワークNWに接続されている。ゲートウェイ装置7は、サーバ60とセンサ装置4の間の通信を中継する。
The
サーバ60は、上記のPC3と同一の機能を備える。サーバ60は、ネットワークNWを介し、センサ装置4と通信する。すなわち、サーバ60は、制御ユニット1にスクリプトを送信し、制御ユニット1から測定データを受信してデータ処理する。なお、サーバ60としては、クラウドサーバが挙げられるが、これに限定されない。また、ネットワークNWがインターネットである場合、PC3は、インターネット接続機能を備えるため、ゲートウェイ装置7に代えて、通信の中継に利用することもできる。
The
また、制御ユニット1にスクリプトを送信する機器と、制御ユニット1から測定データを受信してデータ処理する機器とを別々に設けてもよい。
Moreover, you may provide separately the apparatus which transmits a script to the
図13は、制御システムの他例を示す構成図である。図13において、図12と共通する構成については同一の符号を付し、その説明を省略する。 FIG. 13 is a configuration diagram illustrating another example of the control system. In FIG. 13, the same reference numerals are given to configurations common to FIG. 12, and description thereof is omitted.
制御システムは、サーバ61、ゲートウェイ装置7、センサ装置4、及びPC3aを有する。サーバ61は、データ処理装置の他例であり、インターネットなどのネットワークNWと接続されている。また、センサ装置4は、ゲートウェイ装置7またはPC3aと無線通信する。
The control system includes a
PC3aは、上記のPC3と同様に、センサ装置4の制御ユニット1にスクリプトを送信する。センサ装置4は、制御ユニット1がPC3aから受信したスクリプトを格納すると、任意の方法で無線通信の通信相手をPC3aからゲートウェイ装置7に切り替える。
The
サーバ61は、ネットワークNWを介し、センサ装置4にスクリプトの実行を指示する。センサ装置4は、制御ユニット1がスクリプトを実行すると、その実行結果として、測定データをサーバ61に送信する。サーバ61は、PC3と同様に、データ処理装置として、測定データのデータ処理を行う。
The
この構成によると、スクリプトの作成と測定データの処理を異なる拠点で行うことができる。 According to this configuration, script creation and measurement data processing can be performed at different locations.
なお、上述した処理機能は、コンピュータによって実現することができる。その場合、処理装置が有すべき機能の処理内容を記述したプログラムが提供される。そのプログラムをコンピュータで実行することにより、上記処理機能がコンピュータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体(ただし、搬送波は除く)に記録しておくことができる。 Note that the processing functions described above can be realized by a computer. In that case, a program describing the processing contents of the functions that the processing apparatus should have is provided. By executing the program on a computer, the above processing functions are realized on the computer. The program describing the processing contents can be recorded on a computer-readable recording medium (except for a carrier wave).
プログラムを流通させる場合には、例えば、そのプログラムが記録されたDVD(Digital Versatile Disc)、CD−ROM(Compact Disc Read Only Memory)などの可搬型記録媒体の形態で販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することもできる。 When the program is distributed, for example, it is sold in the form of a portable recording medium such as a DVD (Digital Versatile Disc) or a CD-ROM (Compact Disc Read Only Memory) on which the program is recorded. It is also possible to store the program in a storage device of a server computer and transfer the program from the server computer to another computer via a network.
プログラムを実行するコンピュータは、例えば、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する。そして、コンピュータは、自己の記憶装置からプログラムを読み取り、プログラムに従った処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することもできる。また、コンピュータは、サーバコンピュータからプログラムが転送されるごとに、逐次、受け取ったプログラムに従った処理を実行することもできる。 The computer that executes the program stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in its own storage device. Then, the computer reads the program from its own storage device and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. Further, each time the program is transferred from the server computer, the computer can sequentially execute processing according to the received program.
上述した実施形態は本発明の好適な実施の例である。但し、これに限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変形実施可能である。 The above-described embodiment is an example of a preferred embodiment of the present invention. However, the present invention is not limited to this, and various modifications can be made without departing from the scope of the present invention.
1 制御ユニット
2 センサユニット
3,3a パーソナルコンピュータ
4 センサ装置
10,30 CPU
60,61 サーバ
100,301 通信処理部
102 スクリプト処理部
103 制御部
302 データ処理部DESCRIPTION OF
60, 61
Claims (10)
前記センサデバイスにアクセスするコマンドを含む第1スクリプト及び第2スクリプトを記憶する記憶部と、
前記第1スクリプトを実行し、該実行結果として、前記センサデバイスの補正係数を取得し、前記第2スクリプトを実行し、該実行結果として、前記センサデバイスの測定データを取得する制御部と、
前記補正係数に基づき前記測定データの補正を行うデータ処理装置に、前記補正係数及び前記測定データを送信する送信部とを有することを特徴とする制御装置。 In the control device connected to the sensor device ,
A storage unit for storing a first script and a second script including a command for accessing the sensor device ;
A controller that executes the first script, acquires the correction coefficient of the sensor device as the execution result , executes the second script, and acquires the measurement data of the sensor device as the execution result ;
A control apparatus comprising: a data processing device that corrects the measurement data based on the correction coefficient; and a transmission unit that transmits the correction coefficient and the measurement data .
前記制御装置から、前記センサデバイスにアクセスするコマンドを含む第1スクリプト及び第2スクリプトの実行結果として、前記センサデバイスの補正係数及び測定データをそれぞれ受信する受信部と、
前記補正係数に基づき前記測定データの補正を行うデータ処理部とを有することを特徴とするデータ処理装置。 In a data processing device that communicates with a control device connected to a sensor device ,
From the control device, the first script and the execution result of the second script includes a command to access the sensor device, a receiver for receiving a correction factor and measurement data of the sensor device, respectively,
And a data processing unit that corrects the measurement data based on the correction coefficient .
前記第2スクリプトを前記制御装置に送信する送信部とを有することを特徴とする請求項4に記載のデータ処理装置。 A storage unit for storing the second script;
The data processing apparatus according to claim 4, further comprising: a transmission unit configured to transmit the second script to the control apparatus.
前記制御装置と通信するデータ処理装置とを有し、
前記制御装置は、
前記センサデバイスにアクセスするコマンドを含む第1スクリプト及び第2スクリプトを記憶する記憶部と、
前記第1スクリプトを実行し、該実行結果として、前記センサデバイスの補正係数を取得し、前記第2スクリプトを実行し、該実行結果として、前記センサデバイスの測定データを取得する制御部と、
前記データ処理装置に前記補正係数及び前記測定データを送信する送信部とを有し、
前記データ処理装置は、
前記制御装置から前記第1スクリプト及び前記第2スクリプトの実行結果として、前記補正係数及び前記測定データをそれぞれ受信する受信部と、
前記補正係数に基づき前記測定データの補正を行うデータ処理部とを有することを特徴とする制御システム。 A control device connected to the sensor device ;
A data processing device in communication with the control device;
The control device includes:
A storage unit for storing a first script and a second script including a command for accessing the sensor device ;
A controller that executes the first script, acquires the correction coefficient of the sensor device as the execution result , executes the second script, and acquires the measurement data of the sensor device as the execution result ;
And a transmission unit that transmits the correction coefficient and the measured data to the data processing device,
The data processing device includes:
A receiving unit for receiving the correction coefficient and the measurement data , respectively , as execution results of the first script and the second script from the control device;
And a data processing unit that corrects the measurement data based on the correction coefficient .
前記第1スクリプトの実行結果として、前記センサデバイスの補正係数を取得し、前記第2スクリプトの実行結果として、前記センサデバイスの測定データを取得する工程と、
前記補正係数に基づき前記測定データの補正を行うデータ処理装置に、前記補正係数及び前記測定データを送信する工程とを、コンピュータが実行することを特徴とする制御方法。 Executing a first script and a second script including a command for accessing a connected sensor device ;
Obtaining a correction coefficient of the sensor device as an execution result of the first script, and obtaining measurement data of the sensor device as an execution result of the second script ;
A control method, wherein the computer executes the step of transmitting the correction coefficient and the measurement data to a data processing device that corrects the measurement data based on the correction coefficient .
前記補正係数に基づき前記測定データの補正を行う工程とを、コンピュータが実行することを特徴とするデータ処理方法。 A control device connected to the sensor device, as a result of the execution of the first script and the second script includes a command to access the sensor device, comprising: receiving a correction coefficient and the measurement data of the sensor device, respectively,
A data processing method, wherein a computer executes the step of correcting the measurement data based on the correction coefficient .
前記第1スクリプトの実行結果として、前記センサデバイスの補正係数を取得し、前記第2スクリプトの実行結果として、前記センサデバイスの測定データを取得し、
前記補正係数に基づき前記測定データの補正を行うデータ処理装置に、前記補正係数及び前記測定データを送信する、処理をコンピュータに実行させることを特徴とする制御プログラム。 Execute the first script and the second script including the command to access the connected sensor device ,
As the execution result of the first script, the correction coefficient of the sensor device is acquired, and as the execution result of the second script, the measurement data of the sensor device is acquired,
A control program that causes a computer to execute a process of transmitting the correction coefficient and the measurement data to a data processing device that corrects the measurement data based on the correction coefficient .
前記補正係数に基づき前記測定データの補正を行う、処理をコンピュータに実行させることを特徴とするデータ処理プログラム。
A control device connected to the sensor device, as a result of executing the first script and the second script includes a command for accessing said sensor device receives the correction coefficient and the measurement data of the sensor device, respectively,
A data processing program for causing a computer to execute processing for correcting the measurement data based on the correction coefficient .
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2016/057558 WO2017154166A1 (en) | 2016-03-10 | 2016-03-10 | Control device, data processing device, control system, control method, data processing method, control program, and data processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2017154166A1 JPWO2017154166A1 (en) | 2018-10-04 |
JP6587031B2 true JP6587031B2 (en) | 2019-10-09 |
Family
ID=59789232
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018503941A Active JP6587031B2 (en) | 2016-03-10 | 2016-03-10 | Control device, data processing device, control system, control method, data processing method, control program, and data processing program |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP6587031B2 (en) |
TW (1) | TWI631442B (en) |
WO (1) | WO2017154166A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6557760B1 (en) * | 2018-06-19 | 2019-08-07 | Jig−Saw株式会社 | Device control method, control device and system |
JP2021157751A (en) * | 2020-03-30 | 2021-10-07 | ブラザー工業株式会社 | Control method for controller and terminal, controller, program, and storage medium |
GB2616069A (en) * | 2022-02-28 | 2023-08-30 | Vodafone Group Services Ltd | A method and device for reading data from a sensor |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002082703A (en) * | 2000-09-07 | 2002-03-22 | Ryosuke Hosoya | Equipment with medium conveyance system, and method and device for its control |
TW200416508A (en) * | 2003-02-25 | 2004-09-01 | Chung Shan Inst Of Science | A real-time control system using web technology to implement Computer Numerical Controller and method thereof |
JP2005130033A (en) * | 2003-10-21 | 2005-05-19 | Ipsquare Inc | Monitoring system, control device, and imaging apparatus |
JP2006344017A (en) * | 2005-06-09 | 2006-12-21 | Hitachi Ltd | Sensor network system and data processing method for sensor network system |
US7970871B2 (en) * | 2007-05-02 | 2011-06-28 | Synapse Wireless, Inc. | Systems and methods for dynamically configuring node behavior in a sensor network |
JP2009260778A (en) * | 2008-04-18 | 2009-11-05 | Hitachi High-Tech Control Systems Corp | Sensor network gateway, and sensor network system |
DE112014003065T5 (en) * | 2014-04-25 | 2016-03-17 | Mitsubishi Electric Corporation | Programmable logic controller |
-
2016
- 2016-03-10 WO PCT/JP2016/057558 patent/WO2017154166A1/en active Application Filing
- 2016-03-10 JP JP2018503941A patent/JP6587031B2/en active Active
- 2016-11-09 TW TW105136400A patent/TWI631442B/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
TWI631442B (en) | 2018-08-01 |
TW201732477A (en) | 2017-09-16 |
JPWO2017154166A1 (en) | 2018-10-04 |
WO2017154166A1 (en) | 2017-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3276481B1 (en) | Nvme networked storage implementation method, terminal, server, and system | |
JP4600518B2 (en) | Information processing apparatus, information processing system, information processing method, and computer program | |
JP6587031B2 (en) | Control device, data processing device, control system, control method, data processing method, control program, and data processing program | |
US20130007289A1 (en) | Remote control system and remote control method of the same | |
US7908417B2 (en) | Motherboard system, storage device for booting up thereof and connector | |
JP6250842B2 (en) | Sharing non-USB sensor with another device using USB over IP | |
JP2015202544A (en) | Robot control system, information communication module, robot controller, computer program and robot control method | |
JP5932947B2 (en) | Host and system | |
KR100829788B1 (en) | Command decoding system, flash memory command decoding system and methods using the same | |
CN103823447A (en) | Communication method and communication system of upper and lower computers of semiconductor equipment | |
US7702820B2 (en) | Hardware accelerator and data transmission system and method using the same | |
US20060184708A1 (en) | Host controller device and method | |
US10664418B2 (en) | Peripheral device controlling device, operation method thereof, and operation method of peripheral device controlling device driver | |
JP4809166B2 (en) | Computer system constituting remote I / O and I / O data transfer method | |
JP4218034B2 (en) | Data communication system, data communication method, and data communication program | |
JP5840586B2 (en) | Power saving system and image forming apparatus | |
JP2011070259A (en) | Data transfer device and data transfer method | |
TWI452471B (en) | Full-duplex controller in an universal serial bus device and method thereof | |
JP4813823B2 (en) | Test system and test method | |
JP2005085023A (en) | Information processing system, reader/writer and information processing method | |
JP2008299747A (en) | Usb host system and method for transferring transfer data | |
JP6138482B2 (en) | Embedded system | |
KR101985890B1 (en) | A network interface controller with data storage capability and a computing system including the same | |
JP4716929B2 (en) | Program debug support processing apparatus, communication adapter, and program debug support processing program | |
JP6359192B2 (en) | Duplex process control device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180524 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180524 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190618 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190729 |
|
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: 20190813 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190826 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6587031 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |