JP6676883B2 - Simulation equipment - Google Patents

Simulation equipment Download PDF

Info

Publication number
JP6676883B2
JP6676883B2 JP2015111247A JP2015111247A JP6676883B2 JP 6676883 B2 JP6676883 B2 JP 6676883B2 JP 2015111247 A JP2015111247 A JP 2015111247A JP 2015111247 A JP2015111247 A JP 2015111247A JP 6676883 B2 JP6676883 B2 JP 6676883B2
Authority
JP
Japan
Prior art keywords
processing
processing program
processing programs
time
integrated value
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
JP2015111247A
Other languages
Japanese (ja)
Other versions
JP2016224753A (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.)
IHI Corp
Original Assignee
IHI 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 IHI Corp filed Critical IHI Corp
Priority to JP2015111247A priority Critical patent/JP6676883B2/en
Publication of JP2016224753A publication Critical patent/JP2016224753A/en
Application granted granted Critical
Publication of JP6676883B2 publication Critical patent/JP6676883B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Description

本発明は、制御装置内で実行される処理プログラムの試験を行うシミュレーション装置に関するものである。   The present invention relates to a simulation device that tests a processing program executed in a control device.

従来から、プラント設備等の設備の監視や設備の稼動管理を行う制御装置が用いられており、このような制御装置内では監視または稼動管理に関連した処理プログラム(または、「ロジック」ともいう)が実行されている。処理プログラムを制御装置に新たに実装したり、処理プログラムをバージョンアップした際には、それらの処理プログラムが正常に動作するかを予め試験することが一般的に行われる。   2. Description of the Related Art Conventionally, a control device that monitors equipment such as plant equipment and manages the operation of the equipment has been used. In such a control device, a processing program (or also referred to as “logic”) related to monitoring or operation management. Is running. When a processing program is newly installed in a control device or a processing program is upgraded, it is generally performed to test in advance whether the processing program normally operates.

例えば、下記特許文献1には、制御装置又はそのエミュレータとプラントモデルとを組み合わせたシミュレータシステムが開示されている。このシミュレータシステムは、制御装置と制御対象モデルをシミュレートするモデル演算装置とを備える。   For example, Patent Literature 1 below discloses a simulator system in which a control device or an emulator thereof and a plant model are combined. This simulator system includes a control device and a model calculation device that simulates a control target model.

特開2014−63391号公報JP 2014-63391 A

ところで、上記の従来のシミュレータシステムでは、制御装置の演算周期は固定周期に設定されている。そのため、制御装置用のシミュレータの有するクロックの精度によっては演算周期の誤差が変動する可能性がある。そのため、複数の演算周期を有する複数の処理プログラムを同時に試験した場合に、ある時間内での実行回数の関係が実機とは異なってしまう場合があった。   By the way, in the above-mentioned conventional simulator system, the operation cycle of the control device is set to a fixed cycle. For this reason, there is a possibility that an error in the operation cycle varies depending on the accuracy of the clock included in the simulator for the control device. Therefore, when a plurality of processing programs having a plurality of operation cycles are tested at the same time, the relationship of the number of executions within a certain time may be different from that of the actual machine.

そこで、本発明は、かかる課題に鑑みて為されたものであり、複数の演算周期を有する複数の処理プログラム間での実行回数の関係を安定化し、複数の処理プログラムの連携動作を効率的に確認することが可能なシミュレーション装置を提供することを目的とする。   Therefore, the present invention has been made in view of such a problem, stabilizes the relationship of the number of executions among a plurality of processing programs having a plurality of operation cycles, and efficiently cooperates with a plurality of processing programs. It is an object of the present invention to provide a simulation device that can be checked.

上記課題を解決するため、本発明の一側面に係るシミュレーション装置は、制御装置で実行される複数の処理プログラムの試験を行うシミュレーション装置であって、互いに処理の優先順位が設定され、それぞれに処理周期が設定された複数の処理プログラムと、疑似的な時間を示す積算値をカウントする疑似時間計時手段と、複数の処理プログラムの起動タイミングを制御する起動制御手段とを備え、起動制御手段は、複数の処理プログラムのうちの起動対象の処理プログラムを、疑似時間計時手段によってカウントされた積算値が起動対象の処理プログラムに設定された処理周期に対応する値に至ったタイミングで、起動対象の処理プログラムに設定された優先順位に従って、起動させるように制御し、疑似時間計時手段は、当該起動対象の処理プログラムの実行の終了が検知されたことを契機に、起動対象の処理プログラムに設定された処理周期に対応する値だけ積算値をカウントアップする。   In order to solve the above problems, a simulation device according to one aspect of the present invention is a simulation device that tests a plurality of processing programs executed by a control device, in which processing priorities are set to each other, and A plurality of processing programs having a set cycle, a pseudo time counting means for counting an integrated value indicating a pseudo time, and a start control means for controlling a start timing of the plurality of processing programs, the start control means, The processing program to be started among the plurality of processing programs is processed at the timing when the integrated value counted by the pseudo-time timer reaches a value corresponding to the processing cycle set in the processing program to be started. In accordance with the priority set in the program, control is performed so that the program is started. 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 device having such a configuration, the start control means sets the preset value at a timing when the integrated value reaches a value corresponding to the preset processing cycle based on the integrated value counted by the pseudo time counting means. A plurality of processing programs are started in accordance with the given priority. Then, when the execution of the processing program to be started ends, the integrated value is counted up by a value corresponding to the processing cycle of the processing program. This makes it possible to stabilize the relationship between the number of executions among a plurality of processing programs within a predetermined time 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 to a processing cycle that is an integral multiple of the shortest processing cycle, and the activation control unit determines that the integrated value of the plurality of processing programs has reached a value corresponding to the processing cycle. A plurality of programs are selected as the activation target processing programs, and the plurality of selected activation target processing programs are controlled to be activated in accordance with the priority order. It is also preferable that the integrated value is counted up by the value corresponding to the shortest processing cycle when the end of the execution of the processing program is detected.

かかる構成を採れば、複数の処理プログラムの処理周期のうちで最短の処理周期の分だけ積算値がカウントアップされることにより、最小限の積算値の更新処理で所定時間内の複数の処理プログラム間の実行回数の関係を安定化させることができる。その結果、シミュレーション装置の処理負荷を最小限にすることで安定した処理プログラムの実行確認が可能にされる。   With this configuration, the integrated value is counted up for 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 updated in a minimum integrated value updating process. Between the execution times can be stabilized. As a result, the execution load of the processing program can be confirmed stably by minimizing the processing load on the simulation apparatus.

また、実時間を計時する実時間計時手段をさらに備え、疑似時間計時手段は、積算値をカウントアップする際に、実時間計時手段によって計時された実時間を参照しながら当該カウントアップするまでの時間に待機時間を挿入する、ことも好適である。   Further, the apparatus further includes a real time clock means for measuring the real time, and the pseudo time clock means refers to the real time measured by the real time clock means when counting up the integrated value. It is also preferable to insert a waiting time into the time.

この場合、実時間に対する処理プログラムの実行周期を適宜調整して複数の処理プログラムの負荷を変えた試験が可能となる。   In this case, a test in which the load of a plurality of processing programs is changed by appropriately adjusting the execution cycle of the processing programs with respect to real time can be performed.

さらに、疑似時間計時手段は、実時間と積算値とが同一時間を表す値になるように、待機時間を挿入する、ことも好適である。かかる疑似時間計時手段を備えれば、実時間に対する処理プログラムの実行周期を適宜調整して複数の処理プログラムの実機を想定した試験が可能となる。   Further, it is also preferable that the pseudo time measuring means inserts a standby time such that the real time and the integrated value are values representing the same time. If such a pseudo time measuring means is provided, it is possible to appropriately adjust the execution cycle of the processing program with respect to the real time and perform a test assuming a plurality of processing programs on a real machine.

またさらに、疑似時間計時手段は、積算値の示す時間が実時間に対して所定の比率となるように、待機時間を挿入する、ことも好適である。かかる疑似時間計時手段を備えれば、実時間に対する処理プログラムの実行周期を適宜調整して複数の処理プログラムの負荷を様々変更した試験が可能となる。   Further, it is also preferable that the pseudo time measuring means inserts a standby time such that the time indicated by the integrated value is a predetermined ratio with respect to the actual time. With the provision of such a pseudo time measuring means, a test in which the execution cycle of the processing program with respect to real time is appropriately adjusted and the load of the plurality of processing programs is variously changed becomes possible.

さらにまた、互いに独立に優先順位が設定された複数の処理プログラムをそれぞれ含む複数の処理プログラム群を備え、起動制御手段は、積算値に基づいて、複数の処理プログラム群毎に起動タイミングを制御可能とされている、ことも好適である。   Furthermore, a plurality of processing program groups including a plurality of processing programs each having a priority set independently of each other are provided, and the start control unit can control a start timing for each of the plurality of processing program groups based on the integrated value. It is also preferable.

かかる構成を採れば、制御装置、制御対象装置等の複数の装置に実装される複数の処理プログラム間での連携動作の確認が可能となる。   With such a configuration, it is possible to confirm a cooperative operation between a plurality of processing programs mounted on a plurality of devices such as a control device and a control target device.

また、複数の処理プログラム群の処理プログラム間での通信を模擬する処理プログラムをさらに備える、ことも好適である。この場合、複数の装置に実装される複数の処理プログラム間での通信の試験も併せて可能となる。   It is also preferable that the system further includes a processing program for simulating communication between the processing programs of the plurality of processing program groups. In this case, a communication test between a plurality of processing programs mounted on a plurality of devices can also be performed.

本発明によれば、複数の演算周期を有する複数の処理プログラム間での実行回数の関係を安定化し、複数の処理プログラムの連携動作を効率的に確認することができる。   According to the present invention, it is possible to stabilize the relationship of the number of executions among a plurality of processing programs having a plurality of operation cycles, and to efficiently confirm the cooperative operation of the plurality of processing programs.

本発明の好適な一実施形態に係るシミュレーション装置の構成概略図である。It is a schematic diagram of a configuration of a simulation device according to a preferred embodiment of the present invention. 図1の処理プログラムの一例を示すラダー図である。FIG. 2 is a ladder diagram illustrating an example of a processing program of FIG. 1. (a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、図1のシミュレーション装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of the operation of the processing program whose activation is controlled by the control device of the actual machine, and (b) is the timing chart of the operation of the processing program whose activation is controlled by the simulation apparatus of FIG. 1. FIG. 3 is a timing chart showing timing. (a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、図1のシミュレーション装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of the operation of the processing program whose activation is controlled by the control device of the actual machine, and (b) is the timing chart of the operation of the processing program whose activation is controlled by the simulation apparatus of FIG. 1. FIG. 3 is a timing chart showing timing. (a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、図1のシミュレーション装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of the operation of the processing program whose activation is controlled by the control device of the actual machine, and (b) is the timing chart of the operation of the processing program whose activation is controlled by the simulation apparatus of FIG. 1. FIG. 3 is a timing chart showing timing. 図1のシミュレーション装置による処理プログラムの起動制御の手順を示すフローチャートである。2 is a flowchart illustrating a procedure of controlling activation of a processing program by the simulation apparatus of FIG. 1. (a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、本実施形態のシミュレーション装置1によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of the operation of the processing program whose activation is controlled by the control device of the actual machine, and (b) is the timing chart of the processing program whose activation is controlled by the simulation apparatus 1 of the present embodiment. FIG. 4 is a timing chart showing the timing of calculation. (a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)〜(d)は、変形例のシミュレーション装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of the operation of the processing program whose activation is controlled by the control device of the actual machine, and (b) to (d) are the processes whose activation is controlled by the simulation device of the modified example. FIG. 4 is a timing chart illustrating the timing of a program operation. 変形例のシミュレーション装置による処理プログラムの起動制御の手順を示すフローチャートである。11 is a flowchart illustrating a procedure of a startup control of a processing program by a simulation device of a modification. 本発明の変形例にかかるシミュレーション装置の構成概略図である。It is a schematic diagram of a configuration of a simulation device according to a modification of the present invention. (a)は、実機の制御装置によって起動が制御された処理プログラム群の演算のタイミングを示すタイミングチャート図であり、(b)は、シミュレーション装置によって実時間値を基に起動が制御された処理プログラム群の演算のタイミングを示すタイミングチャート図であり、(c)は、本変形例のシミュレーション装置によって起動が制御された処理プログラム群の演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of the operation of the processing program group whose activation is controlled by the control device of the actual machine, and (b) is a process in which the activation is controlled by the simulation device based on the real time value. It is a timing chart which shows the timing of the calculation of a program group, and (c) is a timing chart which shows the timing of the calculation of the processing program group whose starting was controlled by the simulation device of this modification.

以下、添付図面を参照して本発明の実施形態を詳細に説明する。なお、図面の説明において同一又は相当要素には同一の符号を付し、重複する説明を省略する。   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 corresponding elements have the same reference characters allotted, and overlapping description will be omitted.

図1は、本発明の好適な一実施形態に係るシミュレーション装置の構成概略図である。同図に示されるシミュレーション装置1は、プラント設備等の設備の監視や設備の稼動管理を行う制御装置に実装される処理プログラム(「ロジック」ともいう)の動作を試験するための装置である。シミュレーション装置1の試験対象とする制御装置としては、例えば、発電装置のガスタービンの動作を制御する制御装置が挙げられるが、これに限定されるものではない。試験対象の制御装置は、例えば、PLC(programmable logic controller)等によって構成され、通常は、複数の演算周期で複数の優先順位で起動されるロジックが実装される。   FIG. 1 is a schematic configuration diagram of a simulation device according to a preferred embodiment of the present invention. The simulation apparatus 1 shown in FIG. 1 is an apparatus for testing the operation of a processing program (also referred to as “logic”) implemented in a control device that monitors equipment such as plant equipment and manages the operation of the equipment. The control device to be tested by the simulation device 1 includes, for example, a control device that controls the operation of the gas turbine of the power generation device, but is not limited thereto. The control device to be tested is constituted by, for example, a PLC (programmable logic controller) or the like, and usually has a logic that is activated in a plurality of operation cycles with a plurality of priorities.

シミュレーション装置1は、パーソナルコンピュータ、サーバ装置等に代表される汎用のコンピュータで構成される情報処理装置である。詳細には、シミュレーション装置1は、物理的には、1又は複数のCPUと、RAM及びROM等の主記憶装置と、外部装置との間でデータを送受信するデータ送受信デバイスである通信モジュールと、半導体メモリ及びハードディスク装置等の補助記憶装置と、マウス、タッチパネル及びキーボード等の入力デバイスと、ディスプレイ及びスピーカ等の出力デバイスとを含むコンピュータシステムとして構成されている。シミュレーション装置1の各機能は、CPU、RAM等のハードウェア上に1又は複数の所定のコンピュータソフトウェアを読み込ませることにより、CPUの制御のもとで通信モジュール、入力デバイス、および出力デバイスを動作させるとともに、RAMや補助記憶装置におけるデータの読み出し及び書き込みを行うことで実現される。   The simulation device 1 is an information processing device including a general-purpose computer represented by a personal computer, a server device, and the like. Specifically, the simulation apparatus 1 physically includes one or more CPUs, a main storage device such as a RAM and a ROM, and a communication module that is a data transmission / reception device that transmits / receives data to / from an external device. It is configured as a computer system including an auxiliary storage device such as a semiconductor memory and a hard disk device, an input device such as a mouse, a touch panel, and a keyboard, and an output device such as a display and a speaker. Each function of the simulation apparatus 1 operates a communication module, an input device, and an output device under the control of the CPU by reading one or a plurality of predetermined computer software on hardware such as a CPU and a RAM. In addition, it is realized by reading and writing data in the RAM and the auxiliary storage device.

次に、シミュレーション装置1の機能構成について説明する。シミュレーション装置1は、図1に示すように、機能的には、複数の処理プログラム11a,11b,…、起動制御部(起動制御手段)21、疑似時間タイマー部(疑似時間計時手段)22、実時間タイマー部(実時間計時手段)23、積算値格納部30を備えている。以下、シミュレーション装置1の各機能部の機能について詳細に説明する。   Next, a functional configuration of the simulation apparatus 1 will be described. As shown in FIG. 1, the simulation apparatus 1 functionally includes a plurality of processing programs 11a, 11b,..., An activation control unit (activation control unit) 21, a pseudo time timer unit (pseudo time counting unit) 22, A time timer unit (real time clock means) 23 and an integrated value storage unit 30 are provided. Hereinafter, the function of each functional unit of the simulation device 1 will be described in detail.

複数の処理プログラム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 processing programs 11a, 11b,... Are processing programs to be tested by the simulation device 1, and can be executed by the simulation device 1 by being read into the simulation device 1 in advance. FIG. 2 is a ladder diagram showing an example of a processing program read by the simulation device 1. This processing program is a program for PLC. (1) Confirm the contents of the input value “x2”, (2) Confirm the contents of the output value “y70”, (3) Check that the input value “x2” is “ON”, or If the output value “y70” is “ON”, the processing of (1) to (3) is performed to set the output value “y70” to “ON”. When the processing of (3) is completed, the next operation cycle Thus, a calculation operation of repeating the processes (1) to (3) is incorporated. Each of the plurality of processing programs 11a, 11b,... Has operation cycle information (for example, 40 msec) indicating a processing cycle, and priority information indicating a mutual priority relationship between other processing programs. (For example, priority “1”) is set in advance.

疑似時間タイマー部22は、疑似的な時間を示す積算値をカウントする。具体的には、疑似時間タイマー部22は、複数の処理プログラム11a,11b,…のうちの起動制御部21によって起動された処理プログラムの実行の終了が検知されたことを契機に、その処理プログラムに設定された演算周期に対応する値だけ積算値をカウントアップする。より具体的には、疑似時間タイマー部22は、起動制御部21によって起動された処理プログラムの実行の終了が検知されたことを契機に、複数の処理プログラム11a,11b,…のうちの最短の演算周期に対応する値だけ積算値をカウントアップする。そして、疑似時間タイマー部22は、カウントした最新の積算値を積算値格納部30に格納する。   The pseudo time timer unit 22 counts an integrated value indicating a pseudo time. Specifically, when the end of execution of the processing program activated by the activation control unit 21 of the plurality of processing programs 11a, 11b,. The integrated value is counted up by a value corresponding to the calculation cycle set in (1). More specifically, the pseudo time timer unit 22 detects the shortest of the plurality of processing programs 11a, 11b,... When the end of the execution of the processing program started by the start control unit 21 is detected. The integrated value is counted up by the value corresponding to the operation cycle. Then, the pseudo time timer unit 22 stores the latest counted integrated value in the integrated value storage unit 30.

実時間タイマー部23は、実時間を計時する計時手段である。例えば、実時間タイマー部23は、シミュレーション装置1内で機能するOS(Operating System)が有するクロックを用いて実時間を計時する。   The real time timer unit 23 is a time measuring unit that measures real time. For example, the real time timer unit 23 measures real time using a clock of an OS (Operating System) that functions in the simulation device 1.

起動制御部21は、複数の処理プログラム11a,11b,…の起動を制御する。すなわち、起動制御部21は、疑似時間タイマー部22によってカウントされている積算値を参照し、その積算値が演算周期に対応するに至っている起動対象のプログラムを、シミュレーション装置1にダウンロードされている試験対象の複数の処理プログラム11a,11b,…の中から選択する。そして、起動制御部21は、選択した複数の処理プログラムを、それらに設定されている優先順位の順に従って起動させるように制御する。この際、起動制御部21は、複数の処理プログラムを重複して実行させることなく、1つの処理プログラムの実行が終了した直後に次の優先順位の処理プログラムを起動するように制御する。   The activation control unit 21 controls activation of the plurality of processing programs 11a, 11b,... That is, the activation control unit 21 refers to the integrated value counted by the pseudo-time timer unit 22 and downloads, to the simulation device 1, a program to be activated whose integrated value corresponds to the calculation cycle. .. Are selected from a plurality of processing programs 11a, 11b,. Then, the activation control unit 21 controls the selected plurality of processing programs to be activated according to the order of priority set in the plurality of processing programs. At this time, the activation control unit 21 controls so as to activate the processing program of the next priority immediately after execution of one processing program is completed without causing a plurality of processing programs to be repeatedly executed.

ここで、起動制御部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 program to be tested by the start control unit 21 will be described with reference to FIGS. 3A to 5A are timing charts showing the timing of calculation of a processing program whose activation is controlled by a control device of a real machine, and FIGS. FIG. 4 is a timing chart illustrating the timing of the operation of the controlled processing program. In these examples, the operation cycle “10 msec” and the priority “1” are set for the processing program “A” to be tested, and the operation cycle “20 msec” for the processing program “B” to be tested. And a priority “2” are set, and an operation cycle “40 msec” and a priority “3” are set for the processing program “C” to be tested. In this case, the processing cycles “10 msec”, “20 msec”, and “40 msec”, which are integral multiples of the minimum calculation cycle “10 msec”, are set in the respective processing programs “A”, “B”, and “C”. I have. Further, an RTOS (Real Time Operating System) is mounted on the control device of the real machine, and a timer (RTOS timer) having higher accuracy than the real time timer unit 23 of the simulation apparatus 1 is provided by the clock function of the RTOS. Has been realized.

図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 by using an RTOS timer with relatively high accuracy, so that the RTOS timer is set to “ At the timing of “0 msec”, the processing programs “A”, “B”, and “C” are activated in the order of priority. Next, only the processing program “A” is started at the timing of the RTOS timer “10 msec”, and thereafter, the processing programs “A” and “B” are started at the timing of the RTOS timer “20 msec” in the order of priority. You. Further, only the processing program “A” is activated at the timing when the RTOS timer is “30 msec”. As described above, in the actual machine, a plurality of processing programs are started by a single task at a predetermined calculation cycle and priority while referring to the RTOS timer, so that a plurality of processing programs can be executed for a predetermined time (for example, 40 msec). The relation of the number of executions among the programs "A", "B" and "C" is fixed. Specifically, the number of executions of the processing programs “A”, “B”, and “C” during 40 msec is set to four times, two times, and one time, 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 simulation apparatus 1, when the integrated value counted by the pseudo time timer unit 22 is the initial value “0 msec”, the integrated value is the processing program corresponding to the calculation cycle. “A”, “B”, and “C” are selected as processing programs to be activated, and the processing programs “A”, “B”, and “C” are activated by a single task in the order of priority. At this time, when the end of the execution of the processing program “C” having the lowest priority among the selected programs is detected, the integrated value is counted up by the value of the shortest operation cycle “10 msec”. Is updated to “10msec”. Next, only the processing program “A” whose integration value “10 msec” at that time corresponds to the calculation cycle is selected as the processing program to be activated, and after the processing program “A” is activated, the processing program “A” is activated. Is detected, the integrated value is counted up by the value of the shortest operation cycle “10 msec” and updated to “20 msec”. Thereafter, similarly, the processing programs "A" and "B" whose integration value "20 msec" corresponds to the calculation cycle are selected as the processing programs to be activated, and the processing programs "A" and "B" are activated in order. After that, when the end of the execution of the processing program “B” is detected, the integrated value is updated to “30 msec”. Next, only the processing program “A” whose integrated value “30 msec” corresponds to the calculation cycle is selected as the processing program to be started, and after the processing program “A” is started, the execution of the processing program “A” is executed. When the end is detected, the integrated value is updated to “40 msec”.

このような起動制御部21による起動制御により、実機における処理プログラム“A”,“B”,“C”の実時間“40msec”の間における実行回数の関係と同一の関係を、疑似時間タイマー部22が積算値“40msec”をカウントするまでの間で設定することができる。具体的には、シミュレーション装置1においても、積算値“40msec”をカウントする間の処理プログラム“A”,“B”,“C”の実行回数を、それぞれ、4回、2回、1回に設定することができる。   By the activation control by the activation control unit 21 as described above, the same relationship as the number of executions of the processing programs “A”, “B”, and “C” in the real time “40 msec” in the actual machine is changed to the pseudo time timer unit. 22 can be set until the integrated value “40 msec” is counted. Specifically, in the simulation apparatus 1, the number of executions of the processing programs “A”, “B”, and “C” during the counting of the integrated value “40 msec” is reduced to four, two, and one, respectively. Can be set.

図4(a)には、実機において複数の処理プログラムの実行が競合する場合を示している。つまり、RTOSタイマーが“10msec”のタイミングでは、図3(a)の場合と同様に、処理プログラム“A”の起動が制御されている。その一方、その時点で処理プログラム“C”が起動中であるために、処理プログラム“C”の実行が中断され優先度がより高い処理プログラム“A”の実行の割り込みが発生する。つまり、実機では、シングルタスク方式が採用されているので、処理プログラムの実行時間によっては優先度に従った割り込みが発生しうる。   FIG. 4A shows a case where the execution of a plurality of processing programs in the actual machine competes. 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 executing the processing program "A" having a higher priority is generated. That is, in the actual machine, since the single task system is adopted, 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, in the simulation device 1, an interrupt process cannot occur. That is, the processing programs “A”, “B”, and “C” to be activated are selected at the timing when the integrated value is “0 msec”, and after their activation is controlled, the processing program with the lowest priority is executed. This is because the integrated value is not counted up until the execution of C "is completed. Even in this case, the same relation as the relation between the number of executions of the processing programs "A", "B", and "C" in the actual machine can be set. Therefore, in the simulation apparatus 1, even when the clock precision is low and the calculation time cannot be managed accurately, the relationship between the number of executions can be faithfully reproduced.

図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 simultaneously competes in an actual machine. At the timing when the RTOS timer is “30 msec”, the execution of the three processing programs “A”, “B”, and “C” is in conflict, but the execution of the processing program “A” has the highest priority according to the 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. 5B, no interrupt processing occurs in the simulation apparatus 1, but the same relation as the relation between the number of executions of the processing programs "A", "B", and "C" in the actual machine. Can be set.

次に、図6を参照しながら、シミュレーション装置1による処理プログラムの起動制御の手順について説明する。図6は、シミュレーション装置1による処理プログラムの起動制御の手順を示すフローチャートである。   Next, a procedure of controlling the activation of the processing program by the simulation apparatus 1 will be described with reference to FIG. FIG. 6 is a flowchart illustrating a procedure of controlling the activation of the processing program by the simulation apparatus 1.

まず、シミュレーション装置1への外部からの指示入力により、複数の処理プログラムの試験が開始されると、積算値格納部30に格納された積算値が初期値“0msec”にリセットされる(ステップS01)。その後、ダウンロードされている試験対象の複数の処理プログラムに予め設定されている演算周期が特定される(ステップS02)。併せて、試験対象の複数の処理プログラムに予め設定されている優先順位も特定される(ステップS03)。   First, when a test of a plurality of processing programs is started in response to an external instruction input to the simulation apparatus 1, the integrated value stored in the integrated value storage unit 30 is reset to an initial value “0 msec” (step S01). ). Thereafter, the calculation cycle set in advance for the plurality of processing programs to be tested that are downloaded is specified (step S02). At the same time, the priorities set in advance for the plurality of processing programs to be tested are also specified (step S03).

続いて、シミュレーション装置1の起動制御部21により、疑似時間タイマー部22によってカウントされている現在の積算値が積算値格納部30から参照される(ステップS04)。次に、起動制御部21により、複数の処理プログラムの中から積算値が演算周期に対応する値に至っている処理プログラムが起動対象の処理プログラムとして抽出される(ステップS05)。   Subsequently, the activation control unit 21 of the simulation device 1 refers to the current integrated value counted by the pseudo time timer unit 22 from the integrated value storage unit 30 (Step S04). Next, the activation control unit 21 extracts a processing program whose integrated value has reached a value corresponding to the calculation cycle from the plurality of processing programs as a processing program to be activated (step S05).

その後、起動制御部21により、抽出された複数の処理プログラムが優先順位の順番に従ってシングルタスクで起動される(ステップS06)。そして、起動制御部21により、抽出された複数の処理プログラムの全ての実行の終了が検知される(ステップS07)。そうすると、疑似時間タイマー部22によって、最短の演算周期の分だけ積算値がカウントアップされる(ステップS08)。その後、試験終了の条件が満たされたか(例えば、所定の積算値に至ったか否か)が判定され(ステップS09)、条件を満たしていない場合は(ステップS09;NO)処理がステップS04に戻され、条件を満たしている場合には(ステップS09;YES)、処理が終了される。   After that, the activation control unit 21 activates the extracted plurality of processing programs in a single task according to the order of priority (step S06). Then, the completion of execution of all of the extracted plurality of processing programs is detected by the activation control unit 21 (step S07). Then, the pseudo time timer unit 22 counts up the integrated value by the shortest calculation cycle (step S08). Thereafter, it is determined whether a condition for ending the test is satisfied (for example, whether a predetermined integrated value is reached) (step S09). If the condition is not satisfied (step S09; NO), the process returns to step S04. If the condition is satisfied (step S09; YES), the processing is terminated.

以上説明したシミュレーション装置1によれば、起動制御部21によって、疑似時間タイマー部22によってカウントされる積算値に基づいて、その積算値が予め設定された処理周期に対応する値に至ったタイミングで、予め設定された優先順位に従って、複数の処理プログラム11a,11b,…が起動される。そして、起動対象の処理プログラム11a,11b,…の実行が終了したことを契機に、その処理プログラム11a,11b,…の最短の処理周期に対応する値だけ積算値がカウントアップされる。これにより、内蔵するクロックの精度に影響されることなく、所定時間内の複数の処理プログラム間の実行回数の関係を安定化させることができる。その結果、複数の処理プログラムの連携動作を効率的に確認することが可能となる。   According to the simulation device 1 described above, based on the integrated value counted by the pseudo time timer unit 22 by the activation control unit 21, at the timing when the integrated value reaches a value corresponding to a preset processing cycle. , A plurality of processing programs 11a, 11b,... Are started in accordance with a preset priority. When the execution of the processing program 11a, 11b,... To be started ends, the integrated value is counted up by the value corresponding to the shortest processing cycle of the processing program 11a, 11b,. This makes it possible to stabilize the relationship between the number of executions among a plurality of processing programs within a predetermined time 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.

例えば、シミュレーション装置1として使用される汎用コンピュータに内蔵されるOSのクロックはその精度が低い場合がある(例えば、40msec以上の誤差を有する)。その場合であっても、実機での所定時間(例えば、40msec)内での複数の処理プログラムの実行回数の関係を、それらの処理プログラムの実行順序を規定の順序に設定しながら、シミュレーション装置1でも保つことができる。その結果、互いにデータを入出力する複数の処理プログラム間の連携動作を、効率的に試験することができる。   For example, the clock of an OS built in a general-purpose computer used as the simulation apparatus 1 may have low accuracy (for example, an error of 40 msec or more). Even in such a case, the simulation apparatus 1 sets the relationship between the number of executions of a plurality of processing programs within a predetermined time (for example, 40 msec) in the actual machine while setting the execution order of the processing programs in a prescribed order. But you can keep it. As a result, the cooperative operation between a plurality of processing programs that input and output data to and from each other can be efficiently tested.

また、疑似時間タイマー部22は、複数の処理プログラムの処理周期のうちで最短の処理周期の分だけ積算値をカウントアップする。これにより、最小限の積算値の更新処理で積算値の示す所定時間内の複数の処理プログラム間の実行回数の関係を安定化させることができる。その結果、シミュレーション装置1の処理負荷を最小限にすることで安定した処理プログラムの実行確認が可能にされる。   In addition, the pseudo time timer unit 22 counts up the integrated value by the shortest processing cycle among the processing cycles of the plurality of processing programs. This makes it possible to stabilize the relationship of the number of executions between a plurality of processing programs within a predetermined time indicated by the integrated value by the minimum integrated value updating process. As a result, the processing load of the simulation apparatus 1 is minimized, so that the execution of the processing program can be confirmed stably.

なお、本発明は、上述した実施形態に限定されるものではない。   Note that the present invention is not limited to the embodiment described above.

例えば、シミュレーション装置1の疑似時間タイマー部22は、積算値をカウントアップする際に、シミュレーション装置1内の実時間タイマー部23によって計時されている実時間を参照しながら、カウントアップするまでの時間に待機時間を挿入してもよい。   For example, when counting up the integrated value, the pseudo time timer unit 22 of the simulation device 1 refers to the real time measured by the real time timer unit 23 in the simulation device 1 and counts the time until counting up. The waiting time may be inserted into the waiting time.

図7及び図8には、このような場合の起動制御部21による試験対象の処理プログラムの起動制御の例を示している。図7において、(a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、本変形例のシミュレーション装置1によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。図7の例では、図3と同様な演算時間及び優先度が設定されている。この場合、図3に示した例において積算値が“120msec”にカウントアップされる直前に待機時間が挿入されている。すなわち、疑似時間タイマー部22は、積算値を“120msec”にカウントアップする際に、実時間タイマー部23によってカウントされている実時間値を参照し、その実時間値が“120msec”に至るまで、すなわち、実時間値が更新後の積算値と同一時間の値になるまで待機時間Δtの間待機した後に、積算値を“120msec”にカウントアップする。このようにすることで、処理プログラムをユーザの体感時間と同じ時間で繰り返し実行させることができる。 FIGS. 7 and 8 show an example of the start control of the processing program to be tested by the start controller 21 in such a case. 7A is a timing chart showing the timing of the operation of the processing program whose activation is controlled by the control device of the actual machine, and FIG. 7B is a timing chart in which the activation is controlled by the simulation apparatus 1 of the present modification. FIG. 6 is a timing chart showing the timing of the operation of the processing program. In the example of FIG. 7, the same calculation time and priority as in FIG. 3 are set. In this case, in the example shown in FIG. 3, the waiting time is inserted immediately before the integrated value is counted up to “120 msec”. That is, when counting up the integrated value to “120 msec”, the pseudo time timer unit 22 refers to the real time value counted by the real time timer unit 23 and continues until the real time value reaches “120 msec”. That is, after waiting for the waiting time Δt 1 until the real time value becomes the same value as the updated integrated value, the integrated value is counted up to “120 msec”. By doing so, the processing program can be repeatedly executed in the same time as the user's bodily sensation time.

同様にして、疑似時間タイマー部22は、処理プログラムの繰り返し実行のペースを調整するために、積算値の示す時間が実時間に対して所定の比率となるように待機時間を挿入してもよい。図8において、(a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)〜(d)は、本変形例のシミュレーション装置1によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。これらの例においては、試験対象の処理プログラム“A”に対して演算周期“20msec”および優先度“1”が設定され、試験対象の処理プログラム“B”に対して演算周期“40msec”および優先度“2”が設定されている。そして、図8(b)に示す例においては、疑似時間タイマー部22は、積算値“120msec”をカウントアップする時点でその積算値の示す時間“120msec”が、実時間値の示す時間“120msec”と同一の時間となるように待機時間Δtを挿入する。これにより、処理プログラムの繰り返しのペースを実時間と一致させることができる。また、図8(c)に示す例においては、疑似時間タイマー部22は、積算値“120msec”をカウントアップする時点でその積算値の示す時間“120msec”が、実時間値の示す時間“60msec”の2倍の時間となるように待機時間Δtを挿入する。これにより、処理プログラムの繰り返しのペースを実時間よりも速くすることができる。また、図8(d)に示す例においては、疑似時間タイマー部22は、積算値“120msec”をカウントアップする時点でその積算値の示す時間“120msec”が、実時間値の示す時間“240msec”の0.5倍の時間となるように待機時間Δtを挿入する。これにより、処理プログラムの繰り返しのペースを実時間よりも遅くすることができる。 Similarly, the pseudo time timer unit 22 may insert a standby time such that the time indicated by the integrated value is a predetermined ratio to the real time in order to adjust the pace of the repetitive execution of the processing program. . 8A is a timing chart showing the timing of the operation of the processing program whose activation is controlled by the control device of the actual machine, and FIGS. 8B to 8D are diagrams illustrating the operation of the simulation apparatus 1 of the present modification. It is a timing chart which shows the timing of the calculation of the processing program by which starting was controlled. In these examples, the calculation cycle “20 msec” and the priority “1” are set for the processing program “A” to be tested, and the calculation cycle “40 msec” and the priority are set for the processing program “B” to be tested. The degree “2” is set. Then, in the example illustrated in FIG. 8B, the pseudo time timer unit 22 determines that the time “120 msec” indicated by the accumulated value is “120 msec” indicated by the real time value when the accumulated value “120 msec” is counted up. The standby time Δt 2 is inserted so as to be the same time as “”. Thereby, the repetition pace of the processing program can be made to match the real time. In addition, in the example illustrated in FIG. 8C, the pseudo time timer unit 22 counts up the integrated value “120 msec” and replaces the time “120 msec” indicated by the integrated value with the time “60 msec” indicated by the real time value. The standby time Δt 4 is inserted so that the time becomes twice as long as “”. Thus, the repetition pace of the processing program can be made faster than real time. In addition, in the example shown in FIG. 8D, the pseudo time timer unit 22 counts up the integrated value “120 msec”, and the time “120 msec” indicated by the integrated value becomes the time “240 msec” indicated by the real time value. The standby time Δt 6 is inserted such that the time becomes 0.5 times as long as “”. Thereby, the repetition pace of the processing program can be made slower than real time.

図9は、本変形例にかかるシミュレーション装置1による処理プログラムの起動制御の手順を示すフローチャートである。図9のステップS102〜ステップS107、及びステップS109〜ステップS110の処理は、上述した図6のステップS02〜ステップS09の処理と同一である。ステップS101では、積算値が初期値“0msec”にリセットされると同時に、実時間タイマー部23の保持する実時間値も初期値“0msec”にリセットされる。そして、ステップS108では、疑似時間タイマー部22が、積算値を所定値にカウントアップする際に実時間タイマー部23でカウントされている実時間値を参照しながら待機時間を挿入する(ステップS108)。   FIG. 9 is a flowchart illustrating a procedure for controlling the activation of the processing program by the simulation apparatus 1 according to the present modification. The processing in steps S102 to S107 and steps S109 to S110 in FIG. 9 is the same as the processing in steps S02 to S09 in FIG. 6 described above. In step S101, the integrated value is reset to the initial value “0 msec”, and at the same time, the real time value held by the real time timer unit 23 is reset to the initial value “0 msec”. Then, in step S108, the pseudo time timer unit 22 inserts the standby time while referring to the real time value counted by the real time timer unit 23 when counting up the integrated value to the predetermined value (step S108). .

以上のような変形例によれば、実時間に対する処理プログラムの実行周期を適宜調整して複数の処理プログラムの負荷を変えた試験が可能となる。すなわち、処理プログラムの繰り返しのペースを実機と同一にして複数の処理プログラムを対象にした実機を想定した試験を行うこともできるし、処理プログラムの繰り返しのペースを実機のペースに対して所定割合にして複数の処理プログラムの負荷を様々変更した試験を行うこともできる。   According to the above-described modified example, a test in which the load of a plurality of processing programs is changed by appropriately adjusting the execution cycle of the processing programs with respect to real time can be performed. In other words, it is possible to perform a test assuming an actual machine targeting a plurality of processing programs by setting the repetition rate of the processing program to be the same as that of the actual machine, or to set the repetition rate of the processing program to a predetermined rate with respect to the actual machine. Thus, a test in which the loads of a plurality of processing programs are variously changed can be performed.

また、本発明の他の変形例としては、互いに独立に優先順位が設定された複数の処理プログラム群を処理対象としてもよい。図10は、本発明の変形例にかかるシミュレーション装置1Aの構成を示している。このように、シミュレーション装置1Aには、処理プログラム11a,11b,…を含む処理プログラム群11と、処理プログラム12a,…を含む処理プログラム群12とが実装されている。そして、シミュレーション装置1Aの起動制御部21は、疑似時間タイマー部22がカウントした積算値を基に、2つの処理プログラム群11,12毎に起動タイミングを制御可能に構成されている。   Further, as another modified example of the present invention, a plurality of processing program groups having priorities set independently of each other may be processed. FIG. 10 shows a configuration of a simulation device 1A according to a modification of the present invention. Thus, the simulation device 1A has the processing program group 11 including the processing programs 11a, 11b,... And the processing program group 12 including the processing programs 12a,. The activation control unit 21 of the simulation apparatus 1A is configured to be able to control the activation timing for each of the two processing program groups 11 and 12 based on the integrated value counted by the pseudo time timer unit 22.

図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 start control of the processing program group to be tested by the start control unit 21 in such a case, and FIG. 11A shows the calculation of the processing program group whose start is controlled by the control device of the actual machine. FIG. 7B is a timing chart showing timing. FIG. 8B is a timing chart showing the timing of the operation of the processing program group whose activation is controlled by the simulation device based on the real-time value. It is a timing chart which shows the timing of the calculation of the processing program group whose start was controlled by the simulation apparatus 1A of the example. Here, one processing program group is configured by the processing programs “A” and “B”, and the other processing program group is configured by the processing program “C”. Furthermore, the other processing program group also includes a processing program “D” that simulates a data communication process between the processing program “C” and the processing program “A”. This processing program “D” is realized by, for example, data writing and reading operations on a shared memory in the simulation apparatus 1A. That is, a process of transmitting data from the device is simulated by writing data to the shared memory, and a process of receiving data by the device is simulated by reading data from the shared memory. The processing program “D” may be simulated by socket communication in the simulation device 1A. One processing program group corresponds to, for example, a program group executed in the control device of the actual machine, and the other processing program group corresponds to, for example, a program group executed in the control target apparatus of the actual machine. Then, an operation cycle “10 msec” and a priority “1” are set for the processing program “A” to be tested, and an operation cycle “20 msec” and the priority “2” for the processing program “B” to be tested. Is set, the operation cycle “60 msec” and the priority “3” are set for the processing program “B” to be tested, and the processing program “D” is set to be started immediately after the processing program “C”. Have been.

図11(b)に示すように、内蔵するクロック等を基にカウントされた実時間値を基に複数の処理プログラム群を起動させた場合は、クロックの精度が悪いために処理プログラム群の間の実行タイミングにずれが生じる。そのため、通信を伴う処理を試験しようとしても、処理プログラム間の通信を介した連携動作を再現することができない。これに対して、図11(c)に示すように、シミュレーション装置1Aによれば、処理プログラム群の起動制御に際して同一の積算値を参照することにより、処理プログラム群の間の実行タイミングのずれを防止できる。その結果、制御装置、制御対象装置等の複数の装置に実装される複数の処理プログラム間での連携動作の確認が可能となる。   As shown in FIG. 11B, when a plurality of processing program groups are started based on the real time value counted based on the built-in clock or the like, the processing program groups are not activated due to poor clock accuracy. In execution timing. Therefore, even if an attempt is made to test a process involving communication, it is not possible to reproduce a cooperative operation through communication between processing programs. On the other hand, as shown in FIG. 11 (c), according to the simulation apparatus 1A, by referring to the same integrated value at the time of controlling the activation of the processing programs, the deviation of the execution timing between the processing programs can be reduced. Can be prevented. As a result, it is possible to confirm a cooperative operation between a plurality of processing programs mounted on a plurality of devices such as a control device and a control target device.

1、1A シミュレーション装置
11、12 処理プログラム群
11a、11b、12a 処理プログラム
21 起動制御部
22 疑似時間タイマー部
23 実時間タイマー部
30 積算値格納部
1, 1A Simulation apparatus 11, 12 Processing program group 11a, 11b, 12a Processing program 21 Activation control unit 22 Pseudo time timer unit 23 Real time timer unit 30 Integrated value storage unit

Claims (5)

プラント設備の管理を行う制御装置で実行される複数の処理プログラムの試験を行うシミュレーション装置であって、
互いに処理の優先順位が設定され、それぞれに処理周期が設定された複数の処理プログラムと、
疑似的な時間を示す積算値をカウントする疑似時間計時手段と、
前記複数の処理プログラムの起動タイミングを制御する起動制御手段とを備え、
前記起動制御手段は、前記複数の処理プログラムのうちの起動対象の処理プログラムを、前記疑似時間計時手段によってカウントされた積算値が前記起動対象の処理プログラムに設定された前記処理周期に対応する値に至ったタイミングで、前記起動対象の処理プログラムに設定された前記優先順位に従って、起動させるように制御し、
前記疑似時間計時手段は、当該起動対象の処理プログラムの実行の終了が検知されたことを契機に、前記起動対象の処理プログラムに設定された処理周期に対応する値だけ前記積算値をカウントアップし、
前記複数の処理プログラムは、前記制御装置内で実行されるプログラムに対応する複数の処理プログラムを含む一方の処理プログラム群と、前記一方の処理プログラム群と独立に優先順位が設定された複数の処理プログラムであって、前記プラント設備である制御対象装置内で実行されるプログラムに対応する複数の処理プログラムを含む他方の処理プログラム群とによって構成され、
前記他方の処理プログラム群の前記複数の処理プログラムの中には、前記一方の処理プログラム群の前記処理プログラムと前記他方の処理プログラム群の前記処理プログラムとの間のデータ通信処理を模擬する処理プログラムが含まれており、
前記起動制御手段は、前記積算値に基づいて、前記一方の処理プログラム群及び前記他方の処理プログラム群毎に起動タイミングを制御可能とし、前記一方の処理プログラム群の前記複数の処理プログラムと前記他方の処理プログラム群の前記複数の処理プログラムとを並行して実行させる
シミュレーション装置。
A simulation device for testing a plurality of processing programs executed by a control device that manages plant equipment ,
A plurality of processing programs in which processing priorities are set to each other, and a processing cycle is set for each;
Pseudo time counting means for counting an integrated value indicating pseudo time;
Starting control means for controlling the starting timing of the plurality of processing programs,
The start control unit sets a start target processing program of the plurality of processing programs to a value corresponding to the processing cycle set in the start target processing program by an integrated value counted by the pseudo time counting unit. At the timing that has reached, according to the priority set in the processing program to be started, control to start,
The pseudo time counting means counts up the integrated value by a value corresponding to a processing cycle set in the processing program to be started upon detection of the end of execution of the processing program to be started. ,
Wherein the plurality of processing programs, a plurality of processes which priorities are set independently and one of the processing programs including a plurality of processing programs corresponding to the program to be executed within the control unit, and the one processing programs A program, and is configured by another processing program group including a plurality of processing programs corresponding to a program executed in the control target device which is the plant equipment ,
In said plurality of processing programs of the other processing programs, the processing program to simulate the data communication process between the processing program of the processing program and the other processing programs of the one processing programs Is included,
The activation control means is capable of controlling activation timing for each of the one processing program group and the other processing program group based on the integrated value, and the plurality of processing programs of the one processing program group and the other Causing the plurality of processing programs of the group of processing programs to be executed in parallel ,
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 plurality of processing programs, each of which the integrated value has reached a value corresponding to the processing cycle, and executes the selected plurality of activation target processes. Control to start the program according to the priority,
The pseudo time counting means counts the integrated value by a value corresponding to the shortest processing cycle when the end of execution of the plurality of processing programs to be started selected by the start control means is detected. Up,
The simulation device according to claim 1.
実時間を計時する実時間計時手段をさらに備え、
前記疑似時間計時手段は、前記積算値をカウントアップする際に、前記実時間計時手段によって計時された実時間を参照しながら当該カウントアップするまでの時間に待機時間を挿入する、
請求項1又は2記載のシミュレーション装置。
Further provided is a real-time clock means for measuring real time,
The pseudo time counting means, when counting up the integrated value, inserts a waiting time into the time up to the count up while referring to the actual time counted by the real time counting means,
The simulation device according to claim 1.
前記疑似時間計時手段は、前記実時間と前記積算値とが同一時間を表す値になるように、前記待機時間を挿入する、
請求項3記載のシミュレーション装置。
The pseudo time counting means inserts the standby time so that the real time and the integrated value are values representing the same time,
The simulation device according to claim 3.
前記疑似時間計時手段は、前記積算値の示す時間が実時間に対して所定の比率となるように、前記待機時間を挿入する、
請求項3記載のシミュレーション装置。
The pseudo time measuring means, the standby time is inserted so that the time indicated by the integrated value is a predetermined ratio to the actual time,
The simulation device according to claim 3.
JP2015111247A 2015-06-01 2015-06-01 Simulation equipment Active JP6676883B2 (en)

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 JP2016224753A (en) 2016-12-28
JP6676883B2 true 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)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
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
JP4137434B2 (en) * 2001-11-26 2008-08-20 三菱電機株式会社 Simulation method, simulation method, and computer-readable recording medium recording program
JP2007233930A (en) * 2006-03-03 2007-09-13 Shimadzu System Solutions Co Ltd Simulator for distributed control system
JP5542643B2 (en) * 2010-12-10 2014-07-09 三菱電機株式会社 Simulation apparatus and simulation program
JP4748286B1 (en) * 2011-03-15 2011-08-17 オムロン株式会社 Controller support apparatus, controller support program to be executed in the apparatus, recording medium storing the program, and method for estimating execution time 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
JP5980420B2 (en) * 2013-05-17 2016-08-31 三菱電機株式会社 Software test apparatus, software test method, and program

Also Published As

Publication number Publication date
JP2016224753A (en) 2016-12-28

Similar Documents

Publication Publication Date Title
US20120317555A1 (en) Application development enviroment for portable electronic devices
CN108459792B (en) Flow switching method and device and computer equipment
EP2816427B1 (en) Plc simulation system, plc simulator, recording medium, and simulation method
CN105653338B (en) A kind of update method and device of application
US20170322860A1 (en) Power monitoring system for virtual platform simulation
WO2014196059A1 (en) Microcontroller fault injection method and system
JP2017084082A (en) Simulation device, test scenario file creation method, and test method using test scenario file
JP6676883B2 (en) Simulation equipment
US20230367936A1 (en) Verification method, electronic device and storage medium
US20110161716A1 (en) Systems, methods, and apparatuses for providing access to real time information
CN117330935A (en) Integrated circuit testing method, device and medium
Arzenšek et al. Criteria for selecting mobile application testing tools
WO2016141973A1 (en) Method and device for automatic testing
US9823305B1 (en) Method and system for generating post-silicon validation tests
CN114153674A (en) Authentication method, authentication apparatus, electronic device, and computer-readable storage medium
CN117172168B (en) Method for realizing callback in simulation, electronic equipment and storage medium
US11579959B2 (en) Systems and methods for margin based diagnostic tools for priority preemptive schedulers
KR102050968B1 (en) Mobile device and operating method of the same
JP6620653B2 (en) Emulator for plant monitoring and control system
JP2010009279A (en) Debugging method and debugging program
JP2007140626A (en) Measurement condition generation device and method, program, and program verification device
CN117390853A (en) Simulation method, device, equipment and storage medium based on man-machine interaction
KR20180061590A (en) Software build system and software build method using the system
CN115599372A (en) Development system and method for offline software on-loop simulation
CN114860570A (en) Development board evaluation method and device for software as a service (SaaS) mode

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 Written amendment

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 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191210

A911 Transfer of reconsideration by examiner 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