JP2016224753A - Simulation device - Google Patents

Simulation device Download PDF

Info

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
Application number
JP2015111247A
Other languages
Japanese (ja)
Other versions
JP6676883B2 (en
Inventor
公友 越智
Kimitomo Ochi
公友 越智
一道 岡島
Kazumichi Okajima
一道 岡島
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)

Abstract

PROBLEM TO BE SOLVED: To stabilize the relationship of the number of times of execution among a plurality of processing programs having a plurality of operation cycles, and to efficiently confirm the cooperation operation of the plurality of processing programs.SOLUTION: A simulation device 1 comprises: a plurality of processing programs 11a, 11b, etc. to each of which a processing priority is set and a processing cycle is set; a pseudo-time timer unit 22 counting integrated values; and a start control unit 21 controlling start timing of the plurality of processing programs 11a, 11b, etc., the start control unit 21 controls the to-be-started processing program to be started at timing at which the integrated value reaches a value corresponding to the processing cycle set to the to-be-started processing program in accordance with the priority, and the pseudo-timer unit 22 counts up the integrated value by the value corresponding to the processing cycle set to the to-be-started processing program at an opportunity of detection of the end of execution of the to-be-started processing program.SELECTED DRAWING: Figure 1

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, Patent Document 1 below discloses a simulator system that combines a control device or an emulator thereof and a plant model. The 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 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.

本発明の好適な一実施形態に係るシミュレーション装置の構成概略図である。1 is a schematic configuration diagram of a simulation apparatus according to a preferred embodiment of the present invention. 図1の処理プログラムの一例を示すラダー図である。FIG. 2 is a ladder diagram illustrating an example of a processing program in FIG. 1. (a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、図1のシミュレーション装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of calculation of the processing program whose activation is controlled by the control device of the actual machine, and (b) is the calculation of the processing program whose activation is controlled by the simulation apparatus of FIG. It is a timing chart figure which shows a timing. (a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、図1のシミュレーション装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of calculation of the processing program whose activation is controlled by the control device of the actual machine, and (b) is the calculation of the processing program whose activation is controlled by the simulation apparatus of FIG. It is a timing chart figure which shows a timing. (a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、図1のシミュレーション装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of calculation of the processing program whose activation is controlled by the control device of the actual machine, and (b) is the calculation of the processing program whose activation is controlled by the simulation apparatus of FIG. It is a timing chart figure which shows a timing. 図1のシミュレーション装置による処理プログラムの起動制御の手順を示すフローチャートである。It is a flowchart which shows the procedure of starting control of the processing program by the simulation apparatus of FIG. (a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、本実施形態のシミュレーション装置1によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of calculation of a processing program whose activation is controlled by a control device of an actual machine, and (b) is a processing program whose activation is controlled by the simulation apparatus 1 of the present embodiment. It is a timing chart figure which shows the timing of a calculation. (a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)〜(d)は、変形例のシミュレーション装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of calculation of a processing program whose activation is controlled by a control device of an actual machine, and (b) to (d) are processes whose activation is controlled by a simulation device of a modified example. It is a timing chart figure which shows the timing of the calculation of a program. 変形例のシミュレーション装置による処理プログラムの起動制御の手順を示すフローチャートである。It is a flowchart which shows the procedure of starting control of the processing program by the simulation apparatus of a modification. 本発明の変形例にかかるシミュレーション装置の構成概略図である。It is a structure schematic diagram of the simulation apparatus concerning the modification of this invention. (a)は、実機の制御装置によって起動が制御された処理プログラム群の演算のタイミングを示すタイミングチャート図であり、(b)は、シミュレーション装置によって実時間値を基に起動が制御された処理プログラム群の演算のタイミングを示すタイミングチャート図であり、(c)は、本変形例のシミュレーション装置によって起動が制御された処理プログラム群の演算のタイミングを示すタイミングチャート図である。(A) is a timing chart showing the timing of calculation of a processing program group whose activation is controlled by a control device of a real machine, and (b) is a process whose activation is controlled by a simulation device based on real-time values. It is a timing chart figure which shows the timing of the calculation of a program group, (c) is a timing chart figure which shows the timing of the calculation of the processing program group by which starting was controlled by the simulation apparatus 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 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 simulation apparatus 1 shown in FIG. 1 is an apparatus for testing the operation of a processing program (also referred to as “logic”) installed in a control apparatus that monitors equipment such as plant equipment and manages the operation of equipment. Examples of the control device to be tested by the simulation apparatus 1 include a control device that controls the operation of the gas turbine of the power generation device, but the control device is not limited to this. The test target control device is configured by, for example, a PLC (programmable logic controller) or the like, and normally, logic that is activated at a plurality of priorities in a plurality of operation cycles is mounted.

シミュレーション装置1は、パーソナルコンピュータ、サーバ装置等に代表される汎用のコンピュータで構成される情報処理装置である。詳細には、シミュレーション装置1は、物理的には、1又は複数のCPUと、RAM及びROM等の主記憶装置と、外部装置との間でデータを送受信するデータ送受信デバイスである通信モジュールと、半導体メモリ及びハードディスク装置等の補助記憶装置と、マウス、タッチパネル及びキーボード等の入力デバイスと、ディスプレイ及びスピーカ等の出力デバイスとを含むコンピュータシステムとして構成されている。シミュレーション装置1の各機能は、CPU、RAM等のハードウェア上に1又は複数の所定のコンピュータソフトウェアを読み込ませることにより、CPUの制御のもとで通信モジュール、入力デバイス、および出力デバイスを動作させるとともに、RAMや補助記憶装置におけるデータの読み出し及び書き込みを行うことで実現される。   The simulation apparatus 1 is an information processing apparatus composed of a general-purpose computer typified by a personal computer, a server apparatus, and the like. Specifically, the simulation apparatus 1 physically includes one or a plurality of 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, The computer system includes 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. At the same time, 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, the 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,..., A start control unit (start control unit) 21, a pseudo time timer unit (pseudo time count unit) 22, A time timer unit (real time measuring means) 23 and an integrated value storage unit 30 are provided. Hereinafter, functions of the respective functional units of the simulation apparatus 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 apparatus 1, and can be executed by the simulation apparatus 1 by being read into the simulation apparatus 1 in advance. FIG. 2 is a ladder diagram illustrating an example of a processing program read into the simulation apparatus 1. This processing program is a program for PLC, (1) confirming the contents of the input value “x2”, (2) confirming the contents of the output value “y70”, (3) the input value “x2” is “ON”, or If the output value “y70” is “on”, the output value “y70” is set to “on”. The processing of (1) to (3) is performed. The operation of repeating the processes (1) to (3) is incorporated. In each of the plurality of processing programs 11a, 11b,..., Calculation 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 preset.

疑似時間タイマー部22は、疑似的な時間を示す積算値をカウントする。具体的には、疑似時間タイマー部22は、複数の処理プログラム11a,11b,…のうちの起動制御部21によって起動された処理プログラムの実行の終了が検知されたことを契機に、その処理プログラムに設定された演算周期に対応する値だけ積算値をカウントアップする。より具体的には、疑似時間タイマー部22は、起動制御部21によって起動された処理プログラムの実行の終了が検知されたことを契機に、複数の処理プログラム11a,11b,…のうちの最短の演算周期に対応する値だけ積算値をカウントアップする。そして、疑似時間タイマー部22は、カウントした最新の積算値を積算値格納部30に格納する。   The pseudo time timer unit 22 counts an integrated value indicating the pseudo time. Specifically, the pseudo time timer unit 22 is triggered by the detection of the end of execution of the processing program activated by the activation control unit 21 among the plurality of processing programs 11a, 11b,. The integrated value is counted up by the value corresponding to the calculation cycle set in. More specifically, the pseudo time timer unit 22 is the shortest of the plurality of processing programs 11a, 11b,... When the end of 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 calculation 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 means for measuring real time. For example, the real time timer unit 23 measures the real time using a clock included in an OS (Operating System) functioning in the simulation apparatus 1.

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

ここで、起動制御部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 start control unit 21 will be described with reference to FIGS. 3 to 5, (a) is a timing chart showing the calculation timing of the processing program whose activation is controlled by the actual control device, and (b) is activated by the simulation device 1 of the present embodiment. It is a timing chart figure which shows the timing of the calculation of the controlled processing program. In these examples, the calculation cycle “10 msec” and the priority “1” are set for the test target processing program “A”, and the calculation cycle “20 msec” for the test target processing program “B”. And the priority “2” is set, and the calculation cycle “40 msec” and the priority “3” are set for the processing program “C” to be tested. In this case, the processing periods “10 msec”, “20 msec”, and “40 msec”, which are integral multiples of the minimum calculation period “10 msec”, are set in the processing programs “A”, “B”, and “C”, respectively. Yes. In addition, an RTOS (Real Time Operating System) is mounted on the control device of the real machine, and a timer (RTOS timer) with higher accuracy than the real time timer unit 23 of the simulation apparatus 1 by the clock function of the RTOS. Is 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 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 simulation apparatus 1, a processing program in which the integrated value counted by the pseudo time timer unit 22 is the initial value “0 msec” and the integrated value corresponds to the calculation cycle. “A”, “B”, and “C” are selected as activation target processing programs, and the processing programs “A”, “B”, and “C” are activated in a single task according to the order of priority. At this time, when the end of 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 calculation cycle “10 msec”. Updated to “10msec”. Next, only the processing program “A” corresponding to the calculation cycle of the integrated value “10 msec” at that time is selected as the processing program to be activated, and after the processing program “A” is activated, the processing program “A” When the end of execution is detected, the integrated value is counted up by the value of the shortest calculation cycle “10 msec” and updated to “20 msec”. Thereafter, similarly, the processing program “A”, “B” corresponding to the calculation cycle of the integrated value “20 msec” is selected as the processing program to be activated, and the processing programs “A”, “B” are activated in turn. After that, the integrated value is updated to “30 msec” when the end of execution of the processing program “B” is detected. Next, only the processing program “A” whose integrated value “30 msec” 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 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 such activation control by the activation control unit 21, the same relationship as the number of execution times during the actual time “40 msec” of the processing programs “A”, “B”, “C” in the real machine is obtained as a pseudo time timer unit. It can be set until 22 counts the integrated value “40 msec”. Specifically, in the simulation apparatus 1 as well, the number of executions of the processing programs “A”, “B”, and “C” while counting the integrated value “40 msec” is 4 times, 2 times, and 1 time, respectively. Can be set.

図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 simulation apparatus 1 cannot generate an interrupt process. This is because the processing program “A”, “B”, “C” to be activated is selected at the timing when the integrated value is “0 msec” and the activation is controlled, and then the processing program with the lowest priority “ This is because the integrated value is not counted up until the execution of C ″ is completed. Even in this case, the same relationship as the relationship of 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 accuracy of the clock 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 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 simulation apparatus 1, but the same relationship as the number of execution times of the processing programs “A”, “B”, “C” in the actual machine. Can be set.

次に、図6を参照しながら、シミュレーション装置1による処理プログラムの起動制御の手順について説明する。図6は、シミュレーション装置1による処理プログラムの起動制御の手順を示すフローチャートである。   Next, a procedure for starting control of the processing program by the simulation apparatus 1 will be described with reference to FIG. FIG. 6 is a flowchart illustrating a procedure for starting control 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 by an instruction input from the outside to the simulation apparatus 1, the integrated value stored in the integrated value storage unit 30 is reset to the initial value “0 msec” (step S01). ). Thereafter, calculation cycles preset in the plurality of processing programs to be tested that have been downloaded are specified (step S02). At the same time, 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 current integrated value counted by the pseudo time timer unit 22 is referred to by the activation control unit 21 of the simulation apparatus 1 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 among a 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)、処理が終了される。   Thereafter, 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 start control unit 21 detects the end of execution of all the extracted processing programs (step S07). Then, the integrated value is counted up by the shortest calculation cycle by the pseudo time timer unit 22 (step S08). Thereafter, it is determined whether or not the test termination condition is satisfied (for example, whether or not a predetermined integrated value has been 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 process is terminated.

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

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

また、疑似時間タイマー部22は、複数の処理プログラムの処理周期のうちで最短の処理周期の分だけ積算値をカウントアップする。これにより、最小限の積算値の更新処理で積算値の示す所定時間内の複数の処理プログラム間の実行回数の関係を安定化させることができる。その結果、シミュレーション装置1の処理負荷を最小限にすることで安定した処理プログラムの実行確認が可能にされる。   Moreover, 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. As a result, the relationship of the number of executions between a plurality of processing programs within a predetermined time indicated by the integrated value can be stabilized by a minimum integrated value update process. As a result, it is possible to confirm the execution of a stable processing program by minimizing the processing load of the simulation apparatus 1.

なお、本発明は、上述した実施形態に限定されるものではない。   In addition, this invention is not limited to embodiment mentioned above.

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

図7及び図8には、このような場合の起動制御部21による試験対象の処理プログラムの起動制御の例を示している。図7において、(a)は、実機の制御装置によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図であり、(b)は、本変形例のシミュレーション装置1によって起動が制御された処理プログラムの演算のタイミングを示すタイミングチャート図である。図7の例では、図3と同様な演算時間及び優先度が設定されている。この場合、図3に示した例において積算値が“120msec”にカウントアップされる直前に待機時間が挿入されている。すなわち、疑似時間タイマー部22は、積算値を“120msec”にカウントアップする際に、実時間タイマー部23によってカウントされている実時間値を参照し、その実時間値が“120msec”に至るまで、すなわち、実時間値が更新後の積算値と同一時間の値になるまで待機時間Δtの間待機した後に、積算値を“120msec”にカウントアップする。このようにすることで、処理プログラムをユーザの体感時間と同じ時間で繰り返し実行させることができる。 7 and 8 show an example of the start control of the processing target test program by the start control unit 21 in such a case. 7A is a timing chart showing the timing of calculation of the processing program whose activation is controlled by the control device of the actual machine, and FIG. 7B is a timing chart showing the activation controlled by the simulation apparatus 1 of the present modification. It is a timing chart figure which shows the timing of the calculation of the processed program. In the example of FIG. 7, the calculation time and priority similar to those in FIG. 3 are set. In this case, in the example shown in FIG. 3, a waiting time is inserted immediately before the integrated value is counted up to “120 msec”. That is, the pseudo time timer unit 22 refers to the real time value counted by the real time timer unit 23 when counting up the integrated value to “120 msec”, and 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”. In this way, the processing program can be repeatedly executed in the same time as the user's experience 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 waiting time so that the time indicated by the integrated value is a predetermined ratio with respect to the actual time in order to adjust the pace of the repeated execution of the processing program. . In FIG. 8, (a) is a timing chart showing the calculation timing of the processing program whose activation is controlled by the control device of the actual machine, and (b) to (d) are executed by the simulation apparatus 1 of the present modification. It is a timing chart figure which shows the timing of the calculation of the processing program by which start was controlled. In these examples, the calculation cycle “20 msec” and priority “1” are set for the processing program “A” to be tested, and the calculation cycle “40 msec” and priority are set for the processing program “B” to be tested. The degree “2” is set. In the example shown in FIG. 8B, the pseudo time timer unit 22 counts the time “120 msec” indicated by the accumulated value at the time when the accumulated value “120 msec” is counted up to the time “120 msec indicated by the actual time value. The waiting time Δt 2 is inserted so as to be the same time as “”. Thereby, the repetition pace of the processing program can be matched with the real time. In the example shown in FIG. 8C, the pseudo time timer unit 22 counts the time “120 msec” indicated by the integrated value at the time when the integrated value “120 msec” is counted up to the time “60 msec indicated by the real time value. The waiting time Δt 4 is inserted so as to be twice as long as “”. Thereby, the repetition pace of a processing program can be made faster than real time. In the example shown in FIG. 8D, the pseudo time timer unit 22 counts the time “120 msec” indicated by the integrated value “240 msec” when the integrated value “120 msec” is counted up. The waiting time Δt 6 is inserted so as to be 0.5 times as long as “”. Thereby, the repetition pace of a 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 showing a procedure for starting control of a processing program by the simulation apparatus 1 according to the present modification. The processes in steps S102 to S107 and steps S109 to S110 in FIG. 9 are the same as the processes in steps S02 to S09 in FIG. 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 also reset to the initial value “0 msec”. 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 the integrated value is counted up to a predetermined value (step S108). .

以上のような変形例によれば、実時間に対する処理プログラムの実行周期を適宜調整して複数の処理プログラムの負荷を変えた試験が可能となる。すなわち、処理プログラムの繰り返しのペースを実機と同一にして複数の処理プログラムを対象にした実機を想定した試験を行うこともできるし、処理プログラムの繰り返しのペースを実機のペースに対して所定割合にして複数の処理プログラムの負荷を様々変更した試験を行うこともできる。   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 simulation apparatus 1A according to a modification of the present invention. As described above, the simulation apparatus 1A includes 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 1 </ b> A 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 the start control of the processing program group to be tested by the start control unit 21 in such a case. FIG. 11A shows the calculation of the processing program group whose start is controlled by the control device of the actual machine. It is a timing chart figure which shows a timing, (b) is a timing chart figure which shows the timing of the calculation of the processing program group by which starting was controlled by the simulation apparatus based on the real time value, (c) is this modification It is a timing chart figure which shows the timing of the calculation of the process program group by which the starting 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”. Further, the other processing program group includes a processing program “D” that simulates data communication processing between the processing program “C” and the processing program “A”. The processing program “D” is realized by, for example, data writing and reading operations with respect to the shared memory in the simulation apparatus 1A. In other words, the process of transmitting data from the apparatus is simulated by writing data to the shared memory, and the process of receiving data by the apparatus is simulated by reading data from the shared memory. The processing program “D” may be simulated by socket communication in the simulation apparatus 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, the calculation cycle “10 msec” and the priority “1” are set for the test target processing program “A”, and the calculation cycle “20 msec” and the priority “2” are set for the test target processing program “B”. Is set, the calculation 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 start immediately after the processing program “C”. Has been.

図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 simulation apparatus 1 </ b> A, by referring to the same integrated value in the start control of the processing program group, the execution timing shift between the processing program groups is reduced. Can be prevented. As a result, it is possible to check a cooperative operation among 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 積算値格納部
DESCRIPTION OF SYMBOLS 1, 1A Simulation apparatus 11, 12 Process program group 11a, 11b, 12a Process program 21 Start-up control part 22 Pseudo-time timer part 23 Real-time timer part 30 Integrated value storage part

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.
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 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)

* 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
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

Patent Citations (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
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