JP6157745B2 - Execution time estimation program and execution time estimation device - Google Patents

Execution time estimation program and execution time estimation device Download PDF

Info

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
Application number
JP2016537683A
Other languages
Japanese (ja)
Other versions
JPWO2016017004A1 (en
Inventor
一裕 阿部
一裕 阿部
孝行 山岡
孝行 山岡
安井 照昌
照昌 安井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Publication of JPWO2016017004A1 publication Critical patent/JPWO2016017004A1/en
Application granted granted Critical
Publication of JP6157745B2 publication Critical patent/JP6157745B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable 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.

特開2001−209411号公報JP 2001-209411 A

しかしながら、上記従来の技術では、ラダープログラムの平均的な実行時間しか求めることができず、最も時間がかかるケースでのスキャンタイムを見積もることができないという問題があった。   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.

図1は、本発明の実施の形態に係る実行時間推定装置の構成を示す図である。FIG. 1 is a diagram showing a configuration of an execution time estimation apparatus according to an embodiment of the present invention. 図2は、ラダー図表現されたラダープログラムの一例を示す図である。FIG. 2 is a diagram illustrating an example of a ladder program expressed as a ladder diagram. 図3は、IL(Instruction List)表現されたラダープログラムの一例を示す図である。FIG. 3 is a diagram showing an example of a ladder program expressed in IL (Instruction List). 図4は、実行時間推定装置による実行時間の推定処理手順を示すフローチャートである。FIG. 4 is a flowchart showing an execution time estimation processing procedure performed by the execution time estimation device. 図5は、ラダー枝の抽出処理を説明するための図である。FIG. 5 is a diagram for explaining ladder branch extraction processing. 図6は、デバイス共通グループの生成処理手順を示すフローチャートである。FIG. 6 is a flowchart showing a device common group generation processing procedure. 図7は、デバイス共通グループの生成処理を説明するための図である。FIG. 7 is a diagram for explaining a device common group generation process. 図8は、同時実行グループの生成処理手順を示すフローチャートである。FIG. 8 is a flowchart showing a procedure for generating a simultaneous execution group. 図9は、同時実行グループの生成処理を説明するための図である。FIG. 9 is a diagram for explaining the simultaneous execution group generation process. 図10は、最大スキャンタイムの算出処理例を説明するための図である。FIG. 10 is a diagram for explaining an example of processing for calculating the maximum scan time. 図11は、実行時間推定装置のハードウエア構成を示す図である。FIG. 11 is a diagram illustrating a hardware configuration of the execution time estimation apparatus.

以下に、本発明の実施の形態に係る実行時間推定プログラムおよび実行時間推定装置を図面に基づいて詳細に説明する。なお、本実施の形態により本発明が限定されるものではない。   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 time estimation device 10 is a computer or the like that estimates the execution time of a sequence program. Hereinafter, a case where the sequence program is a ladder program used in a controller such as a PLC (Programmable Logic Controller) will be described.

実行時間推定装置10は、ラダープログラムを一通り上から下まで実行する時間であるスキャンタイムを、ラダープログラムの実行時間として算出する。本実施の形態の実行時間推定装置10は、ラダープログラムの実行時間が最も長くなる場合のスキャンタイム(以下、最大スキャンタイム30という)を推定する。   The execution time estimation device 10 calculates a scan time, which is a time for executing the ladder program from top to bottom, as the execution time of the ladder program. The execution time estimation apparatus 10 according to the present embodiment estimates a scan time (hereinafter referred to as a maximum scan time 30) when the execution time of the ladder program is the longest.

ラダープログラムには、実行条件が真の時のみ実行される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 time estimation device 10 estimates the maximum scan time 30 in the case where it takes the longest time when the ladder program is executed from the beginning to the end.

実行時間推定装置10は、受付部11、回路ブロック抽出部12、組合せ情報抽出部13、SW命令群抽出部(同時実行グループ生成部)14、実行時間推定部(グループ抽出部、スキャンタイム算出部)15、出力部16、記憶部17、共通グループ生成部18を備えている。   The execution time estimation apparatus 10 includes a reception unit 11, a circuit block extraction unit 12, a combination information extraction unit 13, a SW instruction group extraction unit (simultaneous execution group generation unit) 14, and an execution time estimation unit (group extraction unit, scan time calculation unit). ) 15, an output unit 16, a storage unit 17, and a common group generation unit 18.

受付部11は、ラダープログラムのIL(Instruction List)表現を示すIL表現情報20を受付ける。受付部11は、データベースなどの外部装置から入力されたIL表現情報20を回路ブロック抽出部12に送る。   The accepting unit 11 accepts IL expression information 20 indicating an IL (Instruction List) expression of the ladder program. The accepting unit 11 sends the IL expression information 20 input from an external device such as a database to the circuit block extracting unit 12.

ラダープログラムは、ラダー図表現や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 time estimation apparatus 10 according to the present embodiment estimates the maximum scan time 30 based on a group of SW instructions that are not executed simultaneously among the SW instructions.

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 block extraction unit 12 extracts the circuit block indicated by the IL expression from the IL expression information 20. The circuit block extraction unit 12 sends the extracted circuit blocks to the combination information extraction unit 13.

組合せ情報抽出部13は、IL表現された回路ブロック内からSW命令と、SW命令の実行条件部との組を備えた組情報(以下、ラダー枝という)を抽出する。組合せ情報抽出部13は、抽出したラダー枝を共通グループ生成部18に送る。   The combination information extraction unit 13 extracts combination information (hereinafter referred to as a ladder branch) including a combination of the SW instruction and the execution condition part of the SW instruction from the circuit block expressed in IL. The combination information extraction unit 13 sends the extracted ladder branch to the common group generation unit 18.

共通グループ生成部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 group extraction unit 14.

SW命令群抽出部14は、デバイス共通グループの中で同時に実行される可能性のあるラダー枝集合である第2の組集合をラダー枝集合(以下、SW命令群という)毎にグルーピングする。これにより、SW命令群抽出部14は、SW命令群が入れられたグループ、つまり後述する同時実行グループを、SW命令群毎に生成する。   The SW instruction group extraction unit 14 groups a second set of ladder branch sets that may be executed simultaneously in the device common group for each ladder branch set (hereinafter referred to as SW instruction group). As a result, the SW instruction group extraction unit 14 generates, for each SW instruction group, a group in which the SW instruction group is inserted, that is, a simultaneous execution group described later.

実行条件部で共通のデバイスが用いられるラダー枝集合が共通ラダー枝であり、この共通ラダー枝が入れられたグループがデバイス共通グループである。したがって、共通ラダー枝毎にデバイス共通グループが生成される。そして、デバイス共通グループ内で同時に実行される可能性のあるラダー枝集合が、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 group extraction unit 14 sends the grouping result to the execution time estimation unit 15.

記憶部17は、インストラクション実行時間データ21を記憶する例えばメモリである。インストラクション実行時間データ21は、各SW命令の実行時間および各HW命令の実行時間の情報を含んでいる。具体的には、インストラクション実行時間データ21では、SW命令と実行時間とが対応付けされ、HW命令と実行時間とが対応付けされている。   The storage unit 17 is, for example, a memory that stores instruction execution time data 21. The instruction execution time data 21 includes information on the execution time of each SW instruction and the execution time of each HW instruction. Specifically, in the instruction execution time data 21, the SW instruction and the execution time are associated with each other, and the HW instruction and the execution time are associated with each other.

実行時間推定部15は、グルーピング結果およびインストラクション実行時間データ21に基づいて、最大スキャンタイム30を推定する。具体的には、実行時間推定部15は、同時に実行されることのないラダー枝集合であるSW命令群毎の実行時間を推定する。実行時間推定部15は、デバイス共通グループ毎にSW命令群を設定し、デバイス共通グループ毎にSW命令群毎の実行時間を推定する。



The execution time estimation unit 15 estimates the maximum scan time 30 based on the grouping result and the instruction execution time data 21. Specifically, the execution time estimation unit 15 estimates the S W execution time of each instruction group Ru ladder branch group der never be executed simultaneously. The execution time estimation unit 15 sets a SW instruction group for each device common group, and estimates an execution time for each SW instruction group for each device common group.



そして、実行時間推定部15は、デバイス共通グループの中のSW命令群の中で各命令の実行時間の合計が最も長いSW命令群を最大スキャンタイム30に寄与するSW命令群に採用する。実行時間推定部15は、デバイス共通グループ毎に最大スキャンタイム30に寄与するSW命令群を設定する。   Then, the execution time estimating unit 15 employs the SW instruction group having the longest total execution time of each instruction among the SW instruction groups in the device common group as the SW instruction group contributing to the maximum scan time 30. The execution time estimation unit 15 sets a SW command group that contributes to the maximum scan time 30 for each device common group.

実行時間推定部15は、最大スキャンタイム30に寄与するSW命令群に対し、インストラクション実行時間データ21に基づいて、最大スキャンタイム30に寄与するSW命令群の実行時間を算出する。また、実行時間推定部15は、HW命令に対し、インストラクション実行時間データ21に基づいて、HW命令の実行時間を算出する。   The execution time estimation unit 15 calculates the execution time of the SW instruction group that contributes to the maximum scan time 30 based on the instruction execution time data 21 for the SW instruction group that contributes to the maximum scan time 30. Further, the execution time estimation unit 15 calculates the execution time of the HW instruction based on the instruction execution time data 21 for the HW instruction.

実行時間推定部15は、デバイス共通グループ毎のSW命令群の実行時間を全て加算することによって、SW命令の最大の実行時間を推定する。実行時間推定部15は、SW命令の最大の実行時間と、HW命令の実行時間とを加算することによって最大スキャンタイム30を推定する。   The execution time estimation unit 15 estimates the maximum execution time of the SW instruction by adding all execution times of the SW instruction group for each device common group. The execution time estimation unit 15 estimates the maximum scan time 30 by adding the maximum execution time of the SW instruction and the execution time of the HW instruction.

換言すると、実行時間推定部15は、デバイス共通グループ毎にSW命令の実行時間を算出する処理と、算出した各実行時間の合計時間と、HW命令の実行時間の合計時間とを合算する処理とを実行することによって、最大スキャンタイム30を算出する。実行時間推定部15は、最大スキャンタイム30を出力部16に送る。出力部16は、最大スキャンタイム30を外部装置に出力する。   In other words, the execution time estimation unit 15 calculates the execution time of the SW instruction for each device common group, and adds the calculated total time of each execution time and the total execution time of the HW instruction. Is executed to calculate the maximum scan time 30. The execution time estimation unit 15 sends the maximum scan time 30 to the output unit 16. The output unit 16 outputs the maximum scan time 30 to the external device.

つぎに、実行時間推定装置10による実行時間の推定処理手順について説明する。図4は、実行時間推定装置による実行時間の推定処理手順を示すフローチャートである。実行時間推定装置10の受付部11は、IL表現情報20を受付けると、IL表現情報20を回路ブロック抽出部12に送る。   Next, an execution time estimation processing procedure performed by the execution time estimation device 10 will be described. FIG. 4 is a flowchart showing an execution time estimation processing procedure performed by the execution time estimation device. Upon receiving the IL expression information 20, the reception unit 11 of the execution time estimation apparatus 10 sends the IL expression information 20 to the circuit block extraction unit 12.

回路ブロック抽出部12は、IL表現情報20内からIL表現で示された回路ブロックを抽出する(ステップS10)。組合せ情報抽出部13は、回路ブロックからSW命令と、SW命令の実行条件部と、を抽出する。具体的には、組合せ情報抽出部13は、各回路ブロックのIL表現に対して、ANDノードとORノードとを、入れ子を用いた木表現(以下、ラダー木という)に変換する。そして、組合せ情報抽出部13は、各ラダー木に対して先頭から順にラダー木を巡回し、ラダー木から、SW命令と、SW命令の実行条件部との組であるラダー枝を抽出する(ステップS20)。   The circuit block extraction unit 12 extracts the circuit block indicated by the IL expression from the IL expression information 20 (step S10). The combination information extraction unit 13 extracts the SW instruction and the execution condition part of the SW instruction from the circuit block. Specifically, the combination information extraction unit 13 converts an AND node and an OR node into a tree representation using nesting (hereinafter referred to as a ladder tree) for the IL representation of each circuit block. Then, the combination information extraction unit 13 circulates the ladder tree in order from the top of each ladder tree, and extracts a ladder branch that is a set of the SW instruction and the execution condition part of the SW instruction from the ladder tree (step S20).

図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 information extraction unit 13 sends the extracted ladder branch to the common group generation unit 18.

共通グループ生成部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 group extraction unit 14.

SW命令群抽出部14は、デバイス共通グループの中で同時に実行される可能性のあるラダー枝集合をグルーピングする。これにより、SW命令群抽出部14は、デバイス共通グループの中で同時に実行されることのないラダー枝集合をグルーピングする(ステップS40)。SW命令群抽出部14は、デバイス共通グループ毎に、ラダー枝集合をグルーピングする。SW命令群抽出部14は、デバイス共通グループの中で同時に実行されることのないラダー枝集合を、同時に実行されることのないSW命令群として実行時間推定部15に送る。   The SW instruction group extraction unit 14 groups ladder branch sets that may be executed simultaneously in the device common group. As a result, the SW instruction group extraction unit 14 groups the ladder branch sets that are not executed simultaneously in the device common group (step S40). The SW instruction group extraction unit 14 groups the ladder branch set for each device common group. The SW instruction group extraction unit 14 sends the ladder branch set that is not executed simultaneously in the device common group to the execution time estimation unit 15 as the SW instruction group that is not executed simultaneously.

実行時間推定部15は、同時に実行されることのないSW命令群に基づいて、最大スキャンタイム30を推定する(ステップS50)。具体的には、実行時間推定部15は、各デバイス共通グループ内でSW命令群毎の実行時間を比較する。この比較のとき、実行時間推定部15は、インストラクション実行時間データ21に基づいて、各SW命令群の実行時間を算出し、SW命令群の実行時間同士を比較する。   The execution time estimation unit 15 estimates the maximum scan time 30 based on a group of SW instructions that are not executed simultaneously (step S50). Specifically, the execution time estimation unit 15 compares the execution time for each SW instruction group within each device common group. At the time of this comparison, the execution time estimation unit 15 calculates the execution time of each SW instruction group based on the instruction execution time data 21 and compares the execution times of the SW instruction groups.

実行時間推定部15は、SW命令群の中で実行時間の最も長いSW命令群の実行時間を、デバイス共通グループ毎に抽出し、抽出した各実行時間を全て積算する。実行時間推定部15は、積算結果をSW命令の最大の実行時間とし、HW命令の実行時間と足し合わせることによって最大スキャンタイム30を推定する。   The execution time estimation unit 15 extracts the execution time of the SW instruction group having the longest execution time among the SW instruction groups for each device common group, and adds up all the extracted execution times. The execution time estimation unit 15 uses the integration result as the maximum execution time of the SW instruction, and adds the execution time of the HW instruction to estimate the maximum scan time 30.

つぎに、デバイス共通グループの生成処理について説明する。図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 ladder branches 41 to 45 corresponding to SwOp0 to SwOp5. The common group generation unit 18 generates one device common group (step S21). FIG. 7 shows a case where the device common group 51 is generated. This device common group 51 is empty at the time of generation (st100) and does not contain a ladder branch set.

共通グループ生成部18は、デバイス共通グループ51を生成した後に、全ラダー枝集合50の中から任意のラダー枝を1つ選択し、生成したデバイス共通グループ51内に入れる(ステップS22)。デバイス共通グループ51内に入れられたラダー枝は、全ラダー枝集合50内から削除される。図7では、SwOp0のラダー枝41が選択されて(st101)、デバイス共通グループ51内に入れられた場合を示している(st102)。   After generating the device common group 51, the common group generation unit 18 selects one arbitrary ladder branch from the entire ladder branch set 50 and places it in the generated device common group 51 (step S22). Ladder branches placed in the device common group 51 are deleted from the entire ladder branch set 50. FIG. 7 shows a case where the ladder branch 41 of SwOp0 is selected (st101) and placed in the device common group 51 (st102).

共通グループ生成部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 ladder branch 41. It is confirmed whether it has been checked (step S24).

全てのデバイスについて調べていない場合(ステップ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 ladder branch 41 in the device common group 51 and has not been checked. One device is selected (step S25). For example, the common group generation unit 18 selects the device X0.

共通グループ生成部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 ladder branch 43 of SwOp3 is selected and placed in the device common group 51 (st103).

この後、共通グループ生成部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 ladder branch 41. It is confirmed whether it has been checked (step S24).

全てのデバイス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 ladder branch 41 in the device common group 51. One uninvestigated device is selected (step S25). For example, the common group generation unit 18 selects the device X1.

共通グループ生成部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 ladder branch 45 of SwOp5 is selected and placed in the device common group 51 (st104).

この後、共通グループ生成部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 ladder branch 41 have been checked (step S23). S24).

全てのデバイス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 common group 52 is generated. This device common group 52 is empty at the time of generation, and does not contain a ladder branch set.

共通グループ生成部18は、デバイス共通グループ52を設定した後に、全ラダー枝集合50の中から任意のラダー枝を1つ選択し、生成したデバイス共通グループ52内に入れる(ステップS22)。デバイス共通グループ52内に入れられたラダー枝は、全ラダー枝集合50内から削除される。図7では、SwOp4のラダー枝44が選択されて、デバイス共通グループ52内に入れられた場合を示している(st106)。   After setting the device common group 52, the common group generation unit 18 selects one arbitrary ladder branch from the entire ladder branch set 50 and places it in the generated device common group 52 (step S22). Ladder branches placed in the device common group 52 are deleted from the entire ladder branch set 50. FIG. 7 shows a case where the SwOp4 ladder branch 44 is selected and placed in the device common group 52 (st106).

共通グループ生成部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 ladder branch 44. Is confirmed (step S24).

全てのデバイスについて調べていない場合(ステップ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 ladder branch 44 in the device common group 52, and the unexamined device is set to 1. Is selected (step S25). For example, the common group generation unit 18 selects the device X11.

共通グループ生成部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 ladder branch 42 of SwOp1 is selected and placed in the device common group 52 (st107).

この後、共通グループ生成部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 common group 51 to any one of the simultaneous execution groups.

図9に示すように、デバイス共通グループ51には、SwOp0のラダー枝41、SwOp3のラダー枝43、SwOp5のラダー枝45が含まれている。SW命令群抽出部14は、同時実行する可能性のあるラダー枝集合として、同時実行グループを1つ生成する(ステップS31)。図9では、同時実行グループ61が生成された場合を示している。この同時実行グループ61は、生成された時点では空であり(st200)、ラダー枝集合が入っていない。   As shown in FIG. 9, the device common group 51 includes a ladder branch 41 of SwOp0, a ladder branch 43 of SwOp3, and a ladder branch 45 of SwOp5. The SW instruction group extraction unit 14 generates one simultaneous execution group as a ladder branch set that may be simultaneously executed (step S31). FIG. 9 shows a case where the simultaneous execution group 61 is generated. This simultaneous execution group 61 is empty at the time of generation (st200) and does not contain a ladder branch set.

SW命令群抽出部14は、同時実行グループ61を生成した後に、デバイス共通グループ51の中から任意のラダー枝を1つ選択し、生成した同時実行グループ61内に入れる(ステップS32)。同時実行グループ61内に入れられたラダー枝は、デバイス共通グループ51内から削除される。図9では、SwOp0のラダー枝41が選択されて(st201)、同時実行グループ61内に入れられた場合を示している(st202)。   After generating the simultaneous execution group 61, the SW instruction group extraction unit 14 selects one arbitrary ladder branch from the device common group 51 and places it in the generated simultaneous execution group 61 (step S32). Ladder branches placed in the simultaneous execution group 61 are deleted from the device common group 51. FIG. 9 shows a case where the ladder branch 41 of SwOp0 is selected (st201) and placed in the simultaneous execution group 61 (st202).

SW命令群抽出部14は、共通デバイスを持つラダー枝集合の要素が空であるか否かを確認する(ステップS33)。換言すると、SW命令群抽出部14は、何れかのデバイス共通グループにラダー枝が残っているか否かを確認する。   The SW instruction group extraction unit 14 checks whether or not the element of the ladder branch set having the common device is empty (step S33). In other words, the SW instruction group extraction unit 14 checks whether or not a ladder branch remains in any device common group.

デバイス共通グループ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 group extraction unit 14 selects one unexamined ladder branch from the device common group 51 (step S34). The SW instruction group extraction unit 14 selects, for example, the ladder branch 43 of SwOp3.

SW命令群抽出部14は、同時実行グループ61に属するラダー枝41の実行条件と、選択されたラダー枝43の実行条件との積が、解を持つか否かを判定する(ステップS35)。ラダー枝41とラダー枝43とが同時に実行される可能性がある場合、ラダー枝41,43の実行条件の積が解を持つ。一方、ラダー枝41とラダー枝43とが同時に実行されない場合、ラダー枝41,43の実行条件の積は解を持たない。   The SW instruction group extraction unit 14 determines whether or not the product of the execution condition of the ladder branch 41 belonging to the simultaneous execution group 61 and the execution condition of the selected ladder branch 43 has a solution (step S35). When the ladder branch 41 and the ladder branch 43 may be executed at the same time, the product of the execution conditions of the ladder branches 41 and 43 has a solution. On the other hand, if the ladder branch 41 and the ladder branch 43 are not executed simultaneously, the product of the execution conditions of the ladder branches 41 and 43 has no solution.

ここでの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 group extraction unit 14 determines whether (X0 * X1) * ((NOT X0) + (NOT X2)) = TRUE. When the product of the execution conditions of the ladder branches 41 and 43 has a solution (Yes in step S36), the SW instruction group extraction unit 14 puts the selected ladder branch 43 into the simultaneous execution group 61 and deletes it from the device common group 51. (Step S37). FIG. 9 shows a case where the ladder branch 43 of SwOp3 is selected and placed in the simultaneous execution group 61 (st203).

SW命令群抽出部14は、例えば、SMT(SATISFIABLE MODULO THEORIES)に基づいて、実行条件の積が解を持つか否かの判定を行う。SMTは、特定分野の数学的な体系を表す算術の理論、集合の理論などである。幾つかのSMTソルバでは、一階述語論理の充足可能性判定問題を解くことができる。なお、SMTは、制約充足の可否だけでなく、制約が充足する場合の変数への割り当て方の情報を含んでいる。   The SW instruction group extraction unit 14 determines whether or not the product of the execution conditions has a solution based on, for example, SMT (SATISFIABLE MODULO THEORIES). The SMT is an arithmetic theory or a set theory representing a mathematical system of a specific field. Some SMT solvers can solve the first-order predicate logic satisfiability determination problem. The SMT includes not only whether or not the constraint is satisfied, but also information on how to assign the variable when the constraint is satisfied.

SW命令群抽出部14は、デバイス共通グループ51内に未調査のラダー枝があるかを確認する(ステップS38)。未調査のラダー枝がある場合(ステップS38、Yes)、SW命令群抽出部14は、共通デバイスを持つラダー枝集合の要素が空であるか否かを確認する(ステップS33)。   The SW instruction group extraction unit 14 checks whether there is an unexamined ladder branch in the device common group 51 (step S38). When there is an unexamined ladder branch (step S38, Yes), the SW instruction group extraction unit 14 checks whether or not an element of the ladder branch set having the common device is empty (step S33).

デバイス共通グループ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 group extraction unit 14 selects one unexamined ladder branch from the device common group 51 (step S34). For example, the SW instruction group extraction unit 14 selects the ladder branch 45 of SwOp5.

SW命令群抽出部14は、同時実行グループ61に属するラダー枝41,43の実行条件と、選択されたラダー枝45の実行条件との積が、解を持つか否かを判定する(ステップS35)。ここでのSW命令群抽出部14は、(X0*X1)*((NOT X0)+(NOT X2))*(NOT X1)=TRUEであるか否かを判定する。   The SW instruction group extraction unit 14 determines whether the product of the execution condition of the ladder branches 41 and 43 belonging to the simultaneous execution group 61 and the execution condition of the selected ladder branch 45 has a solution (step S35). ). Here, the SW instruction group extraction unit 14 determines whether (X0 * X1) * ((NOT X0) + (NOT X2)) * (NOT X1) = TRUE.

SW命令群抽出部14は、ラダー枝41,43,45の実行条件の積が解を持たない場合(ステップS36、No)、選択したラダー枝45を、同時実行グループ61とは異なる別の同時実行グループに入れ、デバイス共通グループ51から削除する。   When the product of the execution conditions of the ladder branches 41, 43, 45 does not have a solution (No in step S <b> 36), the SW instruction group extraction unit 14 converts the selected ladder branch 45 into another simultaneous operation different from the simultaneous execution group 61. Enter the execution group and delete from the device common group 51.

SW命令群抽出部14は、同時実行グループ61とは異なる別の同時実行グループが既に生成されている場合には、生成済みの同時実行グループ内のラダー枝の実行条件と、選択したラダー枝45の実行条件との積が解を持つか否かを判定する。SW命令群抽出部14は、解を持つ場合には、生成済みの同時実行グループ内にラダー枝45を入れる。   When another concurrent execution group different from the concurrent execution group 61 has already been generated, the SW instruction group extraction unit 14 executes the execution condition of the ladder branch in the generated concurrent execution group and the selected ladder branch 45. It is determined whether the product with the execution condition of has a solution. When the SW instruction group extraction unit 14 has a solution, the SW instruction group extraction unit 14 puts the ladder branch 45 in the generated simultaneous execution group.

一方、SW命令群抽出部14は、同時実行グループ61とは異なる別の同時実行グループが生成されていない場合には、新たな同時実行グループを生成して、選択したラダー枝45を入れる。図9では、SwOp5のラダー枝45が選択されて、新たな同時実行グループ62内に入れられた場合を示している(st204,st205)。   On the other hand, if another concurrent execution group different from the concurrent execution group 61 has not been generated, the SW instruction group extraction unit 14 creates a new concurrent execution group and inserts the selected ladder branch 45. FIG. 9 shows the case where the ladder branch 45 of SwOp5 is selected and placed in the new simultaneous execution group 62 (st204, st205).

この後、SW命令群抽出部14は、共通デバイスを持つラダー枝集合の要素が空であるか否かを確認する(ステップS33)。空でなければ、SW命令群抽出部14は、ステップS34〜S38の処理を行う。   Thereafter, the SW instruction group extraction unit 14 checks whether or not the element of the ladder branch set having the common device is empty (step S33). If not empty, the SW instruction group extraction unit 14 performs the processes of steps S34 to S38.

そして、ステップ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 group extraction unit 14 determines that there is no unexamined ladder branch in the device common group 51 (No in step S38), the SW instruction group extraction unit 14 determines that the device common group 51 Steps S31 to S38 are performed for another device common group different from 51. For example, the SW instruction group extraction unit 14 performs steps S31 to S38 for the device common group 52.

そして、ステップS33の処理において、SW命令群抽出部14が、共通デバイスを持つラダー枝集合の要素が空であると判断すると(ステップS33、Yes)、SW命令群抽出部14による同時実行グループの生成処理を終了する。   When the SW instruction group extraction unit 14 determines that the element of the ladder branch set having the common device is empty in the process of step S33 (Yes in step S33), the simultaneous execution group of the SW instruction group extraction unit 14 is determined. The generation process ends.

このように、SW命令群抽出部14は、デバイス共通グループ51の中で同時に実行する可能性のあるラダー枝集合を同時実行グループとして生成することによって、ラダー枝をグルーピングする。   In this way, the SW instruction group extraction unit 14 groups ladder branches by generating a set of ladder branches that may be simultaneously executed in the device common group 51 as a simultaneous execution group.

SW命令群抽出部14によって分類された同時実行グループのうち、同一のデバイス共通グループから生成された同時実行グループ同士は、同時に実行されることのないSW命令群である。換言すると、同一のデバイス共通グループから生成された異なる同時実行グループは、同時に実行されることのないSW命令群である。例えば、同時実行グループ61,62は、何れもデバイス共通グループ51から生成されているので、同時実行グループ61,62は、同時に実行されることのないSW命令群である。   Of the simultaneous execution groups classified by the SW instruction group extraction unit 14, simultaneous execution groups generated from the same device common group are SW instruction groups that are not executed simultaneously. In other words, different simultaneous execution groups generated from the same device common group are SW instructions that are not executed simultaneously. For example, since the simultaneous execution groups 61 and 62 are both generated from the device common group 51, the simultaneous execution groups 61 and 62 are SW instruction groups that are not executed simultaneously.

SW命令群抽出部14が、図7に示したデバイス共通グループ52から同時実行グループを生成した場合、SwOp4のラダー枝44を含む同時実行グループと、SwOp1のラダー枝42を含む同時実行グループとが生成されることとなる。   When the SW instruction group extraction unit 14 generates a simultaneous execution group from the device common group 52 shown in FIG. 7, a simultaneous execution group including the ladder branch 44 of SwOp4 and a simultaneous execution group including the ladder branch 42 of SwOp1 exist. Will be generated.

このように、同時実行グループが生成された結果、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 time estimation unit 15 estimates the maximum scan time 30 based on the result of classification into simultaneous execution groups. FIG. 10 is a diagram for explaining an example of processing for calculating the maximum scan time.

図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 maximum scan time 30. When there is a group of SW instructions that are not executed at the same time, it is considered that the execution time of the SW instruction group having the longer execution time of the SW instruction contributes to the maximum scan time 30. Therefore, the execution time estimation unit 15 applies the SW instruction group having the longer execution time to the calculation process of the maximum scan time 30.

例えば、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 common group 51, the larger one of “T0 + T3” and T5 is applied to the calculation process of the maximum scan time 30. As for SwOp1 and SwOp4 in the device common group 52, the larger of T1 and T4 is applied to the calculation process of the maximum scan time 30.

図10では、(T0+T3)>T5であり、T1>T4である場合の、最大スキャンタイム30の算出結果を示している。実行時間推定部15は、SW命令群のうち、最大スキャンタイム30の算出処理に適用しなかった方のSW命令群の実行時間を0として、最大スキャンタイム30を算出する。   FIG. 10 shows the calculation result of the maximum scan time 30 when (T0 + T3)> T5 and T1> T4. The execution time estimation unit 15 calculates the maximum scan time 30 by setting the execution time of the SW instruction group not applied to the calculation process of the maximum scan time 30 among the SW instruction groups to 0.

実行時間推定部15は、(T0+T3)とT5のうち(T0+T3)を最大スキャンタイム30の算出処理に適用し、T1とT4のうちT1を最大スキャンタイム30の算出処理に適用する。したがって、実行時間推定部15は、T0+T3+T1をSW命令の実行時間として算出する。   The execution time estimation unit 15 applies (T0 + T3) of (T0 + T3) and T5 to the calculation process of the maximum scan time 30, and applies T1 of T1 and T4 to the calculation process of the maximum scan time 30. Therefore, the execution time estimation unit 15 calculates T0 + T3 + T1 as the execution time of the SW instruction.

また、実行時間推定部15は、全てのHW命令の実行時間の合計時間をHW命令の実行時間として算出する。具体的には、実行時間推定部15は、4Tld+2Tldi+Tand+Tani+Tori+ToutをHW命令の実行時間として算出する。そして、実行時間推定部15は、SW命令の実行時間とHW命令の実行時間との合計時間を最大スキャンタイム30の推定値とする。   The execution time estimation unit 15 calculates the total execution time of all the HW instructions as the execution time of the HW instruction. Specifically, the execution time estimation unit 15 calculates 4Tld + 2Tldi + Tand + Tani + Tori + Tout as the execution time of the HW instruction. Then, the execution time estimation unit 15 sets the total time of the execution time of the SW instruction and the execution time of the HW instruction as an estimated value of the maximum scan time 30.

図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 time estimation apparatus 10 includes a central processing unit (CPU) 91, a read only memory (ROM) 92, a random access memory (RAM) 93, a display unit 94, and an input unit 95. In the execution time estimation device 10, the CPU 91, ROM 92, RAM 93, display unit 94, and input unit 95 are connected via the bus line B.

CPU91は、コンピュータプログラムである実行時間推定プログラム90を用いて最大スキャンタイム30の推定を行う。表示部94は、液晶モニタなどの表示装置であり、CPU91からの指示に基づいて、ラダープログラム、SW命令、HW命令、実行条件部、ラダー枝、デバイス共通グループ、同時実行グループ、最大スキャンタイム30などを表示する。入力部95は、マウスまたはキーボードを備えて構成され、使用者から外部入力される指示情報(最大スキャンタイム30の推定に必要なパラメータ等)を入力する。入力部95へ入力された指示情報は、CPU91へ送られる。   The CPU 91 estimates the maximum scan time 30 using an execution time estimation program 90 that is a computer program. The display unit 94 is a display device such as a liquid crystal monitor, and based on instructions from the CPU 91, a ladder program, SW command, HW command, execution condition unit, ladder branch, device common group, simultaneous execution group, maximum scan time 30 Etc. are displayed. The input unit 95 includes a mouse or a keyboard, and inputs instruction information (such as a parameter necessary for estimating the maximum scan time 30) input from the outside. The instruction information input to the input unit 95 is sent to the CPU 91.

実行時間推定プログラム90は、コンピュータ読み取り可能かつ非遷移的な記録媒体(nontransitory computer readable medium)であるROM92などの中に格納されており、バスラインBを介してRAM93へロードされる。   The execution time estimation program 90 is stored in a ROM 92 or the like, which is a computer-readable non-transitory recording medium (nontransitory computer readable medium), and is loaded into the RAM 93 via the bus line B.

CPU91はRAM93内にロードされた実行時間推定プログラム90を実行する。具体的には、実行時間推定装置10では、使用者による入力部95からの指示入力に従って、CPU91がROM92内から実行時間推定プログラム90を読み出してRAM93内のプログラム格納領域に展開して各種処理を実行する。CPU91は、この各種処理に際して生じる各種データをRAM93内に形成されるデータ格納領域に一時的に記憶させておく。   The CPU 91 executes the execution time estimation program 90 loaded in the RAM 93. Specifically, in the execution time estimation apparatus 10, the CPU 91 reads the execution time estimation program 90 from the ROM 92 and expands it in the program storage area in the RAM 93 in accordance with an instruction input from the input unit 95 by the user, and performs various processes. Run. The CPU 91 temporarily stores various data generated during the various processes in a data storage area formed in the RAM 93.

実行時間推定装置10で実行される実行時間推定プログラム90は、回路ブロック抽出部12と、組合せ情報抽出部13と、SW命令群抽出部14と、実行時間推定部15と、共通グループ生成部18とを含むモジュール構成となっており、これらが主記憶装置上にロードされ、これらが主記憶装置上に生成される。このように、実行時間推定プログラム90は、コンピュータである実行時間推定装置10上のソフトウエアとして実現できる。なお、回路ブロック抽出部12の機能は、実行時間推定プログラム90とは、異なる別のプログラムに格納しておいてもよい。   The execution time estimation program 90 executed by the execution time estimation device 10 includes a circuit block extraction unit 12, a combination information extraction unit 13, a SW instruction group extraction unit 14, an execution time estimation unit 15, and a common group generation unit 18. These are loaded on the main storage device, and these are generated on the main storage device. As described above, the execution time estimation program 90 can be realized as software on the execution time estimation apparatus 10 which is a computer. The function of the circuit block extraction unit 12 may be stored in a different program different from the execution time estimation program 90.

なお、本実施の形態では、受付部11がラダープログラムを受付ける場合について説明したが、受付部11がラダー木を受付けてもよい。受付部11がラダー木を受付ける場合、組合せ情報抽出部13は、ラダー木からラダー枝を抽出する。また、受付部11がラダー木を受付ける場合、実行時間推定装置10は、回路ブロック抽出部12を備えていなくてもよい。   In the present embodiment, the case where the reception unit 11 receives a ladder program has been described. However, the reception unit 11 may receive a ladder tree. When the reception unit 11 receives a ladder tree, the combination information extraction unit 13 extracts a ladder branch from the ladder tree. Moreover, when the reception part 11 receives a ladder tree, the execution time estimation apparatus 10 does not need to be provided with the circuit block extraction part 12. FIG.

本実施の形態によれば、デバイス共通グループ内の同時実行グループの中から、ソフトウエア命令の実行時間が最も長くなる同時実行グループに基づいて、最大スキャンタイム30を算出するので、最も時間がかかるケースでのスキャンタイムを見積もることが可能になる。   According to the present embodiment, the maximum scan time 30 is calculated based on the simultaneous execution group in which the execution time of the software instruction is the longest among the simultaneous execution groups in the device common group. It is possible to estimate the scan time in a case.

以上のように、本発明に係る実行時間推定プログラムおよび実行時間推定装置は、シーケンスプログラムの実行時間の推定に適している。   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 SYMBOLS 10 execution time estimation apparatus, 12 circuit block extraction part, 13 combination information extraction part, 14 SW instruction group extraction part, 15 execution time estimation part, 18 common group production | generation part, 20 IL expression information, 21 instruction execution time data, 41- 45 Ladder branches, 50 All ladder branch sets, 51, 52 Device common group, 61, 62 Simultaneous execution group, 90 Execution time estimation program.

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つの組情報を新たに選択する処理と、
新たに選択した組情報を新たなデバイス共通グループに入れる処理と、
前記新たに選択した組情報の実行条件に含まれるデバイスに基づいて、グループ分けの行われていない組情報の何れかを前記新たなデバイス共通グループに入れる処理と、
を実行させることを特徴とする請求項に記載の実行時間推定プログラム。
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からのいずれか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.
JP2016537683A 2014-07-31 2014-07-31 Execution time estimation program and execution time estimation device Active JP6157745B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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