JP2016224753A - Simulation device - Google Patents
Simulation device Download PDFInfo
- Publication number
- JP2016224753A JP2016224753A JP2015111247A JP2015111247A JP2016224753A JP 2016224753 A JP2016224753 A JP 2016224753A JP 2015111247 A JP2015111247 A JP 2015111247A JP 2015111247 A JP2015111247 A JP 2015111247A JP 2016224753 A JP2016224753 A JP 2016224753A
- Authority
- JP
- Japan
- Prior art keywords
- processing
- processing program
- time
- integrated value
- processing programs
- 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.)
- Granted
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
Description
本発明は、制御装置内で実行される処理プログラムの試験を行うシミュレーション装置に関するものである。 The present invention relates to a simulation apparatus that tests a processing program executed in a control apparatus.
従来から、プラント設備等の設備の監視や設備の稼動管理を行う制御装置が用いられており、このような制御装置内では監視または稼動管理に関連した処理プログラム(または、「ロジック」ともいう)が実行されている。処理プログラムを制御装置に新たに実装したり、処理プログラムをバージョンアップした際には、それらの処理プログラムが正常に動作するかを予め試験することが一般的に行われる。 Conventionally, a control device for monitoring equipment such as plant equipment and operation management of the equipment has been used. In such a control device, a processing program related to monitoring or operation management (also referred to as “logic”). Is running. When processing programs are newly installed in the control device or when the processing programs are upgraded, it is generally performed in advance to test whether these processing programs operate normally.
例えば、下記特許文献1には、制御装置又はそのエミュレータとプラントモデルとを組み合わせたシミュレータシステムが開示されている。このシミュレータシステムは、制御装置と制御対象モデルをシミュレートするモデル演算装置とを備える。
For example,
ところで、上記の従来のシミュレータシステムでは、制御装置の演算周期は固定周期に設定されている。そのため、制御装置用のシミュレータの有するクロックの精度によっては演算周期の誤差が変動する可能性がある。そのため、複数の演算周期を有する複数の処理プログラムを同時に試験した場合に、ある時間内での実行回数の関係が実機とは異なってしまう場合があった。 By the way, in the above conventional simulator system, the calculation cycle of the control device is set to a fixed cycle. For this reason, there is a possibility that the error in the calculation cycle varies depending on the accuracy of the clock of the simulator for the control device. Therefore, when a plurality of processing programs having a plurality of calculation cycles are tested at the same time, the relationship between the number of executions within a certain time may differ from that of the actual machine.
そこで、本発明は、かかる課題に鑑みて為されたものであり、複数の演算周期を有する複数の処理プログラム間での実行回数の関係を安定化し、複数の処理プログラムの連携動作を効率的に確認することが可能なシミュレーション装置を提供することを目的とする。 Therefore, the present invention has been made in view of such a problem, and stabilizes the relationship of the number of times of execution between a plurality of processing programs having a plurality of operation cycles, thereby efficiently performing a cooperative operation of the plurality of processing programs. It is an object of the present invention to provide a simulation apparatus that can be confirmed.
上記課題を解決するため、本発明の一側面に係るシミュレーション装置は、制御装置で実行される複数の処理プログラムの試験を行うシミュレーション装置であって、互いに処理の優先順位が設定され、それぞれに処理周期が設定された複数の処理プログラムと、疑似的な時間を示す積算値をカウントする疑似時間計時手段と、複数の処理プログラムの起動タイミングを制御する起動制御手段とを備え、起動制御手段は、複数の処理プログラムのうちの起動対象の処理プログラムを、疑似時間計時手段によってカウントされた積算値が起動対象の処理プログラムに設定された処理周期に対応する値に至ったタイミングで、起動対象の処理プログラムに設定された優先順位に従って、起動させるように制御し、疑似時間計時手段は、当該起動対象の処理プログラムの実行の終了が検知されたことを契機に、起動対象の処理プログラムに設定された処理周期に対応する値だけ積算値をカウントアップする。 In order to solve the above-described problem, a simulation apparatus according to an aspect of the present invention is a simulation apparatus that tests a plurality of processing programs executed by a control apparatus. A plurality of processing programs set with a period, a pseudo time measuring means for counting an integrated value indicating pseudo time, and an activation control means for controlling the activation timing of the plurality of processing programs, the activation control means, The processing program to be activated among the plurality of processing programs is processed at the timing when the integrated value counted by the pseudo time measuring means reaches a value corresponding to the processing cycle set in the processing program to be activated. Control is performed according to the priority order set in the program, and the pseudo time measuring means Triggered by the completion of the execution of the processing program is detected, counts up the accumulated value by a value corresponding to the set processing cycle start target processing program.
かかる構成のシミュレーション装置によれば、起動制御手段によって、疑似時間計時手段によってカウントされる積算値に基づいて、その積算値が予め設定された処理周期に対応する値に至ったタイミングで、予め設定された優先順位に従って、複数の処理プログラムが起動される。そして、起動対象の処理プログラムの実行が終了したことを契機に、その処理プログラムの処理周期に対応する値だけ積算値がカウントアップされる。これにより、内蔵するクロックの精度に影響されることなく、所定時間内の複数の処理プログラム間の実行回数の関係を安定化させることができる。その結果、複数の処理プログラムの連携動作を効率的に確認することが可能となる。 According to the simulation apparatus having such a configuration, the activation control unit sets in advance the timing at which the integrated value reaches a value corresponding to a preset processing cycle based on the integrated value counted by the pseudo time measuring unit. A plurality of processing programs are started according to the priorities set. Then, when the execution of the processing program to be activated ends, the integrated value is counted up by a value corresponding to the processing cycle of the processing program. As a result, the relationship of the number of executions between a plurality of processing programs within a predetermined time can be stabilized without being affected by the accuracy of the built-in clock. As a result, it is possible to efficiently confirm the cooperative operation of a plurality of processing programs.
複数の処理プログラムには、最短の処理周期に対して整数倍した処理周期がそれぞれ設定されており、起動制御手段は、複数の処理プログラムのうち、積算値が処理周期に対応する値に至ったものを起動対象の処理プログラムとして複数選択し、選択した複数の起動対象の処理プログラムを優先順位に従って起動させるように制御し、疑似時間計時手段は、起動制御手段によって選択された複数の起動対象の処理プログラムの実行の終了が検知されたことを契機に最短の処理周期に対応する値だけ積算値をカウントアップする、ことも好適である。 Each of the plurality of processing programs is set with a processing cycle that is an integral multiple of the shortest processing cycle, and the activation control means has reached the value corresponding to the processing cycle among the plurality of processing programs. A plurality of processing programs to be activated are selected, and the selected plurality of activation target processing programs are controlled to be activated in accordance with the priority order. It is also preferable to count up the integrated value by a value corresponding to the shortest processing cycle when the end of execution of the processing program is detected.
かかる構成を採れば、複数の処理プログラムの処理周期のうちで最短の処理周期の分だけ積算値がカウントアップされることにより、最小限の積算値の更新処理で所定時間内の複数の処理プログラム間の実行回数の関係を安定化させることができる。その結果、シミュレーション装置の処理負荷を最小限にすることで安定した処理プログラムの実行確認が可能にされる。 By adopting such a configuration, the integrated value is counted up by the shortest processing cycle among the processing cycles of the plurality of processing programs, so that a plurality of processing programs within a predetermined time can be obtained by updating the minimum integrated value. The relationship of the number of executions can be stabilized. As a result, it is possible to confirm the execution of a stable processing program by minimizing the processing load of the simulation apparatus.
また、実時間を計時する実時間計時手段をさらに備え、疑似時間計時手段は、積算値をカウントアップする際に、実時間計時手段によって計時された実時間を参照しながら当該カウントアップするまでの時間に待機時間を挿入する、ことも好適である。 In addition, it further comprises real-time time measuring means for measuring real time, and the pseudo-time time measuring means is configured to count up while referring to the real time timed by the real time time measuring means when counting up the integrated value. It is also suitable to insert a waiting time into the time.
この場合、実時間に対する処理プログラムの実行周期を適宜調整して複数の処理プログラムの負荷を変えた試験が可能となる。 In this case, it is possible to perform a test in which the load of a plurality of processing programs is changed by appropriately adjusting the execution cycle of the processing program with respect to real time.
さらに、疑似時間計時手段は、実時間と積算値とが同一時間を表す値になるように、待機時間を挿入する、ことも好適である。かかる疑似時間計時手段を備えれば、実時間に対する処理プログラムの実行周期を適宜調整して複数の処理プログラムの実機を想定した試験が可能となる。 Furthermore, it is also preferable that the pseudo time measuring means inserts a standby time so that the real time and the integrated value become values representing the same time. By providing such pseudo time measuring means, it is possible to perform a test assuming a real machine of a plurality of processing programs by appropriately adjusting the execution cycle of the processing program with respect to the real time.
またさらに、疑似時間計時手段は、積算値の示す時間が実時間に対して所定の比率となるように、待機時間を挿入する、ことも好適である。かかる疑似時間計時手段を備えれば、実時間に対する処理プログラムの実行周期を適宜調整して複数の処理プログラムの負荷を様々変更した試験が可能となる。 Furthermore, it is also preferable that the pseudo time measuring means insert the standby time so that the time indicated by the integrated value is a predetermined ratio with respect to the actual time. If such pseudo time measuring means is provided, it is possible to perform a test in which the load of a plurality of processing programs is variously changed by appropriately adjusting the execution cycle of the processing program with respect to the real time.
さらにまた、互いに独立に優先順位が設定された複数の処理プログラムをそれぞれ含む複数の処理プログラム群を備え、起動制御手段は、積算値に基づいて、複数の処理プログラム群毎に起動タイミングを制御可能とされている、ことも好適である。 Furthermore, a plurality of processing program groups each including a plurality of processing programs with priorities set independently of each other are provided, and the activation control means can control the activation timing for each of the plurality of processing program groups based on the integrated value. It is also suitable.
かかる構成を採れば、制御装置、制御対象装置等の複数の装置に実装される複数の処理プログラム間での連携動作の確認が可能となる。 By adopting such a configuration, it is possible to confirm the cooperative operation among a plurality of processing programs installed in a plurality of devices such as a control device and a control target device.
また、複数の処理プログラム群の処理プログラム間での通信を模擬する処理プログラムをさらに備える、ことも好適である。この場合、複数の装置に実装される複数の処理プログラム間での通信の試験も併せて可能となる。 It is also preferable to further include a processing program that simulates communication between processing programs of a plurality of processing program groups. In this case, a communication test between a plurality of processing programs mounted on a plurality of apparatuses can be performed together.
本発明によれば、複数の演算周期を有する複数の処理プログラム間での実行回数の関係を安定化し、複数の処理プログラムの連携動作を効率的に確認することができる。 According to the present invention, it is possible to stabilize the relationship of the number of executions between a plurality of processing programs having a plurality of calculation cycles, and to efficiently check the cooperative operation of the plurality of processing programs.
以下、添付図面を参照して本発明の実施形態を詳細に説明する。なお、図面の説明において同一又は相当要素には同一の符号を付し、重複する説明を省略する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the description of the drawings, the same or equivalent elements will be denoted by the same reference numerals, and redundant description will be omitted.
図1は、本発明の好適な一実施形態に係るシミュレーション装置の構成概略図である。同図に示されるシミュレーション装置1は、プラント設備等の設備の監視や設備の稼動管理を行う制御装置に実装される処理プログラム(「ロジック」ともいう)の動作を試験するための装置である。シミュレーション装置1の試験対象とする制御装置としては、例えば、発電装置のガスタービンの動作を制御する制御装置が挙げられるが、これに限定されるものではない。試験対象の制御装置は、例えば、PLC(programmable logic controller)等によって構成され、通常は、複数の演算周期で複数の優先順位で起動されるロジックが実装される。
FIG. 1 is a schematic configuration diagram of a simulation apparatus according to a preferred embodiment of the present invention. The
シミュレーション装置1は、パーソナルコンピュータ、サーバ装置等に代表される汎用のコンピュータで構成される情報処理装置である。詳細には、シミュレーション装置1は、物理的には、1又は複数のCPUと、RAM及びROM等の主記憶装置と、外部装置との間でデータを送受信するデータ送受信デバイスである通信モジュールと、半導体メモリ及びハードディスク装置等の補助記憶装置と、マウス、タッチパネル及びキーボード等の入力デバイスと、ディスプレイ及びスピーカ等の出力デバイスとを含むコンピュータシステムとして構成されている。シミュレーション装置1の各機能は、CPU、RAM等のハードウェア上に1又は複数の所定のコンピュータソフトウェアを読み込ませることにより、CPUの制御のもとで通信モジュール、入力デバイス、および出力デバイスを動作させるとともに、RAMや補助記憶装置におけるデータの読み出し及び書き込みを行うことで実現される。
The
次に、シミュレーション装置1の機能構成について説明する。シミュレーション装置1は、図1に示すように、機能的には、複数の処理プログラム11a,11b,…、起動制御部(起動制御手段)21、疑似時間タイマー部(疑似時間計時手段)22、実時間タイマー部(実時間計時手段)23、積算値格納部30を備えている。以下、シミュレーション装置1の各機能部の機能について詳細に説明する。
Next, the functional configuration of the
複数の処理プログラム11a,11b,…は、シミュレーション装置1の試験対象の処理プログラムであり、予めシミュレーション装置1に読み込まれることによりシミュレーション装置1によって実行可能とされている。図2には、シミュレーション装置1に読み込まれる処理プログラムの一例を示すラダー図である。この処理プログラムは、PLC用のプログラムであり、(1)入力値“x2”の内容確認、(2)出力値“y70”の内容確認、(3)入力値“x2”が“オン”、または出力値“y70”が“オン”ならば出力値“y70”を“オン”に設定する、という(1)〜(3)の処理を行い、(3)の処理が終わったら、次の演算周期で(1)〜(3)の処理を繰り返すという演算動作が組み込まれたものである。これらの複数の処理プログラム11a,11b,…には、それぞれ、処理の周期を示す演算周期情報(例えば、40msec)と、他の処理プログラムとの間の互いの優先順位の関係を示す優先順位情報(例えば、優先度“1”)が予め設定されている。
The plurality of
疑似時間タイマー部22は、疑似的な時間を示す積算値をカウントする。具体的には、疑似時間タイマー部22は、複数の処理プログラム11a,11b,…のうちの起動制御部21によって起動された処理プログラムの実行の終了が検知されたことを契機に、その処理プログラムに設定された演算周期に対応する値だけ積算値をカウントアップする。より具体的には、疑似時間タイマー部22は、起動制御部21によって起動された処理プログラムの実行の終了が検知されたことを契機に、複数の処理プログラム11a,11b,…のうちの最短の演算周期に対応する値だけ積算値をカウントアップする。そして、疑似時間タイマー部22は、カウントした最新の積算値を積算値格納部30に格納する。
The pseudo
実時間タイマー部23は、実時間を計時する計時手段である。例えば、実時間タイマー部23は、シミュレーション装置1内で機能するOS(Operating System)が有するクロックを用いて実時間を計時する。
The real
起動制御部21は、複数の処理プログラム11a,11b,…の起動を制御する。すなわち、起動制御部21は、疑似時間タイマー部22によってカウントされている積算値を参照し、その積算値が演算周期に対応するに至っている起動対象のプログラムを、シミュレーション装置1にダウンロードされている試験対象の複数の処理プログラム11a,11b,…の中から選択する。そして、起動制御部21は、選択した複数の処理プログラムを、それらに設定されている優先順位の順に従って起動させるように制御する。この際、起動制御部21は、複数の処理プログラムを重複して実行させることなく、1つの処理プログラムの実行が終了した直後に次の優先順位の処理プログラムを起動するように制御する。
The
ここで、起動制御部21による試験対象の処理プログラムの起動制御の一例について、図3〜図5を参照しつつ説明する。図3〜5において、(a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、本実施形態のシミュレーション装置1によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。なお、これらの例においては、試験対象の処理プログラム“A”に対して演算周期“10msec”および優先度“1”が設定され、試験対象の処理プログラム“B”に対して演算周期“20msec”および優先度“2”が設定され、試験対象の処理プログラム“C”に対して演算周期“40msec”および優先度“3”が設定されている。この場合は、それぞれの処理プログラム“A”,“B”,“C”に、最小の演算周期“10msec”を整数倍した演算周期“10msec”,“20msec”,“40msec”がそれぞれ設定されている。また、実機の制御装置には、RTOS(Real Time Operating System)が実装されており、このRTOSのクロック機能により、シミュレーション装置1の実時間タイマー部23に比較して精度の高いタイマー(RTOSタイマー)が実現されている。
Here, an example of the start control of the processing target test program by the
図3(a)に示すように、実機においては、精度の比較的高いRTOSタイマーを用いて処理プログラム“A”,“B”,“C”の起動が制御されることにより、RTOSタイマーが“0msec”のタイミングで処理プログラム“A”,“B”,“C”が優先度の順番で起動される。次に、RTOSタイマーが“10msec”のタイミングで処理プログラム“A”のみが起動され、その後、RTOSタイマーが“20msec”のタイミングで処理プログラム“A”,“B”が優先度の順番で起動される。さらに、RTOSタイマーが“30msec”のタイミングで処理プログラム“A”のみが起動される。このように、実機では、RTOSタイマーを参照しながら、予め設定された演算周期及び優先度で複数の処理プログラムをシングルタスクで起動することによって、所定の時間(例えば40msec)の間で複数の処理プログラム“A”,“B”,“C”間の実行回数の関係が一定とされる。具体的には、40msecの間の処理プログラム“A”,“B”,“C”の実行回数は、それぞれ、4回、2回、1回に設定される。 As shown in FIG. 3A, in the actual machine, the activation of the processing programs “A”, “B”, and “C” is controlled using the RTOS timer with relatively high accuracy, so that the RTOS timer is “ The processing programs “A”, “B”, and “C” are started in order of priority at the timing of “0 msec”. Next, only the processing program “A” is started when the RTOS timer is “10 msec”, and then the processing programs “A” and “B” are started in order of priority when the RTOS timer is “20 msec”. The Furthermore, only the processing program “A” is started when the RTOS timer is “30 msec”. As described above, in the actual machine, a plurality of processing programs are executed in a predetermined time (for example, 40 msec) by starting a plurality of processing programs in a single task with a preset calculation cycle and priority while referring to the RTOS timer. The relationship of the number of executions between the programs “A”, “B”, and “C” is fixed. Specifically, the number of executions of the processing programs “A”, “B”, and “C” for 40 msec is set to 4, 2, and 1, respectively.
一方、図3(b)に示すように、シミュレーション装置1においては、疑似時間タイマー部22のカウントする積算値が初期値の“0msec”のタイミングで、その積算値が演算周期に対応する処理プログラム“A”,“B”,“C”が起動対象の処理プログラムとして選択され、それらの処理プログラム“A”,“B”,“C”が優先度の順番に従ってシングルタスクで起動される。このとき、選択されたプログラムの中で優先順位が一番低い処理プログラム“C”の実行の終了が検出されたことを契機に、積算値が最短の演算周期“10msec”の値だけカウントアップされて“10msec”に更新される。次に、そのときの積算値“10msec”が演算周期に対応する処理プログラム“A”のみが起動対象の処理プログラムとして選択され、その処理プログラム“A”が起動された後に、処理プログラム“A”の実行の終了が検出されたことを契機に、積算値が最短の演算周期“10msec”の値だけカウントアップされて“20msec”に更新される。その後、同様にして、積算値“20msec”が演算周期に対応する処理プログラム“A”,“B”が起動対象の処理プログラムとして選択され、その処理プログラム“A”,“B”が順番に起動された後に、処理プログラム“B”の実行の終了が検出されたことを契機に、積算値が“30msec”に更新される。次に、積算値“30msec”が演算周期に対応する処理プログラム“A”のみが起動対象の処理プログラムとして選択され、その処理プログラム“A”が起動された後に、処理プログラム“A”の実行の終了が検出されたことを契機に、積算値が“40msec”に更新される。
On the other hand, as shown in FIG. 3B, in the
このような起動制御部21による起動制御により、実機における処理プログラム“A”,“B”,“C”の実時間“40msec”の間における実行回数の関係と同一の関係を、疑似時間タイマー部22が積算値“40msec”をカウントするまでの間で設定することができる。具体的には、シミュレーション装置1においても、積算値“40msec”をカウントする間の処理プログラム“A”,“B”,“C”の実行回数を、それぞれ、4回、2回、1回に設定することができる。
By such activation control by the
図4(a)には、実機において複数の処理プログラムの実行が競合する場合を示している。つまり、RTOSタイマーが“10msec”のタイミングでは、図3(a)の場合と同様に、処理プログラム“A”の起動が制御されている。その一方、その時点で処理プログラム“C”が起動中であるために、処理プログラム“C”の実行が中断され優先度がより高い処理プログラム“A”の実行の割り込みが発生する。つまり、実機では、シングルタスク方式が採用されているので、処理プログラムの実行時間によっては優先度に従った割り込みが発生しうる。 FIG. 4A shows a case where execution of a plurality of processing programs competes in an actual machine. That is, at the timing when the RTOS timer is “10 msec”, the activation of the processing program “A” is controlled as in the case of FIG. On the other hand, since the processing program “C” is being activated at that time, the execution of the processing program “C” is interrupted and an interrupt for execution of the processing program “A” having a higher priority occurs. In other words, since the single task method is adopted in the actual machine, an interrupt according to the priority may occur depending on the execution time of the processing program.
これに対して、図4(b)に示すように、シミュレーション装置1においては、割り込み処理は発生し得ない。それは、積算値が“0msec”のタイミングで起動対象の処理プログラム“A”,“B”,“C”が選択されて、それらの起動が制御された後に、優先度の一番低い処理プログラム“C”の実行が終了するまでには、積算値がカウントアップされないためである。このようにしても、実機における処理プログラム“A”,“B”,“C”の実行回数の関係と同一の関係を設定することができることに変わりはない。従って、シミュレーション装置1においては、クロックの精度が低くて演算時間を正確に管理することができない場合でも、実行回数の関係は忠実に再現することができる。
On the other hand, as shown in FIG. 4B, the
図5(a)には、実機において3つの処理プログラムの実行が同時に競合する場合を示している。RTOSタイマーが“30msec”のタイミングでは、3つの処理プログラム“A”,“B”,“C”の実行が競合しているが、優先度に従って、処理プログラム“A”の実行が最優先され、次に、処理プログラム“B”が実行された後に、処理プログラム“B”の実行が終了してから処理プログラム“C”が起動される。これに対して、図5(b)に示すように、シミュレーション装置1では割り込み処理は発生しないが、実機における処理プログラム“A”,“B”,“C”の実行回数の関係と同一の関係を設定することができる。
FIG. 5A shows a case where the execution of three processing programs in the actual machine competes simultaneously. At the timing when the RTOS timer is “30 msec”, the execution of the three processing programs “A”, “B”, and “C” is competing, but according to the priority, the execution of the processing program “A” has the highest priority, Next, after the processing program “B” is executed, the processing program “C” is started after the execution of the processing program “B” is completed. On the other hand, as shown in FIG. 5 (b), the interrupt processing is not generated in the
次に、図6を参照しながら、シミュレーション装置1による処理プログラムの起動制御の手順について説明する。図6は、シミュレーション装置1による処理プログラムの起動制御の手順を示すフローチャートである。
Next, a procedure for starting control of the processing program by the
まず、シミュレーション装置1への外部からの指示入力により、複数の処理プログラムの試験が開始されると、積算値格納部30に格納された積算値が初期値“0msec”にリセットされる(ステップS01)。その後、ダウンロードされている試験対象の複数の処理プログラムに予め設定されている演算周期が特定される(ステップS02)。併せて、試験対象の複数の処理プログラムに予め設定されている優先順位も特定される(ステップS03)。
First, when a test of a plurality of processing programs is started by an instruction input from the outside to the
続いて、シミュレーション装置1の起動制御部21により、疑似時間タイマー部22によってカウントされている現在の積算値が積算値格納部30から参照される(ステップS04)。次に、起動制御部21により、複数の処理プログラムの中から積算値が演算周期に対応する値に至っている処理プログラムが起動対象の処理プログラムとして抽出される(ステップS05)。
Subsequently, the current integrated value counted by the pseudo
その後、起動制御部21により、抽出された複数の処理プログラムが優先順位の順番に従ってシングルタスクで起動される(ステップS06)。そして、起動制御部21により、抽出された複数の処理プログラムの全ての実行の終了が検知される(ステップS07)。そうすると、疑似時間タイマー部22によって、最短の演算周期の分だけ積算値がカウントアップされる(ステップS08)。その後、試験終了の条件が満たされたか(例えば、所定の積算値に至ったか否か)が判定され(ステップS09)、条件を満たしていない場合は(ステップS09;NO)処理がステップS04に戻され、条件を満たしている場合には(ステップS09;YES)、処理が終了される。
Thereafter, the
以上説明したシミュレーション装置1によれば、起動制御部21によって、疑似時間タイマー部22によってカウントされる積算値に基づいて、その積算値が予め設定された処理周期に対応する値に至ったタイミングで、予め設定された優先順位に従って、複数の処理プログラム11a,11b,…が起動される。そして、起動対象の処理プログラム11a,11b,…の実行が終了したことを契機に、その処理プログラム11a,11b,…の最短の処理周期に対応する値だけ積算値がカウントアップされる。これにより、内蔵するクロックの精度に影響されることなく、所定時間内の複数の処理プログラム間の実行回数の関係を安定化させることができる。その結果、複数の処理プログラムの連携動作を効率的に確認することが可能となる。
According to the
例えば、シミュレーション装置1として使用される汎用コンピュータに内蔵されるOSのクロックはその精度が低い場合がある(例えば、40msec以上の誤差を有する)。その場合であっても、実機での所定時間(例えば、40msec)内での複数の処理プログラムの実行回数の関係を、それらの処理プログラムの実行順序を規定の順序に設定しながら、シミュレーション装置1でも保つことができる。その結果、互いにデータを入出力する複数の処理プログラム間の連携動作を、効率的に試験することができる。
For example, the OS clock built in the general-purpose computer used as the
また、疑似時間タイマー部22は、複数の処理プログラムの処理周期のうちで最短の処理周期の分だけ積算値をカウントアップする。これにより、最小限の積算値の更新処理で積算値の示す所定時間内の複数の処理プログラム間の実行回数の関係を安定化させることができる。その結果、シミュレーション装置1の処理負荷を最小限にすることで安定した処理プログラムの実行確認が可能にされる。
Moreover, the pseudo
なお、本発明は、上述した実施形態に限定されるものではない。 In addition, this invention is not limited to embodiment mentioned above.
例えば、シミュレーション装置1の疑似時間タイマー部22は、積算値をカウントアップする際に、シミュレーション装置1内の実時間タイマー部23によって計時されている実時間を参照しながら、カウントアップするまでの時間に待機時間を挿入してもよい。
For example, the pseudo
図7及び図8には、このような場合の起動制御部21による試験対象の処理プログラムの起動制御の例を示している。図7において、(a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、本変形例のシミュレーション装置1によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。図7の例では、図3と同様な演算時間及び優先度が設定されている。この場合、図3に示した例において積算値が“120msec”にカウントアップされる直前に待機時間が挿入されている。すなわち、疑似時間タイマー部22は、積算値を“120msec”にカウントアップする際に、実時間タイマー部23によってカウントされている実時間値を参照し、その実時間値が“120msec”に至るまで、すなわち、実時間値が更新後の積算値と同一時間の値になるまで待機時間Δt1の間待機した後に、積算値を“120msec”にカウントアップする。このようにすることで、処理プログラムをユーザの体感時間と同じ時間で繰り返し実行させることができる。
7 and 8 show an example of the start control of the processing target test program by the
同様にして、疑似時間タイマー部22は、処理プログラムの繰り返し実行のペースを調整するために、積算値の示す時間が実時間に対して所定の比率となるように待機時間を挿入してもよい。図8において、(a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)〜(d)は、本変形例のシミュレーション装置1によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。これらの例においては、試験対象の処理プログラム“A”に対して演算周期“20msec”および優先度“1”が設定され、試験対象の処理プログラム“B”に対して演算周期“40msec”および優先度“2”が設定されている。そして、図8(b)に示す例においては、疑似時間タイマー部22は、積算値“120msec”をカウントアップする時点でその積算値の示す時間“120msec”が、実時間値の示す時間“120msec”と同一の時間となるように待機時間Δt2を挿入する。これにより、処理プログラムの繰り返しのペースを実時間と一致させることができる。また、図8(c)に示す例においては、疑似時間タイマー部22は、積算値“120msec”をカウントアップする時点でその積算値の示す時間“120msec”が、実時間値の示す時間“60msec”の2倍の時間となるように待機時間Δt4を挿入する。これにより、処理プログラムの繰り返しのペースを実時間よりも速くすることができる。また、図8(d)に示す例においては、疑似時間タイマー部22は、積算値“120msec”をカウントアップする時点でその積算値の示す時間“120msec”が、実時間値の示す時間“240msec”の0.5倍の時間となるように待機時間Δt6を挿入する。これにより、処理プログラムの繰り返しのペースを実時間よりも遅くすることができる。
Similarly, the pseudo
図9は、本変形例にかかるシミュレーション装置1による処理プログラムの起動制御の手順を示すフローチャートである。図9のステップS102〜ステップS107、及びステップS109〜ステップS110の処理は、上述した図6のステップS02〜ステップS09の処理と同一である。ステップS101では、積算値が初期値“0msec”にリセットされると同時に、実時間タイマー部23の保持する実時間値も初期値“0msec”にリセットされる。そして、ステップS108では、疑似時間タイマー部22が、積算値を所定値にカウントアップする際に実時間タイマー部23でカウントされている実時間値を参照しながら待機時間を挿入する(ステップS108)。
FIG. 9 is a flowchart showing a procedure for starting control of a processing program by the
以上のような変形例によれば、実時間に対する処理プログラムの実行周期を適宜調整して複数の処理プログラムの負荷を変えた試験が可能となる。すなわち、処理プログラムの繰り返しのペースを実機と同一にして複数の処理プログラムを対象にした実機を想定した試験を行うこともできるし、処理プログラムの繰り返しのペースを実機のペースに対して所定割合にして複数の処理プログラムの負荷を様々変更した試験を行うこともできる。 According to the above modification, it is possible to perform a test in which the load of a plurality of processing programs is changed by appropriately adjusting the execution cycle of the processing program with respect to real time. In other words, it is possible to perform a test assuming that the processing program repetition pace is the same as that of the actual machine and that targets a plurality of processing programs, or the processing program repetition pace is set to a predetermined ratio with respect to the actual machine pace. Thus, it is possible to perform a test in which the loads of a plurality of processing programs are variously changed.
また、本発明の他の変形例としては、互いに独立に優先順位が設定された複数の処理プログラム群を処理対象としてもよい。図10は、本発明の変形例にかかるシミュレーション装置1Aの構成を示している。このように、シミュレーション装置1Aには、処理プログラム11a,11b,…を含む処理プログラム群11と、処理プログラム12a,…を含む処理プログラム群12とが実装されている。そして、シミュレーション装置1Aの起動制御部21は、疑似時間タイマー部22がカウントした積算値を基に、2つの処理プログラム群11,12毎に起動タイミングを制御可能に構成されている。
As another modification of the present invention, a plurality of processing program groups having priorities set independently of each other may be processed. FIG. 10 shows the configuration of a
図11には、このような場合の起動制御部21による試験対象の処理プログラム群の起動制御の例を示し、(a)は、実機の制御装置によって起動が制御された処理プログラム群の演算のタイミングを示すタイミングチャート図であり、(b)は、シミュレーション装置によって実時間値を基に起動が制御された処理プログラム群の演算のタイミングを示すタイミングチャート図であり、(c)は、本変形例のシミュレーション装置1Aによって起動が制御された処理プログラム群の演算のタイミングを示すタイミングチャート図である。ここでは、処理プログラム“A”、“B”によって一方の処理プログラム群が構成され、処理プログラム“C”によって他方の処理プログラム群が構成されている。さらに、他方の処理プログラム群には、処理プログラム“C”と処理プログラム“A”との間のデータ通信処理を模擬する処理プログラム“D”も含まれている。この処理プログラム“D”は、例えば、シミュレーション装置1A内の共有メモリに対するデータの書き込みおよび読み出しの動作によって実現される。すなわち、装置からデータを送信する処理が、共有メモリに対するデータの書き込みによってシミュレートされ、装置でデータを受信する処理が、共有メモリからのデータの読み出しによってシミュレートされる。また、この処理プログラム“D”は、シミュレーション装置1A内でのソケット通信によってシミュレートされてもよい。一方の処理プログラム群は、例えば実機の制御装置内で実行されるプログラム群に対応し、他方の処理プログラム群は、例えば実機の制御対象装置内で実行されるプログラム群に対応する。そして、試験対象の処理プログラム“A”に対して演算周期“10msec”および優先度“1”が設定され、試験対象の処理プログラム“B”に対して演算周期“20msec”および優先度“2”が設定され、試験対象の処理プログラム“B”に対して演算周期“60msec”および優先度“3”が設定され、処理プログラム“D”は処理プログラム“C”の直後に起動されるように設定されている。
FIG. 11 shows an example of the start control of the processing program group to be tested by the
図11(b)に示すように、内蔵するクロック等を基にカウントされた実時間値を基に複数の処理プログラム群を起動させた場合は、クロックの精度が悪いために処理プログラム群の間の実行タイミングにずれが生じる。そのため、通信を伴う処理を試験しようとしても、処理プログラム間の通信を介した連携動作を再現することができない。これに対して、図11(c)に示すように、シミュレーション装置1Aによれば、処理プログラム群の起動制御に際して同一の積算値を参照することにより、処理プログラム群の間の実行タイミングのずれを防止できる。その結果、制御装置、制御対象装置等の複数の装置に実装される複数の処理プログラム間での連携動作の確認が可能となる。
As shown in FIG. 11 (b), when a plurality of processing program groups are started based on real time values counted based on a built-in clock or the like, the clock accuracy is poor, so Deviation occurs in the execution timing. Therefore, even if it is going to test the process accompanied by communication, the cooperation operation | movement via communication between process programs cannot be reproduced. On the other hand, as shown in FIG. 11C, according to the
1、1A シミュレーション装置
11、12 処理プログラム群
11a、11b、12a 処理プログラム
21 起動制御部
22 疑似時間タイマー部
23 実時間タイマー部
30 積算値格納部
DESCRIPTION OF
Claims (7)
互いに処理の優先順位が設定され、それぞれに処理周期が設定された複数の処理プログラムと、
疑似的な時間を示す積算値をカウントする疑似時間計時手段と、
前記複数の処理プログラムの起動タイミングを制御する起動制御手段とを備え、
前記起動制御手段は、前記複数の処理プログラムのうちの起動対象の処理プログラムを、前記疑似時間計時手段によってカウントされた積算値が前記起動対象の処理プログラムに設定された前記処理周期に対応する値に至ったタイミングで、前記起動対象の処理プログラムに設定された前記優先順位に従って、起動させるように制御し、
前記疑似時間計時手段は、当該起動対象の処理プログラムの実行の終了が検知されたことを契機に、前記起動対象の処理プログラムに設定された処理周期に対応する値だけ前記積算値をカウントアップする、
シミュレーション装置。 A simulation device for testing a plurality of processing programs executed by a control device,
A plurality of processing programs in which processing priorities are set and processing cycles are set for each,
Pseudo time counting means for counting an integrated value indicating pseudo time;
An activation control means for controlling the activation timing of the plurality of processing programs,
The activation control unit is a value corresponding to the processing cycle in which an integrated value counted by the pseudo time measuring unit is set as the activation target processing program among the plurality of processing programs. Control to start according to the priority set in the processing program to be started at the timing reached.
The pseudo time measuring means counts up the integrated value by a value corresponding to a processing cycle set in the processing program to be activated when the end of execution of the processing program to be activated is detected. ,
Simulation device.
前記起動制御手段は、前記複数の処理プログラムのうち、前記積算値が前記処理周期に対応する値に至ったものを前記起動対象の処理プログラムとして複数選択し、選択した複数の前記起動対象の処理プログラムを前記優先順位に従って起動させるように制御し、
前記疑似時間計時手段は、前記起動制御手段によって選択された前記複数の起動対象の処理プログラムの実行の終了が検知されたことを契機に前記最短の処理周期に対応する値だけ前記積算値をカウントアップする、
請求項1記載のシミュレーション装置。 In the plurality of processing programs, the processing cycle that is an integral multiple of the shortest processing cycle is set, respectively.
The activation control means selects, as the activation target processing program, a plurality of the processing programs whose integrated value has reached a value corresponding to the processing cycle, and selects the plurality of activation target processes. Control the program to start according to the priorities,
The pseudo time measuring means counts the integrated value by a value corresponding to the shortest processing cycle when the end of execution of the processing programs to be activated selected by the activation control means is detected. Up,
The simulation apparatus according to claim 1.
前記疑似時間計時手段は、前記積算値をカウントアップする際に、前記実時間計時手段によって計時された実時間を参照しながら当該カウントアップするまでの時間に待機時間を挿入する、
請求項1又は2記載のシミュレーション装置。 It further includes a real time timing means for measuring real time,
The pseudo time measuring means, when counting up the integrated value, inserts a waiting time into the time until the count up while referring to the real time timed by the real time time measuring means,
The simulation apparatus according to claim 1 or 2.
請求項3記載のシミュレーション装置。 The pseudo time measuring means inserts the waiting time so that the real time and the integrated value are values representing the same time.
The simulation apparatus according to claim 3.
請求項3記載のシミュレーション装置。 The pseudo time measuring means inserts the waiting time so that the time indicated by the integrated value is a predetermined ratio with respect to the actual time.
The simulation apparatus according to claim 3.
前記起動制御手段は、前記積算値に基づいて、前記複数の処理プログラム群毎に起動タイミングを制御可能とされている、
請求項1〜5のいずれか1項に記載のシミュレーション装置。 A plurality of processing program groups each including the plurality of processing programs set with priorities independently of each other;
The activation control means can control activation timing for each of the plurality of processing program groups based on the integrated value.
The simulation apparatus according to any one of claims 1 to 5.
請求項6記載のシミュレーション装置。 A processing program for simulating communication between the processing programs of the plurality of processing programs;
The simulation apparatus according to claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015111247A JP6676883B2 (en) | 2015-06-01 | 2015-06-01 | Simulation equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015111247A JP6676883B2 (en) | 2015-06-01 | 2015-06-01 | Simulation equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016224753A true JP2016224753A (en) | 2016-12-28 |
JP6676883B2 JP6676883B2 (en) | 2020-04-08 |
Family
ID=57748799
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015111247A Active JP6676883B2 (en) | 2015-06-01 | 2015-06-01 | Simulation equipment |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6676883B2 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03132848A (en) * | 1989-10-19 | 1991-06-06 | Mitsubishi Electric Corp | Simulation system for communication among-application programs |
JP2003162428A (en) * | 2001-11-26 | 2003-06-06 | Mitsubishi Electric Corp | System and method for simulation, and computer-readable recording medium storing program for making computer execute the simulation system |
JP2007233930A (en) * | 2006-03-03 | 2007-09-13 | Shimadzu System Solutions Co Ltd | Simulator for distributed control system |
JP2012123726A (en) * | 2010-12-10 | 2012-06-28 | Mitsubishi Electric Corp | Simulation device and simulation program |
JP2012194669A (en) * | 2011-03-15 | 2012-10-11 | Omron Corp | Controller support device, controller support program to be executed in controller support device, recording medium storing controller support program, and method for estimating execution duration of control program |
JP2012203845A (en) * | 2011-03-28 | 2012-10-22 | Denso Wave Inc | System having portable device and program execution apparatus, and the portable device and program execution apparatus used for the system |
WO2014184949A1 (en) * | 2013-05-17 | 2014-11-20 | 三菱電機株式会社 | Software testing device, software testing method, and program |
-
2015
- 2015-06-01 JP JP2015111247A patent/JP6676883B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03132848A (en) * | 1989-10-19 | 1991-06-06 | Mitsubishi Electric Corp | Simulation system for communication among-application programs |
JP2003162428A (en) * | 2001-11-26 | 2003-06-06 | Mitsubishi Electric Corp | System and method for simulation, and computer-readable recording medium storing program for making computer execute the simulation system |
JP2007233930A (en) * | 2006-03-03 | 2007-09-13 | Shimadzu System Solutions Co Ltd | Simulator for distributed control system |
JP2012123726A (en) * | 2010-12-10 | 2012-06-28 | Mitsubishi Electric Corp | Simulation device and simulation program |
JP2012194669A (en) * | 2011-03-15 | 2012-10-11 | Omron Corp | Controller support device, controller support program to be executed in controller support device, recording medium storing controller support program, and method for estimating execution duration of control program |
JP2012203845A (en) * | 2011-03-28 | 2012-10-22 | Denso Wave Inc | System having portable device and program execution apparatus, and the portable device and program execution apparatus used for the system |
WO2014184949A1 (en) * | 2013-05-17 | 2014-11-20 | 三菱電機株式会社 | Software testing device, software testing method, and program |
Also Published As
Publication number | Publication date |
---|---|
JP6676883B2 (en) | 2020-04-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108459792B (en) | Flow switching method and device and computer equipment | |
CN107656872B (en) | Software testing method, device, equipment and computer storage medium | |
CN105653338B (en) | A kind of update method and device of application | |
US20170322860A1 (en) | Power monitoring system for virtual platform simulation | |
JPWO2012077704A1 (en) | Debug stub server, debugging method and program | |
JP2016012173A (en) | Programmable display | |
KR20180061589A (en) | Software build system and software build method using the system | |
JP2023086678A (en) | Method and apparatus for generating and applying deep learning model based on deep learning framework | |
WO2011125280A1 (en) | Debugging support device, debugging support method and debugging support program | |
JP6676883B2 (en) | Simulation equipment | |
CN111679842A (en) | Application program hot update processing method, device and system | |
CN115599438A (en) | Method, device, equipment and medium for constructing application program publishing package | |
Arzenšek et al. | Criteria for selecting mobile application testing tools | |
JP5967091B2 (en) | System parameter setting support system, data processing method of system parameter setting support device, and program | |
EP3248104A1 (en) | Method and device for automatic testing | |
US11579959B2 (en) | Systems and methods for margin based diagnostic tools for priority preemptive schedulers | |
JP6366811B2 (en) | Inspection device, inspection method, and program | |
JP2013168038A (en) | Update test device, method and program for plant device | |
JP2023541510A (en) | Systems, methods, and servers for optimizing containerized application deployment | |
US20180011734A1 (en) | Job scheduler test program, job scheduler test method, and information processing apparatus | |
KR102338616B1 (en) | Electronic device to verify the disaster spread prediction model | |
KR20180061590A (en) | Software build system and software build method using the system | |
CN117390853A (en) | Simulation method, device, equipment and storage medium based on man-machine interaction | |
JP6620653B2 (en) | Emulator for plant monitoring and control system | |
CN117724422A (en) | Production line simulation system and production line simulation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180424 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190121 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190205 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190401 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20190910 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20191210 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20191218 |
|
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: 20200212 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200225 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6676883 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |