JP6157745B2 - Execution time estimation program and execution time estimation device - Google Patents
Execution time estimation program and execution time estimation device Download PDFInfo
- Publication number
- JP6157745B2 JP6157745B2 JP2016537683A JP2016537683A JP6157745B2 JP 6157745 B2 JP6157745 B2 JP 6157745B2 JP 2016537683 A JP2016537683 A JP 2016537683A JP 2016537683 A JP2016537683 A JP 2016537683A JP 6157745 B2 JP6157745 B2 JP 6157745B2
- Authority
- JP
- Japan
- Prior art keywords
- execution
- group
- ladder
- execution time
- common group
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000605 extraction Methods 0.000 claims description 73
- 238000000034 method Methods 0.000 claims description 46
- 238000012545 processing Methods 0.000 claims description 18
- 238000004364 calculation method Methods 0.000 claims description 11
- 239000000284 extract Substances 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 19
- 238000004519 manufacturing process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 235000002492 Rungia klossii Nutrition 0.000 description 1
- 244000117054 Rungia klossii Species 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000001343 mnemonic effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Programmable Controllers (AREA)
Description
本発明は、シーケンスプログラムの実行時間を推定する実行時間推定プログラムおよび実行時間推定装置に関する。 The present invention relates to an execution time estimation program and an execution time estimation device that estimate the execution time of a sequence program.
生産装置に求められる機能の高度化、複雑化に伴い、生産装置の動作を制御するFAコントローラのプログラムも複雑化し容量も拡大し続けている。FAコントローラで主に用いられるプログラミング言語は、ラダープログラムである。このラダープログラムは、汎用機で広く用いられているC,C++といった高級言語と比較し、大規模なプログラムの開発を支援するツールが整備されていない。 With the sophistication and complexity of functions required for production equipment, the FA controller program that controls the operation of production equipment has become more complex and capacity has continued to expand. A programming language mainly used in the FA controller is a ladder program. This ladder program does not have tools for supporting the development of a large-scale program as compared with high-level languages such as C and C ++ widely used in general-purpose machines.
ラダープログラムは、リレーとコイルといった電子部品からシーケンス制御信号を作りだす制御盤をメタファーとしたプログラミング言語であり、プログラミングの知識が無い電気設計者、現場の技術者にも容易に理解できることを目指して作られた。このようなラダープログラムでは、数多くの入力デバイスの値および内部状態の値から、論理式によって出力デバイスの値を決める処理を容易に記述することができる。また、ラダープログラムにおける制御の流れは、基本的にはラダープログラムの上から下に順に実行し、最後まで実行が終わったら最初に戻り再度実行するといった処理が繰り返されるものである。 Ladder program is a programming language that uses a control panel that creates sequence control signals from electronic components such as relays and coils as a metaphor, and is designed to be easily understood by electrical designers who have no programming knowledge and engineers on site. It was. In such a ladder program, it is possible to easily describe a process for determining an output device value by a logical expression from a number of input device values and internal state values. The control flow in the ladder program is basically executed in order from the top to the bottom of the ladder program, and when the execution is completed to the end, the process returns to the beginning and is executed again.
上述したように、ラダープログラムは大規模化する傾向にある。このような場合であっても、生産装置の制御を考えると、周辺装置との協調動作やエラー判定の必要上、ラダープログラムを一通り上から下まで実行する時間であるスキャンタイムが一定時間内に収まるようラダープログラムの設計を行う必要がある。ところが、ラダープログラムが大規模になった場合、スキャンタイムを正確に見積もることが困難となる。 As described above, ladder programs tend to become large-scale. Even in such a case, considering the control of the production device, the scan time, which is the time to execute the ladder program from top to bottom, is within a certain time due to the need for cooperative operation with peripheral devices and error determination. It is necessary to design the ladder program so that it fits in However, when the ladder program becomes large-scale, it is difficult to accurately estimate the scan time.
このため、特許文献1に記載のPLCシミュレータは、ラダープログラムに使用される各命令のPLCにおける実行処理時間データを用いている。そして、PLCシミュレータは、ラダープログラムの模擬実行処理において、ラダープログラムを構成するニモニックコマンド毎の処理時間及び通信の周辺処理時間を積算し、これにより実行論理時間を生成している。 For this reason, the PLC simulator described in Patent Document 1 uses execution processing time data in the PLC of each instruction used in the ladder program. The PLC simulator integrates the processing time for each mnemonic command constituting the ladder program and the peripheral processing time for communication in the simulation execution process of the ladder program, thereby generating an execution logic time.
しかしながら、上記従来の技術では、ラダープログラムの平均的な実行時間しか求めることができず、最も時間がかかるケースでのスキャンタイムを見積もることができないという問題があった。 However, the above-described conventional technique has a problem that only the average execution time of the ladder program can be obtained, and the scan time cannot be estimated in the case that takes the longest time.
本発明は、上記に鑑みてなされたものであって、ラダープログラムに対して、最も時間がかかるケースでのスキャンタイムを見積もることができる実行時間推定プログラムおよび実行時間推定装置を得ることを目的とする。 The present invention has been made in view of the above, and it is an object of the present invention to obtain an execution time estimation program and an execution time estimation device that can estimate the scan time in the case that takes the longest time for a ladder program. To do.
上述した課題を解決し、目的を達成するために、本発明は、コントローラで用いられるラダープログラムの実行時間を推定する処理をコンピュータに実行させる実行時間推定プログラムであって、前記コンピュータに、前記ラダープログラムから、ファームウエアで実行されるソフトウエア命令と、当該ソフトウエア命令の実行条件と、の組を、複数抽出して組情報とする組合せ抽出ステップと、抽出された複数の組情報に対し、前記実行条件で共通のデバイスが用いられる組情報の集合である第1の組集合毎にグループ分けを行なうことによって、前記第1の組集合が入れられたデバイス共通グループを、前記第1の組集合毎に生成する共通グループ生成ステップと、前記デバイス共通グループの中で同時に実行される可能性のあるソフトウエア命令を有した組情報の集合である第2の組集合毎にグループ分けを行なうことによって、第2の組集合が入れられた同時実行グループを、前記第2の組集合毎に生成する同時実行グループ生成ステップと、各前記デバイス共通グループに対し、前記デバイス共通グループ内の同時実行グループの中から、前記ソフトウエア命令の実行時間が最も長くなる同時実行グループを抽出するグループ抽出ステップと、抽出した同時実行グループを実行した場合の前記ソフトウエア命令の実行時間に基づいて、前記ラダープログラムを一通り実行した場合のスキャンタイムのうち、実行時間が最も長くなる場合のスキャンタイムを算出するスキャンタイム算出ステップと、を実行させ、前記共通グループ生成ステップでは、前記コンピュータに、前記複数の組情報の中から任意の1つの組情報を選択する処理と、選択した組情報を前記デバイス共通グループに入れる処理と、前記選択した組情報の実行条件に含まれるデバイスに基づいて、グループ分けの行われていない組情報の何れかを前記デバイス共通グループに入れる処理と、を実行させることを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention provides an execution time estimation program for causing a computer to execute a process for estimating the execution time of a ladder program used in a controller, wherein the computer includes the ladder From the program, a combination extraction step of extracting a plurality of sets of software instructions executed by firmware and execution conditions of the software instructions to set the set information, and a plurality of set information extracted, By performing grouping for each first set set which is a set of set information in which a common device is used under the execution condition, the device common group in which the first set set is included is changed to the first set. Common group generation step for each set and software that may be executed simultaneously in the device common group Simultaneously generating a simultaneous execution group in which the second set set is entered for each second set by performing grouping for each second set that is a set of set information having an air command An execution group generating step, and for each of the device common groups, a group extraction step of extracting a simultaneous execution group having the longest execution time of the software instruction from among the simultaneous execution groups in the device common group; Based on the execution time of the software instruction when the concurrent execution group is executed, the scan time for calculating the scan time when the execution time becomes the longest among the scan times when the ladder program is executed one by one a calculation step, is executed, in the common group generation step, the computer, Based on a process for selecting any one set information from the plurality of set information, a process for putting the selected set information into the device common group, and a device included in the execution condition of the selected set information, And a process of putting any group information that has not been grouped into the device common group .
本発明によれば、ラダープログラムに対して、最も時間がかかるケースでのスキャンタイムを見積もることが可能になるという効果を奏する。 According to the present invention, it is possible to estimate the scan time in the case that takes the longest time for the ladder program.
以下に、本発明の実施の形態に係る実行時間推定プログラムおよび実行時間推定装置を図面に基づいて詳細に説明する。なお、本実施の形態により本発明が限定されるものではない。 Hereinafter, an execution time estimation program and an execution time estimation apparatus according to embodiments of the present invention will be described in detail with reference to the drawings. In addition, this invention is not limited by this Embodiment.
実施の形態
図1は、本発明の実施の形態に係る実行時間推定装置の構成を示す図である。実行時間推定装置10は、シーケンスプログラムの実行時間を推定するコンピュータなどである。以下では、シーケンスプログラムが、PLC(Programmable Logic Controller)などのコントローラで用いられるラダープログラムである場合について説明する。Embodiment FIG. 1 is a diagram showing a configuration of an execution time estimation apparatus according to an embodiment of the present invention. The execution
実行時間推定装置10は、ラダープログラムを一通り上から下まで実行する時間であるスキャンタイムを、ラダープログラムの実行時間として算出する。本実施の形態の実行時間推定装置10は、ラダープログラムの実行時間が最も長くなる場合のスキャンタイム(以下、最大スキャンタイム30という)を推定する。
The execution
ラダープログラムには、実行条件が真の時のみ実行されるSW(ソフトウエア)命令が含まれている。このため、ラダープログラムが実行された場合、SW命令が実行される場合と、実行されない場合とで、ラダープログラムの実行時間が異なることとなる。実行時間推定装置10は、ラダープログラムを最初から最後まで実行した場合に最も時間がかかるケースでの最大スキャンタイム30を推定する。
The ladder program includes a SW (software) instruction that is executed only when the execution condition is true. For this reason, when the ladder program is executed, the execution time of the ladder program differs depending on whether the SW instruction is executed or not. The execution
実行時間推定装置10は、受付部11、回路ブロック抽出部12、組合せ情報抽出部13、SW命令群抽出部(同時実行グループ生成部)14、実行時間推定部(グループ抽出部、スキャンタイム算出部)15、出力部16、記憶部17、共通グループ生成部18を備えている。
The execution
受付部11は、ラダープログラムのIL(Instruction List)表現を示すIL表現情報20を受付ける。受付部11は、データベースなどの外部装置から入力されたIL表現情報20を回路ブロック抽出部12に送る。
The accepting
ラダープログラムは、ラダー図表現やIL表現で表される。図2は、ラダー図表現されたラダープログラムの一例を示す図である。図3は、IL表現されたラダープログラムの一例を示す図である。図2と図3に示すラダープログラムは、同じものである。 A ladder program is represented by a ladder diagram expression or an IL expression. FIG. 2 is a diagram illustrating an example of a ladder program expressed as a ladder diagram. FIG. 3 is a diagram illustrating an example of a ladder program expressed in IL. The ladder program shown in FIGS. 2 and 3 is the same.
ラダープログラムには、ハードウエアにて実行されるHW(ハードウエア)命令と、ファームウエアにて実行されるSW命令とが含まれている。PLCのアーキテクチャでは、HW命令は、前段での論理式の値に関わらず実行され、SW命令は、前段の論理式が真の時のみ実行される。 The ladder program includes an HW (hardware) instruction executed by hardware and an SW instruction executed by firmware. In the PLC architecture, the HW instruction is executed regardless of the value of the logical expression in the previous stage, and the SW instruction is executed only when the logical expression in the previous stage is true.
HW命令は、一定の時間を要する命令である。SW命令が実行されるか否かは、SW命令の前段に連なる論理式(以下、実行条件部という)の値によって決められる。具体的には、SW命令は、実行条件部の値が真になる場合にのみ実行される。このため、SW命令は、実行条件部の値が真になる場合にのみ実行時間がかかる。本実施の形態の実行時間推定装置10は、SW命令のうち、同時に実行されることのないSW命令群に基づいて、最大スキャンタイム30を推定する。
The HW command is a command that requires a certain time. Whether or not the SW instruction is executed is determined by the value of a logical expression (hereinafter referred to as an execution condition part) connected to the preceding stage of the SW instruction. Specifically, the SW instruction is executed only when the value of the execution condition part becomes true. For this reason, the SW instruction takes an execution time only when the value of the execution condition part becomes true. The execution
HW命令は、
LD X0
AND X1
OUT Y102
などである。HW command is
LD X0
AND X1
OUT Y102
Etc.
SW命令は、SwOp0〜SwOp5などである。そして、SwOp0の実行条件部が、
LD X0
AND X1
である。The SW instructions are SwOp0 to SwOp5. And the execution condition part of SwOp0 is
LD X0
AND X1
It is.
したがって、
LD X0
AND X1
が真の時のみ、SwOp0が実行されることとなる。Therefore,
LD X0
AND X1
SwOp0 is executed only when is true.
回路ブロック抽出部12は、IL表現情報20内からIL表現で示された回路ブロックを抽出する。回路ブロック抽出部12は、抽出した各回路ブロックを、組合せ情報抽出部13に送る。
The circuit
組合せ情報抽出部13は、IL表現された回路ブロック内からSW命令と、SW命令の実行条件部との組を備えた組情報(以下、ラダー枝という)を抽出する。組合せ情報抽出部13は、抽出したラダー枝を共通グループ生成部18に送る。
The combination
共通グループ生成部18は、ラダー枝に基づいて、実行条件部に共通のデバイスが使われるラダー枝の集合である第1の組集合をラダー枝毎にグルーピングする。共通グループ生成部18は、実行条件部に共通のデバイスが使われるラダー枝集合(以下、デバイス共通グループという)を生成することによってラダー枝をグルーピングする。 Based on the ladder branch, the common group generation unit 18 groups a first set set, which is a set of ladder branches in which devices common to the execution condition unit are used, for each ladder branch. The common group generation unit 18 groups ladder branches by generating a ladder branch set (hereinafter referred to as a device common group) in which a common device is used in the execution condition unit.
換言すると、共通グループ生成部18は、抽出された複数のラダー枝に対し、実行条件部で共通のデバイスが用いられるラダー枝(以下、共通ラダー枝という)の集合毎にグループ分けを行なう。これにより、共通グループ生成部18は、共通ラダー枝が入れられたデバイス共通グループを、共通ラダー枝毎に生成する。共通グループ生成部18は、デバイス共通グループをSW命令群抽出部14に送る。
In other words, the common group generation unit 18 groups the extracted plurality of ladder branches for each set of ladder branches (hereinafter referred to as common ladder branches) in which a common device is used in the execution condition unit. As a result, the common group generation unit 18 generates a device common group in which the common ladder branch is inserted for each common ladder branch. The common group generation unit 18 sends the device common group to the SW instruction
SW命令群抽出部14は、デバイス共通グループの中で同時に実行される可能性のあるラダー枝集合である第2の組集合をラダー枝集合(以下、SW命令群という)毎にグルーピングする。これにより、SW命令群抽出部14は、SW命令群が入れられたグループ、つまり後述する同時実行グループを、SW命令群毎に生成する。
The SW instruction
実行条件部で共通のデバイスが用いられるラダー枝集合が共通ラダー枝であり、この共通ラダー枝が入れられたグループがデバイス共通グループである。したがって、共通ラダー枝毎にデバイス共通グループが生成される。そして、デバイス共通グループ内で同時に実行される可能性のあるラダー枝集合が、SW命令群であり、このSW命令群が入れられたグループが同時実行グループである。 A ladder branch set in which a common device is used in the execution condition part is a common ladder branch, and a group including the common ladder branch is a device common group. Therefore, a device common group is generated for each common ladder branch. A set of ladder branches that may be executed simultaneously in the device common group is a SW instruction group, and a group including the SW instruction group is a simultaneous execution group.
デバイス共通グループ内でラダー枝が同時実行グループ毎にグループ分けされることによって、デバイス共通グループ内で同時に実行されることのないラダー枝集合が異なるグループに設定される。したがって、同一の同時実行グループに入っているラダー枝同士は、同時に実行される可能性のあるラダー枝であり、異なる同時実行グループに入っているラダー枝同士は、同時に実行されることのないラダー枝である。SW命令群抽出部14は、グルーピング結果を、実行時間推定部15に送る。
In the device common group, ladder branches are grouped for each simultaneous execution group, so that a set of ladder branches that are not executed simultaneously in the device common group is set to a different group. Therefore, ladder branches that belong to the same concurrent execution group are ladder branches that may be executed simultaneously, and ladder branches that belong to different concurrent execution groups do not execute simultaneously. It is a branch. The SW instruction
記憶部17は、インストラクション実行時間データ21を記憶する例えばメモリである。インストラクション実行時間データ21は、各SW命令の実行時間および各HW命令の実行時間の情報を含んでいる。具体的には、インストラクション実行時間データ21では、SW命令と実行時間とが対応付けされ、HW命令と実行時間とが対応付けされている。
The storage unit 17 is, for example, a memory that stores instruction
実行時間推定部15は、グルーピング結果およびインストラクション実行時間データ21に基づいて、最大スキャンタイム30を推定する。具体的には、実行時間推定部15は、同時に実行されることのないラダー枝集合であるSW命令群毎の実行時間を推定する。実行時間推定部15は、デバイス共通グループ毎にSW命令群を設定し、デバイス共通グループ毎にSW命令群毎の実行時間を推定する。
The execution
そして、実行時間推定部15は、デバイス共通グループの中のSW命令群の中で各命令の実行時間の合計が最も長いSW命令群を最大スキャンタイム30に寄与するSW命令群に採用する。実行時間推定部15は、デバイス共通グループ毎に最大スキャンタイム30に寄与するSW命令群を設定する。
Then, the execution
実行時間推定部15は、最大スキャンタイム30に寄与するSW命令群に対し、インストラクション実行時間データ21に基づいて、最大スキャンタイム30に寄与するSW命令群の実行時間を算出する。また、実行時間推定部15は、HW命令に対し、インストラクション実行時間データ21に基づいて、HW命令の実行時間を算出する。
The execution
実行時間推定部15は、デバイス共通グループ毎のSW命令群の実行時間を全て加算することによって、SW命令の最大の実行時間を推定する。実行時間推定部15は、SW命令の最大の実行時間と、HW命令の実行時間とを加算することによって最大スキャンタイム30を推定する。
The execution
換言すると、実行時間推定部15は、デバイス共通グループ毎にSW命令の実行時間を算出する処理と、算出した各実行時間の合計時間と、HW命令の実行時間の合計時間とを合算する処理とを実行することによって、最大スキャンタイム30を算出する。実行時間推定部15は、最大スキャンタイム30を出力部16に送る。出力部16は、最大スキャンタイム30を外部装置に出力する。
In other words, the execution
つぎに、実行時間推定装置10による実行時間の推定処理手順について説明する。図4は、実行時間推定装置による実行時間の推定処理手順を示すフローチャートである。実行時間推定装置10の受付部11は、IL表現情報20を受付けると、IL表現情報20を回路ブロック抽出部12に送る。
Next, an execution time estimation processing procedure performed by the execution
回路ブロック抽出部12は、IL表現情報20内からIL表現で示された回路ブロックを抽出する(ステップS10)。組合せ情報抽出部13は、回路ブロックからSW命令と、SW命令の実行条件部と、を抽出する。具体的には、組合せ情報抽出部13は、各回路ブロックのIL表現に対して、ANDノードとORノードとを、入れ子を用いた木表現(以下、ラダー木という)に変換する。そして、組合せ情報抽出部13は、各ラダー木に対して先頭から順にラダー木を巡回し、ラダー木から、SW命令と、SW命令の実行条件部との組であるラダー枝を抽出する(ステップS20)。
The circuit
図5は、ラダー枝の抽出処理を説明するための図である。各回路ブロックのIL表現は、ラダー木に変換される。そして、各ラダー木からは、SW命令と、SW命令の実行条件部との組であるラダー枝が抽出される。組合せ情報抽出部13は、抽出したラダー枝を共通グループ生成部18に送る。
FIG. 5 is a diagram for explaining ladder branch extraction processing. The IL representation of each circuit block is converted into a ladder tree. Then, from each ladder tree, a ladder branch that is a set of the SW instruction and the execution condition part of the SW instruction is extracted. The combination
共通グループ生成部18は、ラダー枝に基づいて、実行条件部に共通のデバイスが使われるラダー枝毎にグルーピングする(ステップS30)。共通グループ生成部18は、実行条件部に共通のデバイスが使われる共通ラダー枝の集合、つまりデバイス共通グループを生成することによってラダー枝をグルーピングする。共通グループ生成部18は、共通ラダー枝の入れられたデバイス共通グループをSW命令群抽出部14に送る。
Based on the ladder branch, the common group generation unit 18 performs grouping for each ladder branch in which a common device is used in the execution condition unit (step S30). The common group generation unit 18 groups ladder branches by generating a set of common ladder branches in which devices common to the execution condition unit are used, that is, a device common group. The common group generation unit 18 sends the device common group including the common ladder branch to the SW instruction
SW命令群抽出部14は、デバイス共通グループの中で同時に実行される可能性のあるラダー枝集合をグルーピングする。これにより、SW命令群抽出部14は、デバイス共通グループの中で同時に実行されることのないラダー枝集合をグルーピングする(ステップS40)。SW命令群抽出部14は、デバイス共通グループ毎に、ラダー枝集合をグルーピングする。SW命令群抽出部14は、デバイス共通グループの中で同時に実行されることのないラダー枝集合を、同時に実行されることのないSW命令群として実行時間推定部15に送る。
The SW instruction
実行時間推定部15は、同時に実行されることのないSW命令群に基づいて、最大スキャンタイム30を推定する(ステップS50)。具体的には、実行時間推定部15は、各デバイス共通グループ内でSW命令群毎の実行時間を比較する。この比較のとき、実行時間推定部15は、インストラクション実行時間データ21に基づいて、各SW命令群の実行時間を算出し、SW命令群の実行時間同士を比較する。
The execution
実行時間推定部15は、SW命令群の中で実行時間の最も長いSW命令群の実行時間を、デバイス共通グループ毎に抽出し、抽出した各実行時間を全て積算する。実行時間推定部15は、積算結果をSW命令の最大の実行時間とし、HW命令の実行時間と足し合わせることによって最大スキャンタイム30を推定する。
The execution
つぎに、デバイス共通グループの生成処理について説明する。図6は、デバイス共通グループの生成処理手順を示すフローチャートである。図7は、デバイス共通グループの生成処理を説明するための図である。 Next, device common group generation processing will be described. FIG. 6 is a flowchart showing a device common group generation processing procedure. FIG. 7 is a diagram for explaining a device common group generation process.
図7では、図5の説明で抽出された全てのラダー枝集合を、全ラダー枝集合50として示している。全ラダー枝集合50内には、SwOp0〜SwOp5に対応するラダー枝41〜45が含まれている。共通グループ生成部18は、デバイス共通グループを1つ生成する(ステップS21)。図7では、デバイス共通グループ51が生成された場合を示している。このデバイス共通グループ51は、生成された時点では空であり(st100)、ラダー枝集合が入っていない。
In FIG. 7, all ladder branch sets extracted in the description of FIG. 5 are shown as all ladder branch sets 50. The entire ladder branch set 50 includes
共通グループ生成部18は、デバイス共通グループ51を生成した後に、全ラダー枝集合50の中から任意のラダー枝を1つ選択し、生成したデバイス共通グループ51内に入れる(ステップS22)。デバイス共通グループ51内に入れられたラダー枝は、全ラダー枝集合50内から削除される。図7では、SwOp0のラダー枝41が選択されて(st101)、デバイス共通グループ51内に入れられた場合を示している(st102)。
After generating the device
共通グループ生成部18は、全ラダー枝集合50内に、他に選択できるラダー枝が有るかを確認する(ステップS23)。全ラダー枝集合50内に選択できるラダー枝が有る場合(ステップS23、Yes)、共通グループ生成部18は、ラダー枝41で用いられている全てのデバイスX0,X1について全ラダー枝集合50内を調べたかを確認する(ステップS24)。
The common group generation unit 18 checks whether there are other ladder branches that can be selected in the entire ladder branch set 50 (step S23). When there is a ladder branch that can be selected in the entire ladder branch set 50 (step S23, Yes), the common group generation unit 18 moves through the entire ladder branch set 50 for all devices X0 and X1 used in the
全てのデバイスについて調べていない場合(ステップS24、No)、共通グループ生成部18は、デバイス共通グループ51内のラダー枝41が有する実行条件部で使われているデバイスX0,X1で、未調査のデバイスを1つ選択する(ステップS25)。共通グループ生成部18は、例えば、デバイスX0を選択する。
If all the devices have not been checked (No in step S24), the common group generation unit 18 uses the devices X0 and X1 used in the execution condition unit of the
共通グループ生成部18は、全ラダー枝集合50の中から、選択したデバイスX0を実行条件部で用いているすべてのラダー枝を選択する(ステップS26)。共通グループ生成部18は、選択したラダー枝を、共通デバイスX0を持つデバイス共通グループに入れるとともに、全ラダー枝集合から削除する(ステップS27)。図7では、SwOp3のラダー枝43が選択されて、デバイス共通グループ51内に入れられた場合を示している(st103)。
The common group generation unit 18 selects all ladder branches that use the selected device X0 in the execution condition unit from the entire ladder branch set 50 (step S26). The common group generation unit 18 puts the selected ladder branch into the device common group having the common device X0 and deletes it from the entire ladder branch set (step S27). FIG. 7 shows a case where the
この後、共通グループ生成部18は、全ラダー枝集合50内に、他に選択できるラダー枝が有るかを確認する(ステップS23)。全ラダー枝集合50内に選択できるラダー枝が有る場合(ステップS23、Yes)、共通グループ生成部18は、ラダー枝41で用いられている全てのデバイスX0,X1について全ラダー枝集合50内を調べたかを確認する(ステップS24)。
Thereafter, the common group generation unit 18 confirms whether there are other ladder branches that can be selected in the entire ladder branch set 50 (step S23). When there is a ladder branch that can be selected in the entire ladder branch set 50 (step S23, Yes), the common group generation unit 18 moves through the entire ladder branch set 50 for all devices X0 and X1 used in the
全てのデバイスX0,X1について調べていない場合(ステップS24、No)、共通グループ生成部18は、デバイス共通グループ51内のラダー枝41が有する実行条件部で使われているデバイスX0,X1で、未調査のデバイスを1つ選択する(ステップS25)。共通グループ生成部18は、例えば、デバイスX1を選択する。
When all the devices X0 and X1 are not checked (step S24, No), the common group generation unit 18 is the devices X0 and X1 used in the execution condition unit included in the
共通グループ生成部18は、全ラダー枝集合50の中から、選択したデバイスX1を実行条件部で用いているラダー枝を選択する(ステップS26)。共通グループ生成部18は、選択したラダー枝を、共通デバイスを持つデバイス共通グループに入れるとともに、全ラダー枝集合から削除する(ステップS27)。図7では、SwOp5のラダー枝45が選択されて、デバイス共通グループ51内に入れられた場合を示している(st104)。
The common group generation unit 18 selects a ladder branch that uses the selected device X1 in the execution condition unit from the entire ladder branch set 50 (step S26). The common group generation unit 18 puts the selected ladder branch into a device common group having a common device and deletes it from the entire ladder branch set (step S27). FIG. 7 shows a case where the
この後、共通グループ生成部18は、全ラダー枝集合50内に、他に選択できるラダー枝が有るかを確認する(ステップS23)。全ラダー枝集合50内に選択できるラダー枝が有る場合(ステップS23、Yes)、共通グループ生成部18は、ラダー枝41で用いられている全てのデバイスX0,X1について調べたかを確認する(ステップS24)。
Thereafter, the common group generation unit 18 confirms whether there are other ladder branches that can be selected in the entire ladder branch set 50 (step S23). When there is a ladder branch that can be selected in the entire ladder branch set 50 (Yes in step S23), the common group generation unit 18 confirms whether or not all devices X0 and X1 used in the
全てのデバイスX0,X1について調べた場合(ステップS24、Yes)、共通グループ生成部18は、全ラダー枝集合50に対し、ラダー枝がなくなるまでステップS21〜S27の処理を繰り返す。 When all the devices X0 and X1 are examined (step S24, Yes), the common group generation unit 18 repeats the processes of steps S21 to S27 for all ladder branch sets 50 until there are no ladder branches.
すなわち、共通グループ生成部18は、デバイス共通グループを1つ生成する(ステップS21)(st105)。図7では、デバイス共通グループ52が生成された場合を示している。このデバイス共通グループ52は、生成された時点では空であり、ラダー枝集合が入っていない。
That is, the common group generation unit 18 generates one device common group (step S21) (st105). FIG. 7 shows a case where the device
共通グループ生成部18は、デバイス共通グループ52を設定した後に、全ラダー枝集合50の中から任意のラダー枝を1つ選択し、生成したデバイス共通グループ52内に入れる(ステップS22)。デバイス共通グループ52内に入れられたラダー枝は、全ラダー枝集合50内から削除される。図7では、SwOp4のラダー枝44が選択されて、デバイス共通グループ52内に入れられた場合を示している(st106)。
After setting the device
共通グループ生成部18は、全ラダー枝集合50内に、他に選択できるラダー枝が有るかを確認する(ステップS23)。全ラダー枝集合50内に選択できるラダー枝が有る場合(ステップS23、Yes)、共通グループ生成部18は、ラダー枝44で用いられている全てのデバイスX11について全ラダー枝集合50内を調べたかを確認する(ステップS24)。
The common group generation unit 18 checks whether there are other ladder branches that can be selected in the entire ladder branch set 50 (step S23). If there is a ladder branch that can be selected in the entire ladder branch set 50 (Yes in step S23), the common group generation unit 18 has checked the entire ladder branch set 50 for all the devices X11 used in the
全てのデバイスについて調べていない場合(ステップS24、No)、共通グループ生成部18は、デバイス共通グループ52内のラダー枝44が有する実行条件部で使われているデバイスで、未調査のデバイスを1つ選択する(ステップS25)。共通グループ生成部18は、例えば、デバイスX11を選択する。
When all the devices have not been checked (No in step S24), the common group generation unit 18 is a device used in the execution condition unit included in the
共通グループ生成部18は、全ラダー枝集合50の中から、選択したデバイスX11を実行条件部で用いているラダー枝を選択する(ステップS26)。共通グループ生成部18は、選択したラダー枝を、共通デバイスを持つデバイス共通グループに入れるとともに、全ラダー枝集合から削除する(ステップS27)。図7では、SwOp1のラダー枝42が選択されて、デバイス共通グループ52内に入れられた場合を示している(st107)。
The common group generation unit 18 selects a ladder branch that uses the selected device X11 in the execution condition unit from the entire ladder branch set 50 (step S26). The common group generation unit 18 puts the selected ladder branch into a device common group having a common device and deletes it from the entire ladder branch set (step S27). FIG. 7 shows a case where the
この後、共通グループ生成部18は、全ラダー枝集合50内に、他に選択できるラダー枝が有るかを確認する(ステップS23)。全ラダー枝集合50内に選択できるラダー枝が無い場合(ステップS23、No)、共通グループ生成部18は、デバイス共通グループの生成処理を終了する。 Thereafter, the common group generation unit 18 confirms whether there are other ladder branches that can be selected in the entire ladder branch set 50 (step S23). When there is no ladder branch that can be selected in the entire ladder branch set 50 (No in step S23), the common group generation unit 18 ends the device common group generation process.
このように、共通グループ生成部18は、選択した任意のラダー枝が有している実行条件部と同じ実行条件部を有しているラダー枝を同一のデバイス共通グループ内に設定する。これにより、共通グループ生成部18は、同一の実行条件部を有したラダー枝が同一のデバイス共通グループ内に収まるよう各ラダー枝をグルーピングする。図7では、デバイスX0,X1,X2を実行条件部に持つSwOp0,SwOp3,SwOp5と、デバイスX11,X10を実行条件部に持つSwOp4,SwOp1の2つの組にグルーピングされた場合を示している。 As described above, the common group generation unit 18 sets a ladder branch having the same execution condition part as that of the selected arbitrary ladder branch in the same device common group. As a result, the common group generation unit 18 groups the ladder branches so that the ladder branches having the same execution condition unit are included in the same device common group. FIG. 7 shows a case in which SwOp0, SwOp3, and SwOp5 having devices X0, X1, and X2 as execution condition parts and SwOp4 and SwOp1 having devices X11 and X10 as execution condition parts are grouped.
つぎに、各デバイス共通グループの中で同時に実行される可能性のあるラダー枝集合(同時実行グループ)を生成する処理について説明する。図8は、同時実行グループの生成処理手順を示すフローチャートである。図9は、同時実行グループの生成処理を説明するための図である。 Next, processing for generating a ladder branch set (simultaneous execution group) that may be executed simultaneously in each device common group will be described. FIG. 8 is a flowchart showing a procedure for generating a simultaneous execution group. FIG. 9 is a diagram for explaining the simultaneous execution group generation process.
図8に示す処理は、共通デバイスを持つラダー枝集合の各々に対して行われる。換言すると、図8に示す処理は、デバイス共通グループ毎に行われる処理である。図8,図9では、デバイス共通グループ51内の各ラダー枝を、何れかの同時実行グループに振り分ける処理について説明する。
The process shown in FIG. 8 is performed for each ladder branch set having a common device. In other words, the process illustrated in FIG. 8 is a process performed for each device common group. 8 and 9, a description will be given of a process of allocating each ladder branch in the device
図9に示すように、デバイス共通グループ51には、SwOp0のラダー枝41、SwOp3のラダー枝43、SwOp5のラダー枝45が含まれている。SW命令群抽出部14は、同時実行する可能性のあるラダー枝集合として、同時実行グループを1つ生成する(ステップS31)。図9では、同時実行グループ61が生成された場合を示している。この同時実行グループ61は、生成された時点では空であり(st200)、ラダー枝集合が入っていない。
As shown in FIG. 9, the device
SW命令群抽出部14は、同時実行グループ61を生成した後に、デバイス共通グループ51の中から任意のラダー枝を1つ選択し、生成した同時実行グループ61内に入れる(ステップS32)。同時実行グループ61内に入れられたラダー枝は、デバイス共通グループ51内から削除される。図9では、SwOp0のラダー枝41が選択されて(st201)、同時実行グループ61内に入れられた場合を示している(st202)。
After generating the
SW命令群抽出部14は、共通デバイスを持つラダー枝集合の要素が空であるか否かを確認する(ステップS33)。換言すると、SW命令群抽出部14は、何れかのデバイス共通グループにラダー枝が残っているか否かを確認する。
The SW instruction
デバイス共通グループ51内に選択できるラダー枝が有る場合(ステップS33、No)、SW命令群抽出部14は、デバイス共通グループ51内から未調査のラダー枝を1つ選択する(ステップS34)。SW命令群抽出部14は、例えば、SwOp3のラダー枝43を選択する。
When there is a ladder branch that can be selected in the device common group 51 (step S33, No), the SW instruction
SW命令群抽出部14は、同時実行グループ61に属するラダー枝41の実行条件と、選択されたラダー枝43の実行条件との積が、解を持つか否かを判定する(ステップS35)。ラダー枝41とラダー枝43とが同時に実行される可能性がある場合、ラダー枝41,43の実行条件の積が解を持つ。一方、ラダー枝41とラダー枝43とが同時に実行されない場合、ラダー枝41,43の実行条件の積は解を持たない。
The SW instruction
ここでのSW命令群抽出部14は、(X0*X1)*((NOT X0)+(NOT X2))=TRUEであるか否かを判定する。SW命令群抽出部14は、ラダー枝41,43の実行条件の積が解を持つ場合(ステップS36、Yes)、選択したラダー枝43を、同時実行グループ61に入れ、デバイス共通グループ51から削除する(ステップS37)。図9では、SwOp3のラダー枝43が選択されて、同時実行グループ61内に入れられた場合を示している(st203)。
Here, the SW instruction
SW命令群抽出部14は、例えば、SMT(SATISFIABLE MODULO THEORIES)に基づいて、実行条件の積が解を持つか否かの判定を行う。SMTは、特定分野の数学的な体系を表す算術の理論、集合の理論などである。幾つかのSMTソルバでは、一階述語論理の充足可能性判定問題を解くことができる。なお、SMTは、制約充足の可否だけでなく、制約が充足する場合の変数への割り当て方の情報を含んでいる。
The SW instruction
SW命令群抽出部14は、デバイス共通グループ51内に未調査のラダー枝があるかを確認する(ステップS38)。未調査のラダー枝がある場合(ステップS38、Yes)、SW命令群抽出部14は、共通デバイスを持つラダー枝集合の要素が空であるか否かを確認する(ステップS33)。
The SW instruction
デバイス共通グループ51内に選択できるラダー枝が有る場合(ステップS33、No)、SW命令群抽出部14は、デバイス共通グループ51内から未調査のラダー枝を1つ選択する(ステップS34)。SW命令群抽出部14は、例えば、SwOp5のラダー枝45を選択する。
When there is a ladder branch that can be selected in the device common group 51 (step S33, No), the SW instruction
SW命令群抽出部14は、同時実行グループ61に属するラダー枝41,43の実行条件と、選択されたラダー枝45の実行条件との積が、解を持つか否かを判定する(ステップS35)。ここでのSW命令群抽出部14は、(X0*X1)*((NOT X0)+(NOT X2))*(NOT X1)=TRUEであるか否かを判定する。
The SW instruction
SW命令群抽出部14は、ラダー枝41,43,45の実行条件の積が解を持たない場合(ステップS36、No)、選択したラダー枝45を、同時実行グループ61とは異なる別の同時実行グループに入れ、デバイス共通グループ51から削除する。
When the product of the execution conditions of the
SW命令群抽出部14は、同時実行グループ61とは異なる別の同時実行グループが既に生成されている場合には、生成済みの同時実行グループ内のラダー枝の実行条件と、選択したラダー枝45の実行条件との積が解を持つか否かを判定する。SW命令群抽出部14は、解を持つ場合には、生成済みの同時実行グループ内にラダー枝45を入れる。
When another concurrent execution group different from the
一方、SW命令群抽出部14は、同時実行グループ61とは異なる別の同時実行グループが生成されていない場合には、新たな同時実行グループを生成して、選択したラダー枝45を入れる。図9では、SwOp5のラダー枝45が選択されて、新たな同時実行グループ62内に入れられた場合を示している(st204,st205)。
On the other hand, if another concurrent execution group different from the
この後、SW命令群抽出部14は、共通デバイスを持つラダー枝集合の要素が空であるか否かを確認する(ステップS33)。空でなければ、SW命令群抽出部14は、ステップS34〜S38の処理を行う。
Thereafter, the SW instruction
そして、ステップS38の処理において、SW命令群抽出部14が、デバイス共通グループ51に未調査のラダー枝がないと判断した場合(ステップS38、No)、SW命令群抽出部14は、デバイス共通グループ51とは異なる他のデバイス共通グループに対してステップS31〜S38の処理を行う。例えば、SW命令群抽出部14は、デバイス共通グループ52に対してステップS31〜S38の処理を行う。
Then, in the process of step S38, when the SW instruction
そして、ステップS33の処理において、SW命令群抽出部14が、共通デバイスを持つラダー枝集合の要素が空であると判断すると(ステップS33、Yes)、SW命令群抽出部14による同時実行グループの生成処理を終了する。
When the SW instruction
このように、SW命令群抽出部14は、デバイス共通グループ51の中で同時に実行する可能性のあるラダー枝集合を同時実行グループとして生成することによって、ラダー枝をグルーピングする。
In this way, the SW instruction
SW命令群抽出部14によって分類された同時実行グループのうち、同一のデバイス共通グループから生成された同時実行グループ同士は、同時に実行されることのないSW命令群である。換言すると、同一のデバイス共通グループから生成された異なる同時実行グループは、同時に実行されることのないSW命令群である。例えば、同時実行グループ61,62は、何れもデバイス共通グループ51から生成されているので、同時実行グループ61,62は、同時に実行されることのないSW命令群である。
Of the simultaneous execution groups classified by the SW instruction
SW命令群抽出部14が、図7に示したデバイス共通グループ52から同時実行グループを生成した場合、SwOp4のラダー枝44を含む同時実行グループと、SwOp1のラダー枝42を含む同時実行グループとが生成されることとなる。
When the SW instruction
このように、同時実行グループが生成された結果、SwOp0,SwOp3は、同時に実行される場合があるが、「SwOp0,SwOp3」と「SwOp5」とは、同時に実行されることはないことが分かる。また、SwOp1とSwOp4とは、同時に実行されることはないことが分かる。 As described above, as a result of the generation of the simultaneous execution group, SwOp0 and SwOp3 may be executed at the same time, but “SwOp0, SwOp3” and “SwOp5” are not executed at the same time. It can also be seen that SwOp1 and SwOp4 are not executed simultaneously.
このような同時実行グループへの分類結果に基づいて、実行時間推定部15は、最大スキャンタイム30を推定する。図10は、最大スキャンタイムの算出処理例を説明するための図である。
The execution
図10では、SW命令またはHW命令と実行時間との対応関係を示している。また、図10では、最大スキャンタイム30の推定値を示している。同時に実行されることがないSW命令群がある場合、SW命令の実行時間が長い方のSW命令群の実行時間が最大スキャンタイム30に寄与すると考えられる。したがって、実行時間推定部15は、実行時間が長い方のSW命令群を最大スキャンタイム30の算出処理に適用する。
FIG. 10 shows the correspondence between the SW instruction or HW instruction and the execution time. FIG. 10 shows an estimated value of the
例えば、HW命令の「LD X0」は、実行時間がTldであり、HW命令の「AND X1」は、実行時間がTandである。また、SW命令の「SwOpi」の実行時間をTiと記述することにすると、SwOp0〜SwOp5の実行時間は、それぞれT0〜T5である。この場合、デバイス共通グループ51内のSwOp0,SwOp3,SwOp5に関しては、「T0+T3」とT5との何れか大きい方が最大スキャンタイム30の算出処理に適用される。また、デバイス共通グループ52内のSwOp1,SwOp4に関しては、T1とT4との何れか大きい方が最大スキャンタイム30の算出処理に適用される。
For example, “LD X0” of the HW instruction has an execution time Tld, and “AND X1” of the HW instruction has an execution time Tand. If the execution time of the SW instruction “SwOpi” is described as Ti, the execution times of SwOp0 to SwOp5 are T0 to T5, respectively. In this case, regarding SwOp0, SwOp3, and SwOp5 in the device
図10では、(T0+T3)>T5であり、T1>T4である場合の、最大スキャンタイム30の算出結果を示している。実行時間推定部15は、SW命令群のうち、最大スキャンタイム30の算出処理に適用しなかった方のSW命令群の実行時間を0として、最大スキャンタイム30を算出する。
FIG. 10 shows the calculation result of the
実行時間推定部15は、(T0+T3)とT5のうち(T0+T3)を最大スキャンタイム30の算出処理に適用し、T1とT4のうちT1を最大スキャンタイム30の算出処理に適用する。したがって、実行時間推定部15は、T0+T3+T1をSW命令の実行時間として算出する。
The execution
また、実行時間推定部15は、全てのHW命令の実行時間の合計時間をHW命令の実行時間として算出する。具体的には、実行時間推定部15は、4Tld+2Tldi+Tand+Tani+Tori+ToutをHW命令の実行時間として算出する。そして、実行時間推定部15は、SW命令の実行時間とHW命令の実行時間との合計時間を最大スキャンタイム30の推定値とする。
The execution
図11は、実行時間推定装置のハードウエア構成を示す図である。実行時間推定装置10は、CPU(Central Processing Unit)91、ROM(Read Only Memory)92、RAM(Random Access Memory)93、表示部94、入力部95を有している。実行時間推定装置10では、これらのCPU91、ROM92、RAM93、表示部94および入力部95がバスラインBを介して接続されている。
FIG. 11 is a diagram illustrating a hardware configuration of the execution time estimation apparatus. The execution
CPU91は、コンピュータプログラムである実行時間推定プログラム90を用いて最大スキャンタイム30の推定を行う。表示部94は、液晶モニタなどの表示装置であり、CPU91からの指示に基づいて、ラダープログラム、SW命令、HW命令、実行条件部、ラダー枝、デバイス共通グループ、同時実行グループ、最大スキャンタイム30などを表示する。入力部95は、マウスまたはキーボードを備えて構成され、使用者から外部入力される指示情報(最大スキャンタイム30の推定に必要なパラメータ等)を入力する。入力部95へ入力された指示情報は、CPU91へ送られる。
The
実行時間推定プログラム90は、コンピュータ読み取り可能かつ非遷移的な記録媒体(nontransitory computer readable medium)であるROM92などの中に格納されており、バスラインBを介してRAM93へロードされる。
The execution
CPU91はRAM93内にロードされた実行時間推定プログラム90を実行する。具体的には、実行時間推定装置10では、使用者による入力部95からの指示入力に従って、CPU91がROM92内から実行時間推定プログラム90を読み出してRAM93内のプログラム格納領域に展開して各種処理を実行する。CPU91は、この各種処理に際して生じる各種データをRAM93内に形成されるデータ格納領域に一時的に記憶させておく。
The
実行時間推定装置10で実行される実行時間推定プログラム90は、回路ブロック抽出部12と、組合せ情報抽出部13と、SW命令群抽出部14と、実行時間推定部15と、共通グループ生成部18とを含むモジュール構成となっており、これらが主記憶装置上にロードされ、これらが主記憶装置上に生成される。このように、実行時間推定プログラム90は、コンピュータである実行時間推定装置10上のソフトウエアとして実現できる。なお、回路ブロック抽出部12の機能は、実行時間推定プログラム90とは、異なる別のプログラムに格納しておいてもよい。
The execution
なお、本実施の形態では、受付部11がラダープログラムを受付ける場合について説明したが、受付部11がラダー木を受付けてもよい。受付部11がラダー木を受付ける場合、組合せ情報抽出部13は、ラダー木からラダー枝を抽出する。また、受付部11がラダー木を受付ける場合、実行時間推定装置10は、回路ブロック抽出部12を備えていなくてもよい。
In the present embodiment, the case where the
本実施の形態によれば、デバイス共通グループ内の同時実行グループの中から、ソフトウエア命令の実行時間が最も長くなる同時実行グループに基づいて、最大スキャンタイム30を算出するので、最も時間がかかるケースでのスキャンタイムを見積もることが可能になる。
According to the present embodiment, the
以上のように、本発明に係る実行時間推定プログラムおよび実行時間推定装置は、シーケンスプログラムの実行時間の推定に適している。 As described above, the execution time estimation program and the execution time estimation apparatus according to the present invention are suitable for estimating the execution time of a sequence program.
10 実行時間推定装置、12 回路ブロック抽出部、13 組合せ情報抽出部、14 SW命令群抽出部、15 実行時間推定部、18 共通グループ生成部、20 IL表現情報、21 インストラクション実行時間データ、41〜45 ラダー枝、50 全ラダー枝集合、51,52 デバイス共通グループ、61,62 同時実行グループ、90 実行時間推定プログラム。
DESCRIPTION OF
Claims (5)
前記コンピュータに、
前記ラダープログラムから、ファームウエアで実行されるソフトウエア命令と、当該ソフトウエア命令の実行条件と、の組を、複数抽出して組情報とする組合せ抽出ステップと、
抽出された複数の組情報に対し、前記実行条件で共通のデバイスが用いられる組情報の集合である第1の組集合毎にグループ分けを行なうことによって、前記第1の組集合が入れられたデバイス共通グループを、前記第1の組集合毎に生成する共通グループ生成ステップと、
前記デバイス共通グループの中で同時に実行される可能性のあるソフトウエア命令を有した組情報の集合である第2の組集合毎にグループ分けを行なうことによって、前記第2の組集合が入れられた同時実行グループを、前記第2の組集合毎に生成する同時実行グループ生成ステップと、
各前記デバイス共通グループに対し、前記デバイス共通グループ内の同時実行グループの中から、前記ソフトウエア命令の実行時間が最も長くなる同時実行グループを抽出するグループ抽出ステップと、
抽出した同時実行グループを実行した場合の前記ソフトウエア命令の実行時間に基づいて、前記ラダープログラムを一通り実行した場合のスキャンタイムのうち、実行時間が最も長くなる場合のスキャンタイムを算出するスキャンタイム算出ステップと、
を実行させ、
前記共通グループ生成ステップでは、
前記コンピュータに、
前記複数の組情報の中から任意の1つの組情報を選択する処理と、
選択した組情報を前記デバイス共通グループに入れる処理と、
前記選択した組情報の実行条件に含まれるデバイスに基づいて、グループ分けの行われていない組情報の何れかを前記デバイス共通グループに入れる処理と、
を実行させることを特徴とする実行時間推定プログラム。 An execution time estimation program for causing a computer to execute processing for estimating the execution time of a ladder program used in a controller,
In the computer,
From the ladder program, a combination extraction step of extracting a plurality of sets of software instructions to be executed by firmware and execution conditions of the software instructions into set information;
The first set set is entered by performing grouping for each first set set, which is a set of set information in which a common device is used in the execution condition, for the plurality of set information extracted. A common group generation step of generating a device common group for each first set set;
By grouping each second set, which is a set of set information having software instructions that may be executed simultaneously in the device common group, the second set is entered. A concurrent execution group generating step for generating the concurrent execution group for each second set set;
For each of the device common groups, a group extraction step of extracting a concurrent execution group having the longest execution time of the software instruction from among the concurrent execution groups in the device common group;
Based on the execution time of the software instruction when the extracted simultaneous execution group is executed, a scan for calculating the scan time when the execution time becomes the longest among the scan times when the ladder program is executed one by one A time calculation step;
And execute
In the common group generation step,
In the computer,
A process of selecting any one set information from the plurality of set information;
A process of putting the selected set information into the device common group;
Based on the device included in the execution condition of the selected set information, processing to put any of the set information that has not been grouped into the device common group,
An execution time estimation program characterized in that
前記コンピュータに、
前記実行条件のうちの第1の実行条件と前記実行条件のうちの第2の実行条件との積が解を有するか否かに基づいて、前記第1の実行条件に対応するソフトウエア命令と、前記第2の実行条件に対応するソフトウエア命令と、が同時に実行される可能性があるか否かを判定する処理
を実行させることを特徴とする請求項1に記載の実行時間推定プログラム。 In the simultaneous execution group generation step,
In the computer,
A software instruction corresponding to the first execution condition based on whether a product of a first execution condition of the execution conditions and a second execution condition of the execution conditions has a solution; 2. The execution time estimation program according to claim 1, wherein a process for determining whether or not a software instruction corresponding to the second execution condition is likely to be executed simultaneously is executed.
前記コンピュータに、
前記デバイス共通グループの中に入れることのできる組情報がなくなると、前記複数の組情報の中からグループ分けの行われていない任意の1つの組情報を新たに選択する処理と、
新たに選択した組情報を新たなデバイス共通グループに入れる処理と、
前記新たに選択した組情報の実行条件に含まれるデバイスに基づいて、グループ分けの行われていない組情報の何れかを前記新たなデバイス共通グループに入れる処理と、
を実行させることを特徴とする請求項1に記載の実行時間推定プログラム。 In the common group generation step,
In the computer,
When there is no group information that can be included in the device common group, a process of newly selecting any one group information that is not grouped from the plurality of group information;
The process of putting the newly selected set information into a new device common group,
Based on the device included in the execution condition of the newly selected set information, a process of putting any of the set information not grouped into the new device common group;
The execution time estimation program according to claim 1 , wherein:
前記コンピュータに、
前記デバイス共通グループ毎に前記実行時間が最も長くなる同時実行グループを抽出する処理を実行させ、
前記スキャンタイム算出ステップでは、
前記コンピュータに、
前記デバイス共通グループ毎に前記ソフトウエア命令の実行時間を算出する処理と、算出した各実行時間の合計時間と、前記ラダープログラムのうちハードウエアで実行されるハードウエア命令の実行時間の合計時間と、を合算することによって、前記実行時間が最も長くなる場合のスキャンタイムを算出する処理と、
を実行させることを特徴とする請求項1から3のいずれか1つに記載の実行時間推定プログラム。 In the group extraction step,
In the computer,
For each device common group, execute the process of extracting the concurrent execution group that has the longest execution time,
In the scan time calculating step,
In the computer,
A process for calculating the execution time of the software instruction for each device common group, a total time of the calculated execution times, and a total time of execution times of hardware instructions executed by hardware in the ladder program; , By calculating the scan time when the execution time is the longest,
The execution time estimation program according to any one of claims 1 to 3 , wherein the execution time estimation program is executed.
抽出された複数の組情報に対し、前記実行条件で共通のデバイスが用いられる組情報の集合である第1の組集合毎にグループ分けを行なうことによって、前記第1の組集合が入れられたデバイス共通グループを、前記第1の組集合毎に生成する共通グループ生成部と、
前記デバイス共通グループの中で同時に実行される可能性のあるソフトウエア命令を有した組情報の集合である第2の組集合毎にグループ分けを行なうことによって、前記第2の組集合が入れられた同時実行グループを、前記第2の組集合毎に生成する同時実行グループ生成部と、
前記デバイス共通グループ内の同時実行グループの中から、前記ソフトウエア命令の実行時間が最も長くなる同時実行グループを抽出するグループ抽出部と、
抽出した同時実行グループを実行した場合の前記ソフトウエア命令の実行時間に基づいて、前記ラダープログラムを一通り実行した場合のスキャンタイムのうち、実行時間が最も長くなる場合のスキャンタイムを算出するスキャンタイム算出部と、
を備え、
前記共通グループ生成部は、
前記複数の組情報の中から任意の1つの組情報を選択する処理と、
選択した組情報を前記デバイス共通グループに入れる処理と、
前記選択した組情報の実行条件に含まれるデバイスに基づいて、グループ分けの行われていない組情報の何れかを前記デバイス共通グループに入れる処理と、
を実行することを特徴とする実行時間推定装置。 From the ladder program used in the controller, a combination extraction unit that extracts a plurality of sets of software instructions executed by firmware and execution conditions of the software instructions and sets them as set information;
The first set set is entered by performing grouping for each first set set, which is a set of set information in which a common device is used in the execution condition, for the plurality of set information extracted. A common group generation unit for generating a device common group for each first set set;
By grouping each second set, which is a set of set information having software instructions that may be executed simultaneously in the device common group, the second set is entered. A concurrent execution group generating unit that generates a concurrent execution group for each second set set;
A group extraction unit for extracting a concurrent execution group having the longest execution time of the software instruction from among the concurrent execution groups in the device common group;
Based on the execution time of the software instruction when the extracted simultaneous execution group is executed, a scan for calculating the scan time when the execution time becomes the longest among the scan times when the ladder program is executed one by one A time calculation unit;
Equipped with a,
The common group generation unit
A process of selecting any one set information from the plurality of set information;
A process of putting the selected set information into the device common group;
Based on the device included in the execution condition of the selected set information, processing to put any of the set information that has not been grouped into the device common group,
The execution time estimation apparatus characterized by performing.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2014/070231 WO2016017004A1 (en) | 2014-07-31 | 2014-07-31 | Execution time estimation program and execution time estimation device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2016017004A1 JPWO2016017004A1 (en) | 2017-04-27 |
JP6157745B2 true JP6157745B2 (en) | 2017-07-05 |
Family
ID=55216942
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016537683A Active JP6157745B2 (en) | 2014-07-31 | 2014-07-31 | Execution time estimation program and execution time estimation device |
Country Status (4)
Country | Link |
---|---|
JP (1) | JP6157745B2 (en) |
CN (1) | CN106662852B (en) |
TW (1) | TWI529619B (en) |
WO (1) | WO2016017004A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022239051A1 (en) * | 2021-05-10 | 2022-11-17 | 三菱電機株式会社 | System for verifying design of manufacturing apparatus |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62279439A (en) * | 1986-05-28 | 1987-12-04 | Mitsubishi Electric Corp | Emulator device |
JPH03166602A (en) * | 1989-11-27 | 1991-07-18 | Fanuc Ltd | Dividing system for ladder program |
JP3372301B2 (en) * | 1993-06-25 | 2003-02-04 | オークマ株式会社 | Programmable controller |
JP2003067007A (en) * | 2001-08-27 | 2003-03-07 | Mitsubishi Electric Corp | Engineering tool and engineering system |
JP2008234394A (en) * | 2007-03-22 | 2008-10-02 | Koyo Electronics Ind Co Ltd | Speed-up method for programmable controller |
CN101907879B (en) * | 2010-03-12 | 2012-07-04 | 大连理工大学 | Industrial control network redundancy fault-tolerant system |
JP5750235B2 (en) * | 2010-04-29 | 2015-07-15 | 富士機械製造株式会社 | Manufacturing machine |
JP2012083934A (en) * | 2010-10-12 | 2012-04-26 | Mitsubishi Electric Corp | Scan time estimation device, scan time estimation program and record medium |
US20130104101A1 (en) * | 2011-09-16 | 2013-04-25 | Mitsubishi Electric Corporation | Sequence program creating apparatus |
CN102938773A (en) * | 2011-11-03 | 2013-02-20 | 李宗诚 | Information and communications technology (ICT) technical support design for planning and configuring function module by internet user terminal |
CN103425467B (en) * | 2012-05-18 | 2016-08-03 | 汪巨森 | Program creating method based on IEC61850 |
-
2014
- 2014-07-31 WO PCT/JP2014/070231 patent/WO2016017004A1/en active Application Filing
- 2014-07-31 CN CN201480080863.2A patent/CN106662852B/en not_active Expired - Fee Related
- 2014-07-31 JP JP2016537683A patent/JP6157745B2/en active Active
-
2015
- 2015-02-10 TW TW104104352A patent/TWI529619B/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
WO2016017004A1 (en) | 2016-02-04 |
TWI529619B (en) | 2016-04-11 |
CN106662852A (en) | 2017-05-10 |
TW201604775A (en) | 2016-02-01 |
JPWO2016017004A1 (en) | 2017-04-27 |
CN106662852B (en) | 2018-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6892424B2 (en) | Hyperparameter tuning methods, devices and programs | |
US10325036B2 (en) | Method and system for determing welding process parameters | |
JP6157745B2 (en) | Execution time estimation program and execution time estimation device | |
JP7083703B2 (en) | Computer mounting method for simulation of whole electrical circuit | |
JP2000057123A (en) | Method and device for searching state of sequential circuit, and recording medium having recorded state search program thereon | |
JP6965873B2 (en) | Change procedure generator, change procedure generation method and change procedure generator | |
CA3046768C (en) | Variable embedding method and processing system | |
JPWO2017009895A1 (en) | Program generating apparatus and method thereof | |
JP2016192692A (en) | Path arrangement method, path arrangement device, and program | |
JP6058238B2 (en) | Programmable logic controller setting file generation support device | |
CN116540546A (en) | Recommendation method, system, equipment and medium for control parameters of process control system | |
JP2021081843A (en) | Design support device, design support method, and design support program | |
JP2016018269A (en) | Information processing apparatus, information processing method, and program | |
JP4879244B2 (en) | Optimal structure manufacturing program for component rigidity and information processing apparatus | |
CN109992507B (en) | Program fuzzy test method and device based on simulation execution | |
JPWO2013031129A1 (en) | Information processing apparatus, information processing method, and program | |
JP2020198135A (en) | Hyper parameter tuning method, device and program | |
JP2017041157A (en) | Embedded software development support system, embedded software development support method, and embedded software development support program | |
JP2003500717A (en) | Method, apparatus and computer program for designing a technical system | |
JP5321624B2 (en) | Logic circuit verification device, logic circuit verification method, and program | |
WO2014208005A1 (en) | Non-functional evaluation assistance device, system, method, and program | |
JP6183359B2 (en) | Design support apparatus, design support method, and program | |
CN113472551B (en) | Network flow prediction method, device and storage medium | |
JP5136257B2 (en) | Route management method | |
JP6193674B2 (en) | CONVERSION CIRCUIT DESIGN DEVICE, CONVERSION CIRCUIT DESIGN PROGRAM, AND CONVERSION CIRCUIT DESIGN METHOD |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20161028 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20161028 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20161028 |
|
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20170131 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170207 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170316 |
|
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: 20170509 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170606 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6157745 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |