JP2007128456A - Program management device - Google Patents

Program management device Download PDF

Info

Publication number
JP2007128456A
JP2007128456A JP2005322670A JP2005322670A JP2007128456A JP 2007128456 A JP2007128456 A JP 2007128456A JP 2005322670 A JP2005322670 A JP 2005322670A JP 2005322670 A JP2005322670 A JP 2005322670A JP 2007128456 A JP2007128456 A JP 2007128456A
Authority
JP
Japan
Prior art keywords
program
component
asset
test
editing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2005322670A
Other languages
Japanese (ja)
Other versions
JP4488231B2 (en
Inventor
Shigeru Hitomi
繁 人見
Hiroshi Yoshida
寛 吉田
Tetsuo Kagawa
徹雄 香川
Keitei Kim
恵貞 金
Minshaku Jo
民錫 徐
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2005322670A priority Critical patent/JP4488231B2/en
Publication of JP2007128456A publication Critical patent/JP2007128456A/en
Application granted granted Critical
Publication of JP4488231B2 publication Critical patent/JP4488231B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program management device capable of surely and easily managing test work for a program component including a change point. <P>SOLUTION: This program management device is provided with a program component database 70 and a component relationship diagram editor 64. In the program component database 70, a plurality of versatile resource program components 68, by which an apparatus control program is constructed, with described macros and a test scenario, in which an input condition to a specific application program component 73 generated based on the resource program components and an expectation output are written in time series, are stored in association with each other. The component relationship diagram editor 64 displays a component relationship diagram showing a connection relationship between the resource program components on a display device, makes the resource program component as a treatment target and its treatment content to be selected, and actuates a component editor 65 or a unit test tool 71 based on the selected treatment content. A comparison result by the unit test tool is reflected to a display mode of the resource program component on the component relationship diagram. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

この発明は、機器制御プログラムを構成するプログラム部品についての編集,テストを行なうことのできるプログラム管理装置に関するものである。   The present invention relates to a program management apparatus capable of editing and testing a program part constituting a device control program.

工場に設置される検査装置や設備装置は、産業用制御装置が機器制御プログラムを実行することにより制御される。産業用制御装置の具体例は、プログラマブルコントローラである。工場の設備担当者や生産技術担当者などのプログラマブルコントローラユーザは、プログラマブルコントローラに任意の制御を実行させるために、プログラミングツールにてラダープログラムを予め作成する。そして、そのラダープログラムをプログラマブルコントローラに格納する。プログラマブルコントローラは、ラダープログラムをサイクリックに実行し、検査装置や設備装置を任意に制御する。最近では、プログラマブルコントローラの制御内容の一部が違っていても、既存のラダープログラムの一部を必要に応じて編集や修正等を施して、つまりラダープログラムを再利用して、プログラミング作業を効率化することが図られている。その際、プログラム部品管理ツールにて、再利用の対象となるプログラムをデータベース化することも図られている。   Inspection devices and equipment devices installed in factories are controlled by an industrial control device executing an equipment control program. A specific example of the industrial control device is a programmable controller. Programmable controller users, such as factory equipment personnel and production engineering personnel, create a ladder program in advance using a programming tool in order to cause the programmable controller to execute arbitrary control. Then, the ladder program is stored in the programmable controller. The programmable controller executes a ladder program cyclically and arbitrarily controls the inspection apparatus and the equipment apparatus. Recently, even if part of the control contents of the programmable controller is different, edit or modify part of the existing ladder program as needed, that is, reuse the ladder program to make programming work more efficient. It is planned to become. At that time, the program parts management tool also attempts to create a database of programs to be reused.

ラダープログラムの部品化・再利用化については、一般的にIEC61131規格で定義された”ファンクションブロック”の仕組みを用いて実現されている。ファンクションブロックにより、ラダープログラムと変数のカプセル化が実現され、ラダープログラムを部品として再利用することが可能になっている。変数は、例えばプログラマブルコントローラの制御対象である入出力接点などである。また、ラダープログラムの一部を必要に応じて編集や修正等を施す際に、そのプログラム上の複数箇所に現れる複合処理をそれぞれ簡単なマクロ演算部品の図形で置き換えることにより、図形表示されたプログラムについての一部編集や一部変更等の簡素化を図ることも知られている(特許文献1参照)。   Ladder program componentization and reuse are generally implemented using a "function block" mechanism defined in the IEC61131 standard. The function block realizes encapsulation of the ladder program and variables, and the ladder program can be reused as a part. The variable is, for example, an input / output contact that is a control target of the programmable controller. In addition, when a part of the ladder program is edited or modified as necessary, the program that is displayed in graphic form is replaced by replacing the complex processing that appears in multiple places on the program with simple macro operation parts. It is also known that simplification of partial editing and partial change is performed (see Patent Document 1).

また、近年、製品ラインアップの共通性と差異性とを分析し、効果的なソフトウェア資産の形成を目指す“プロダクトライン・ソフトウェア・エンジニアリング”(以下、PLSEと省略)と呼ばれる手法が提唱されている。一方、ラダープログラムが用いられる機器制御システムの分野では、製品ラインナップを充実させてユーザのニーズに対応できるように、大部分は同一であるが部分的に差異のあるシステムを多数開発しているケースが多い。そこで、係るシステムを制御するためのラダープログラムの設計・開発に対しても、PLSE適用の有効性が期待される。   In recent years, a method called “product line software engineering” (hereinafter abbreviated as PLSE) has been proposed to analyze the commonality and differences in product lineups and to create effective software assets. . On the other hand, in the field of equipment control systems where ladder programs are used, a large number of systems that are largely identical but partially different are being developed so that the product lineup can be enhanced to meet the needs of users. There are many. Therefore, the effectiveness of applying PLSE is also expected for the design and development of ladder programs for controlling such systems.

しかし、このような分析に基づくプログラム部品化を行う上で、ファンクションブロックによる方法では以下に示す問題を有する。すなわち、プログラマブルコントローラはラダープログラムの全回路をサイクリックにスキャン実行することによって動作する。従って、プログラムの規模の増大がそのままプログラマブルコントローラにおける1スキャンの実行時間性能の低下につながり、引いては制御対象である設備装置の制御応答時間の遅れにつながる。そのため実行性能の観点から、ラダープログラム部品は、制御対象のアプリケーションに応じて、不要な回路を含まないことが望まれる。   However, the function block method has the following problems in making program parts based on such analysis. That is, the programmable controller operates by cyclically scanning all the circuits of the ladder program. Therefore, an increase in the scale of the program directly leads to a decrease in the execution time performance of one scan in the programmable controller, which in turn leads to a delay in the control response time of the equipment device to be controlled. Therefore, from the viewpoint of execution performance, it is desirable that the ladder program component does not include unnecessary circuits depending on the application to be controlled.

一方、複数のアプリケーションにおいて再利用できる汎用性のあるプログラム部品を作成するには、プログラム部品の内部構成や制御対象の振る舞いにある程度のバリエーションを持たせ、プログラミング時にオプション設定できるようにして、内部構成や振る舞いを少し変更させることができるようにプログラムを構築する必要がある。たとえば火災検出アルゴリズムのプログラム部品を考える場合、火災検出用のセンサの数や種類、自己診断機能の有無などの、アルゴリズムそのものは同一であっても、使用する具体的なアプリケーションにより複数のバリエーションやオプションを含むことが多い。このようなオプション選択も入力値としてプログラム部品を記述することで汎用性をもったプログラム部品を実装することはできる。しかしながらこの場合、あるシステムの実現には不要なラダー回路が部品(ファンクションブロック)中に存在することになりプログラムの実行性能が低下する。このため実行性能の制約に厳しい分野では、汎用性のあるプログラム部品を構成することが困難となっている。
特開平6−230804号公報
On the other hand, to create a versatile program part that can be reused in multiple applications, the internal structure of the program part and the behavior of the control target have some variation and can be set as options during programming. It is necessary to build a program so that the behavior can be changed a little. For example, when considering the fire detection algorithm program parts, even if the algorithm itself is the same, such as the number and type of fire detection sensors and whether or not there is a self-diagnosis function, there are multiple variations and options depending on the specific application used. Is often included. In such an option selection, a program part having versatility can be mounted by describing the program part as an input value. However, in this case, a ladder circuit that is unnecessary for realizing a certain system exists in the component (function block), and the execution performance of the program is lowered. For this reason, it is difficult to construct a versatile program component in a field where execution performance is severely restricted.
JP-A-6-230804

PLSE手法では、戦略的な再利用部品をつくるため、プログラム部品にあらかじめ予期されている変化点を組み込んでおくことを提唱している。そこで、本発明者らは、その実現手段のひとつとして、プログラム部品のバリアビリティーポイント(変化点)を定義し、あらかじめラダープログラム中に、その一部を変形するためのマクロ記述を組み込み、与えるパラメータセットを変更してマクロ処理を実行することで、一部が変形したプログラム部品を生成する手法を提案した(特願2005−288858号)。これにより、マクロ処理を実行して生成された最終的なラダープログラムは、不要なラダー回路は削除され、適用するアプリケーションに必要十分なラダー回路から構成されたものになり、プログラムの規模を可及的に縮小し実行時間性能の向上を図ることができるという作用効果を奏する。   In the PLSE method, in order to create a strategic reusable part, it is proposed to incorporate an anticipated change point in the program part. Therefore, the present inventors define a variable point (change point) of a program part as one of the means for realizing it, and incorporate a macro description for modifying a part of the program in a ladder program in advance, A method for generating a part of a program that has been modified by changing the set and executing macro processing has been proposed (Japanese Patent Application No. 2005-288858). As a result, the final ladder program generated by executing the macro process is made up of ladder circuits that are necessary and sufficient for the application to be applied, eliminating unnecessary ladder circuits, thereby enabling the scale of the program to be increased. Thus, it is possible to reduce the size and improve the execution time performance.

しかしながら、変化点を含むプログラム部品の品質確保は変形部品毎にその変化点をテストする必要がある。そして、テストした結果不具合が見つかるとプログラムの修正をする必要が生じ、その修正がすでにテスト済みで合格した部品に影響を及ぼすこともある。このように、プログラムの修正,テストの実行,テスト結果の管理が煩雑となり、誤操作や勘違いにより思わぬ不具合やテスト漏れを発生させる可能性がある。   However, to ensure the quality of program parts including change points, it is necessary to test the change points for each deformed part. If a defect is found as a result of the test, the program needs to be corrected, and the correction may affect a part that has already been tested and passed. In this way, program correction, test execution, and test result management become complicated, and unexpected malfunctions and test omissions may occur due to erroneous operations or misunderstandings.

この発明は、変化点を含むプログラム部品のテスト作業の管理を確実かつ簡単に行なうことのできるプログラム管理装置を提供することを目的とする。   It is an object of the present invention to provide a program management apparatus capable of reliably and easily managing a test operation of a program part including a change point.

上記した目的を達成するため、本発明に係るプログラム管理装置は、機器制御プログラムを構成するための汎用性のある複数の資産プログラム部品と、その資産プログラム部品に基づいて生成される特定のアプリケーション用プログラム部品への入力条件および期待出力を時系列に記載したテストシナリオと、を関連づけて記憶するプログラム部品記憶手段と、前記資産プログラム部品の接続関係を示す関連図を表示装置に表示し、処理対象の資産プログラム部品並びに処理内容を選択させる選択手段と、前記資産プログラム部品を編集する編集手段と、前記特定のアプリケーション用プログラム部品がダウンロードされたシミュレータに対し、前記テストシナリオに従って入力条件を与えると共に、そのシミュレータの実行結果と前記期待出力とを比較するテスト手段と、を備える。そして、前記資産プログラム部品は、あらかじめ予期されている変化点が存在する場合に、その変化点をマクロ記述として含むプログラム部品であり、前記マクロ記述を含む資産プログラム部品に対応する前記特定のアプリケーション用プログラム部品は、マクロ処理を実行して生成され、前記関連図上の資産プログラム部品の表示態様を、前記テスト手段による比較結果を反映させるように構成した。   In order to achieve the above object, a program management apparatus according to the present invention provides a plurality of versatile asset program parts for configuring a device control program, and a specific application generated based on the asset program parts. Program component storage means for associating and storing test scenarios in which input conditions and expected outputs to program components are described in time series, and a related diagram showing the connection relationship of the asset program components on the display device, and processing target A selection means for selecting the asset program parts and processing contents, an editing means for editing the asset program parts, and a simulator in which the specific application program parts are downloaded, according to the test scenario, and giving input conditions, Execution result of the simulator and the expectation Comprising a test means for comparing the force, the. The asset program part is a program part that includes the change point as a macro description when there is a change point that is expected in advance, and is for the specific application corresponding to the asset program part that includes the macro description. The program parts are generated by executing a macro process, and the display mode of the asset program parts on the related diagram is configured to reflect the comparison result by the test means.

プログラム部品記憶手段は、実施の形態では、プログラム部品データベース70に対応する。関連図は、実施の形態ではコンポーネント関連図に対応する。処理内容は、実施の形態では編集処理と単体テストに対応する。選択手段は、実施の形態ではコンポーネント関連図エディタ64に対応する。編集手段は、実施の形態ではコンポーネント・エディタ65に対応する。テスト手段は、実施の形態では、単体テストツール71に対応する。   The program component storage means corresponds to the program component database 70 in the embodiment. The related diagram corresponds to the component related diagram in the embodiment. The processing contents correspond to the editing process and the unit test in the embodiment. The selection means corresponds to the component relation diagram editor 64 in the embodiment. The editing means corresponds to the component editor 65 in the embodiment. The test means corresponds to the unit test tool 71 in the embodiment.

選択手段により、関連図上の資産プログラム部品を選択するとともに、処理内容を選択することで、その選択された処理内容に応じて編集手段あるいはテスト手段を起動することができる。これにより、プログラムの修正後、直感的にその部品をテストできることができる。   By selecting the asset program part on the related diagram and selecting the processing contents by the selecting means, the editing means or the testing means can be activated according to the selected processing contents. As a result, after the program is corrected, the part can be tested intuitively.

また、資産プログラム部品と、テストシナリオを関連付けて記憶し、選択した資産プログラムから生成された特定のアプリケーション用プログラム部品とそれに対応するテストシナリオに基づいてテストを実行し、そのテスト結果を管理することにより、各特定のアプリケーション用プログラム部品についてのテストシナリオの選択ミスを防ぐことができる。   Also, asset program parts and test scenarios are stored in association with each other, tests are executed based on the specific application program parts generated from the selected asset program and the corresponding test scenarios, and the test results are managed. Thus, it is possible to prevent a test scenario selection error for each specific application program component.

そして、関連図上に表示された資産プログラム部品の表示態様をテスト結果が反映されるようにしたため、各資産プログラム部品のテスト結果を視覚的に確認でき、テストが完了(合格)していない資産プログラムを容易に見つけることができ、チェック漏れなどの管理上のケアレスミスを防ぐことができる。   Since the test results are reflected in the display form of the asset program parts displayed on the related diagram, the test results of each asset program part can be visually confirmed, and the test has not been completed (passed) The program can be easily found, and administrative careless mistakes such as check omissions can be prevented.

前記選択手段により選択された資産プログラム部品に、子の資産プログラム部品が存在するか否かを判断し、前記子の資産プログラム部品が存在する場合には、前記資産プログラム部品と前記子の資産プログラム部品とを合成して1つのプログラムを生成するプログラム合成手段を有し、前記編集手段は、前記プログラム合成手段により合成されたプログラムに対して編集処理を行なうようにすることができる。   It is determined whether or not there is a child asset program part in the asset program part selected by the selection means, and when the child asset program part exists, the asset program part and the child asset program A program synthesizing unit that synthesizes the component and generates one program may be provided, and the editing unit may perform an editing process on the program synthesized by the program synthesizing unit.

この場合に、前記子の資産プログラム部品に対しては、プログラムの内容の表示を許可するが、前記編集手段による編集を禁止するよう設定する禁止手段を備えると良い。禁止手段は、実施の形態では、資産プログラム部品に、読み取り専用属性フラグを設定し、そのフラグのON/OFFをすることで実現される。   In this case, display of the contents of the program is permitted for the child asset program parts, but it is preferable to include prohibition means for prohibiting editing by the editing means. In the embodiment, the prohibiting means is realized by setting a read-only attribute flag in the asset program part and turning the flag ON / OFF.

前記選択手段により選択された資産プログラム部品に、子の資産プログラム部品が存在するか否かを判断し、前記子の資産プログラム部品が存在する場合には、前記資産プログラム部品に対応する前記特定のアプリケーション用プログラム部品と、前記子の資産プログラム部品に対応する前記特定のアプリケーション用プログラム部品とを合成して1つのプログラムを生成するプログラム合成手段を有し、前記シミュレータにダウンロードされ実行される前記特定のアプリケーション用プログラム部品は、前記プログラム合成手段で生成されたプログラムとすることができる。   It is determined whether or not there is a child asset program part in the asset program part selected by the selection means, and when the child asset program part is present, the specific program corresponding to the asset program part is determined. The specific program that is downloaded and executed by the simulator has program synthesis means for generating one program by synthesizing the application program component and the specific application program component corresponding to the child asset program component The application program component can be a program generated by the program synthesizing means.

前記テスト手段による比較結果を反映は、テストシナリオを実行して合格したものと、合格していないものを識別可能にするものとすることかできる。また、合格していないとは、未テストの状態もあれは、テストした結果不合格の場合もある。少なくとも、合格したものと合格していないものを識別できればよいが、合格していないものについては、不合格と未テストをさらに識別可能にするとよい。   Reflecting the comparison result by the test means can make it possible to distinguish between those that have passed the test scenario and those that have not passed. In addition, “not passing” means that there is an untested state, but there is a case where the result of testing is unsuccessful. It is sufficient that at least one that has passed and one that has not passed can be identified. However, for those that have not passed, it is preferable to further identify the failure and the untested one.

前記合格したものの表示態様の資産プログラム部品を前記編集手段で編集処理したか否かを判断し、編集処理された場合には表示態様を合格していない状態に変更する手段を備えるとよい。係る手段は、実施の形態では、コンポーネント関連図エディタで実現されている。合格した資産プログラム部品に対して編集処理を実行すると、プログラムの内容が変更されるため、前に行なった合格の意味がなくなる。そこで、この発明では、自動的に表示態様を合格していない養生に変更することで、再度テストをする必要があることを見落とすことなく、編集後のプログラム部品についてのテストを確実に行なわせることができる。   It may be provided with means for determining whether or not the editing program has edited the asset program part in the display mode that has passed, and changing the display mode to a state that has not passed if the editing process has been performed. In the embodiment, such means is realized by a component relation diagram editor. When the editing process is executed on the passed asset program part, the contents of the program are changed, so the meaning of the previous pass is lost. Therefore, in the present invention, by automatically changing the display mode to a curing that does not pass, it is possible to ensure that the edited program part is tested without overlooking that it is necessary to test again. Can do.

資産プログラム部品について準備したテストシナリオすべてが合格となった場合に、その資産プログラム部品を合格したものとすることかできる。全てのテストシナリオが合格したと言うことは、そのプログラムは問題がない完成されたものであると言える。なお、本発明のテストの合格は、必ずしも準備したテストシナリオの全てが合格した場合に限ることはなく、たとえば、テストシナリオをユーザに選択させるような場合、選択され実行したテストシナリオについて合格した(不合格がでない)場合にテストが合格したと判定するようにすることもできる。なお、係る場合には、全てのテストシナリオが合格したものと、選択したテストシナリオについては全て合格したものについての表示形態を異ならせるとなお良い(異ならせなくても良いが)。   If all the test scenarios prepared for an asset program part pass, the asset program part can be passed. Saying that all test scenarios have passed means that the program has been successfully completed. The test of the present invention does not necessarily pass when all of the prepared test scenarios have passed. For example, when the test scenario is to be selected by the user, the test scenario selected and executed is passed ( It is also possible to determine that the test has passed if not rejected. In such a case, it is better to change the display form of the test scenario that has passed all the test scenarios and the test scenario that has passed all of the selected test scenarios (although it may not be different).

前記資産プログラム部品は、ラダープログラムにより構成され、前記変化点は、当該ラダープログラムの接点や回路を組み替えることを目的としたマクロ処理言語でマクロ記述されたものとすることができる。   The asset program component may be a ladder program, and the change point may be described in a macro processing language for the purpose of rearranging the contacts and circuits of the ladder program.

本発明では、変化点を含むプログラム部品のテスト作業の管理を確実かつ簡単に行なうことができる。   In the present invention, it is possible to reliably and easily manage the test operation of the program part including the change point.

本発明の実施の形態を説明するに先立ち、前提となる、あらかじめ予期する変化点をマクロ記述としてラダープログラムに組み込み、アプリケーションに応じて与えるパラメータセットを変更するとともにマクロ処理を実行し、その特定のアプリケーション用プログラム部品を生成する技術について説明する。   Prior to the description of the embodiment of the present invention, a presumed change point is incorporated into a ladder program as a macro description, the parameter set given according to the application is changed, and macro processing is executed. A technique for generating application program parts will be described.

まず、再利用範囲を共通性の多い類似のアプリケーション群(プロダクトライン)に限定する。つまり、特定のプロダクトライン(製品系列)の範囲内だけでプログラム部品の再利用を考えるようにした。一例を示すと、携帯電話、CDプレーヤ、半導体製造装置など一つの製品ドメインに限定し、再利用範囲は、その限定された1つの製品の品揃えやバージョンアップを想定した範囲とした。これは、従来のユーザプログラムの開発においては、例えば、ある製品或いはその製品を製造するための製造ラインの動作・制御を司るラダープログラムを開発する場合、その製品にのみ着目し、その製品のための製造ライン用の専用のラダープログラムを作成していた。一方、複数のアプリケーションにおいて再利用できる汎用性のあるプログラム部品を作成するに際し、PLSE手法による戦略的な再利用部品をつくるため部品にあらかじめ予期されている変化点を組み込むことが行なわれる。この場合に、想定する複数のアプリケーションの範囲をいたずらに広げるのではなく、上述したように、特定のプロダクトライン(製品系列)の範囲内だけでプログラム部品の再利用を考えることで、より適切な部品を作成することができる。   First, the reuse range is limited to similar common application groups (product lines). In other words, the reuse of program parts was considered only within the scope of a specific product line (product series). For example, it is limited to one product domain such as a mobile phone, a CD player, and a semiconductor manufacturing apparatus, and the reuse range is a range that assumes the limited product lineup and version upgrade. This is because, in the development of a conventional user program, for example, when developing a ladder program that controls operation / control of a certain product or a production line for producing the product, attention is paid only to the product, Had created a dedicated ladder program for the production line. On the other hand, when creating a versatile program part that can be reused in a plurality of applications, in order to create a strategic reuse part by the PLSE method, a change point that is expected in advance is incorporated into the part. In this case, rather than unnecessarily expanding the range of multiple applications to be assumed, it is more appropriate to consider reusing program parts only within the range of a specific product line (product series) as described above. Parts can be created.

具体的には、対象となる製品のアプリケーション群(プロダクトライン)において共通性と差異性とを分析し、共通部分と差異部分とが一つのプログラム部品内に混在しないようにプログラム部品を設計する。図1は、製品の共通性と差異性とを分けた一例を説明する図である。同図(a)には、上述した従来の開発対象の製品A(アプリケーション)のみを考慮して分析し、その製品用のプログラムを作成した例が示されている。ここでは、便宜上、4つのモジュール(ファンクションブロック)によりラダープログラムが構築されているとする。この状態において、その製品と同一シリーズ(バリエーション:品揃え)の製品が存在したり、その製品を基礎としたバージョンアップが行なわれたりすることがある。係る場合、そのバリエーションの製品A1,A2,……やバージョンアップされた製品A′,A″,……は、元となる製品Aと共通することが多く、その製品A1,A′等のためのラダープログラムは、元となる製品Aのラダープログラムの一部を編集・変更することで製造することができる場合が多々ある。ただし、通常では、製品A用のラダープログラムを開発する場合には、製品Aのみを考慮して作成するため、バージョンアップした次の製品A′等や製品Aのバリエーションの製品A1等のためのラダープログラムを開発する場合、例えば、同図の変更箇所Xにて示されるように変更箇所が多岐にわたってしまう。   Specifically, the commonality and the difference are analyzed in the application group (product line) of the target product, and the program part is designed so that the common part and the difference part are not mixed in one program part. FIG. 1 is a diagram for explaining an example in which commonality and difference between products are divided. FIG. 6A shows an example in which a program for the product is created by analyzing only the above-described conventional product A (application) to be developed. Here, for convenience, it is assumed that a ladder program is constructed by four modules (function blocks). In this state, a product of the same series (variation: assortment) as the product may exist, or a version upgrade based on the product may be performed. In such a case, the products A1, A2,... Of the variations and the upgraded products A ′, A ″,... Are often in common with the original product A and are for the products A1, A ′, etc. In many cases, the ladder program of can be manufactured by editing and changing a part of the ladder program of the original product A. However, normally, when developing a ladder program for product A, When developing a ladder program for the next upgraded product A ′ or the product A1 of a variation of the product A in order to create only the product A, for example, at the change point X in FIG. As shown, there are many changes.

そのため、次の製品を作成するためにどこを変更すればよいのか分かりづらくなってしまう。また、それらの変更箇所Xは、モジュールA〜Dに組み込まれており、しかも、複数のモジュールにまたがって存在するものもあり、変更箇所のみを入れ替えて対応することが困難である。そのため、共通部分が多く、部分的な変更によって対応できるような場合においても、実際には、再度その製品に合わせたラダープログラムを作成する必要が生じてしまうことがある。   This makes it difficult to know where to change to create the next product. Moreover, those changed locations X are incorporated in the modules A to D, and some of them exist across a plurality of modules, and it is difficult to deal with by changing only the changed locations. Therefore, even when there are many common parts and it can be dealt with by partial changes, it may actually be necessary to create a ladder program that matches the product again.

そこで、同図(b)に示されるように、対象となる製品のみではなく、予め製品の品揃えに加えて将来のバージョンアップも含めて、共通性と差異性とを分析することによって、同図(c)に示されるように、対象製品のバリエーションにおいて差異部分のみをまとめたモジュールEを構成することが可能となる。そして、このように共通部分と差異部分とを明確に分けて部品設計を行うことにより、異なる製品バリエーション等を作成する際にはその差異部分に対応する別のモジュールFと置き換えることにより容易に当該製品のバリエーションを作成することが可能となる。   Therefore, as shown in the figure (b), by analyzing not only the target product but also the future product version in addition to the product lineup, the commonality and the difference are analyzed in advance. As shown in FIG. 3C, it is possible to configure a module E in which only different portions are collected in the variation of the target product. Then, by designing the parts by clearly dividing the common part and the difference part in this way, when creating a different product variation or the like, it can be easily replaced with another module F corresponding to the difference part. Product variations can be created.

図2には、一つのアプリケーションとしての検査装置が示されている。同図において点線で囲まれたように、検査装置はその機能や処理内容によって大まかに6つの部分に分けられる。   FIG. 2 shows an inspection apparatus as one application. As surrounded by a dotted line in the figure, the inspection apparatus is roughly divided into six parts depending on the function and processing contents.

すなわち、この検査装置は、供給部1と、ロードアーム3と、インデックステーブル4と、検査ヘッド5と、アンロードアーム6と、排出部7と、を備えている。供給部1は、検査対象のワークWを貯留するホッパー1aと、そのホッパー1aの下方から1つずつ搬出されるワークWを上昇移動させるエレベータ1bと、そのエレベータ1bで上昇移動されたワークWを搬出する下方傾斜状のシューター1cとを備える。ワークWは、シューター1cを滑り降りるように移動し、供給部1の先端に至る。この供給部1は、エレベータ1bを備えたエレベータ供給装置となっている。   That is, this inspection apparatus includes a supply unit 1, a load arm 3, an index table 4, an inspection head 5, an unload arm 6, and a discharge unit 7. The supply unit 1 includes a hopper 1a that stores the workpiece W to be inspected, an elevator 1b that moves up the workpiece W that is unloaded one by one from below the hopper 1a, and a workpiece W that is moved up by the elevator 1b. And a downwardly inclined shooter 1c to be carried out. The work W moves so as to slide down the shooter 1 c and reaches the tip of the supply unit 1. The supply unit 1 is an elevator supply device including an elevator 1b.

ロードアーム3は、供給部1の先端に位置しているワークWを掴むと共に旋回し、インデックステーブル4上の所定位置に置くロボットである。つまり、ロボットアーム3は、インデックステーブル4へのワーク搬入を行なうロボット輸送の一形態である。他には、3次元空間上を移動可能なロボットアームなど、各種の代替え品がある。   The load arm 3 is a robot that holds the workpiece W positioned at the tip of the supply unit 1 and turns and places the workpiece W at a predetermined position on the index table 4. That is, the robot arm 3 is a form of robot transportation that carries a work into the index table 4. In addition, there are various alternatives such as a robot arm that can move in a three-dimensional space.

このインデックステーブル4が回転動作を行うことにより、ワークWは検査位置へと移動し、検査ヘッド5が所定位置に降下し検査を行う。インデックステーブル4は更に回転し、ワークWを取り出し位置へと移動する。つまり、インデックステーブル4は、90度ごとに回転・停止するように制御される。これにより、ロードアーム3により供給されワークWは、90度回転して検査位置に移動し、その後さらに90度移動して排出位置に移動することになる。換言すると、インデックステーブル4は、4つの位置で位置決めがされるように動作する。   As the index table 4 rotates, the workpiece W moves to the inspection position, and the inspection head 5 descends to a predetermined position for inspection. The index table 4 further rotates and moves the workpiece W to the take-out position. That is, the index table 4 is controlled to rotate and stop every 90 degrees. As a result, the workpiece W supplied by the load arm 3 rotates 90 degrees and moves to the inspection position, and then moves further 90 degrees and moves to the discharge position. In other words, the index table 4 operates so as to be positioned at four positions.

検査位置や排出位置などの所望に位置にワークを移動させる手段としては、インデックステーブル4に限ることはなく、たとえば、ベルトコンベアその他各種の手段がある。そして、ベルトコンベアを用いた場合には、ワークを検出するためのセンサを設け、そのセンサ位置にワークが来たときにベルトコンベアを停止することで位置決めできる。よって、センサの設置位置を調整することで任意の位置で位置決めをすることができる。   The means for moving the workpiece to a desired position such as an inspection position or a discharge position is not limited to the index table 4 and includes, for example, a belt conveyor and various other means. When a belt conveyor is used, a sensor for detecting a workpiece is provided, and positioning can be performed by stopping the belt conveyor when the workpiece comes to the sensor position. Therefore, it can be positioned at any position by adjusting the installation position of the sensor.

検査装置5は、たとえばカラーセンサなどを用いることで、形状と色情報を加味して良否判定を行なうことができる。これにより、より高精度な判定を行なうことができる。また、これに限ることはなく、形状を認識する画像センサを用い、簡易で短時間での良否判定を行なうようにすることもできる。   The inspection device 5 can perform pass / fail determination by taking shape and color information into account by using, for example, a color sensor. Thereby, more accurate determination can be performed. Further, the present invention is not limited to this, and it is also possible to perform a pass / fail judgment simply and in a short time using an image sensor that recognizes the shape.

排出位置に移動したワークWは、アンロードアーム16によって掴まれてインデックステーブル14から取り出され、排出部17に送られる。そして、排出部17は、検査結果に従い良品/不良品とを分別して排出する。   The workpiece W moved to the discharge position is gripped by the unload arm 16 and taken out from the index table 14 and sent to the discharge unit 17. Then, the discharge unit 17 sorts and discharges non-defective / defective products according to the inspection result.

上述したように、図2に示すアプリケーション(検査装置)は、仕様の異なるバリエーションを構築することができる。図3は、上記の検査装置に対して、同様の検査機能を有するものの、一部の特性において仕様の異なるバリエーションからなるアプリケーションの一例を表形式にて示している。同図における検査装置Aが、図2を用いて説明した検査装置の一例であり、検査装置Bとは、その検査装置Aの特性を一部変更したバリエーションである。同図に示される検査装置Aと検査装置Bとの特性を比較すると、ワークの搬入及び搬出に関しては双方ともロボット輸送を採用しているが、それ以外の特性においては差異が見られる。例えば、供給部において、検査装置Aはエレベータ供給を採用しているが、検査装置Bは採用していない(供給部がない)。同様に、検査対象のワークを位置決めするために、検査装置Aはインデックステーブルを用いているが、検査装置Bはベルトコンベアを採用している。同様に、ワークの停止位置についても、検査装置Aは4ポジションによる位置決めを行っているが、検査装置Bではセンサによる位置決めを採用している。そして、検査を行う際に、検査装置Aはカラーセンサを採用しているが、検査装置Bは画像センサを用いている。また、検査後のワークの排出については、検査装置Aはロボットによる良品と不良品との分別を行っており、検査装置Bでは不良品のみを押し出す方法を採用している。   As described above, the application (inspection apparatus) shown in FIG. 2 can construct variations with different specifications. FIG. 3 shows, in a tabular form, an example of an application that has the same inspection function as the above-described inspection apparatus but includes variations with different specifications in some characteristics. The inspection apparatus A in the figure is an example of the inspection apparatus described with reference to FIG. 2, and the inspection apparatus B is a variation in which the characteristics of the inspection apparatus A are partially changed. Comparing the characteristics of the inspection apparatus A and the inspection apparatus B shown in the same drawing, both robot transportation is adopted for loading and unloading workpieces, but there are differences in other characteristics. For example, in the supply section, the inspection apparatus A employs elevator supply, but the inspection apparatus B does not employ (no supply section). Similarly, in order to position the workpiece to be inspected, the inspection apparatus A uses an index table, but the inspection apparatus B employs a belt conveyor. Similarly, the inspection apparatus A performs positioning by four positions for the workpiece stop position, but the inspection apparatus B employs positioning by a sensor. And when inspecting, although the inspection apparatus A employs a color sensor, the inspection apparatus B uses an image sensor. Further, regarding the discharge of the workpiece after the inspection, the inspection apparatus A separates the non-defective product from the defective product by the robot, and the inspection device B adopts a method of pushing out only the defective product.

これらの検査装置A並びに検査装置Bを特性によって共通部分と差異部分とに分けたコンポーネント関連図が、図4〜図6に示されている。「コンポーネント関連図」は、ユーザが選択する特性とは異なり、何をどのようにして作るかという視点で作成される部品図であり、ソフトウェア設計のクラス図に相当する。そして、分析結果を参考に、共通特性と、差異特性が一つの部品内に混在しないように部品を設計する。   Component related diagrams in which the inspection apparatus A and the inspection apparatus B are divided into a common part and a different part according to characteristics are shown in FIGS. Unlike the characteristics selected by the user, the “component relation diagram” is a part diagram created from the viewpoint of what and how to create, and corresponds to a software design class diagram. Then, referring to the analysis result, the parts are designed so that the common characteristics and the difference characteristics are not mixed in one part.

図4には、コンポーネントの全体図が示されている。同図にて示されるように、検査装置20は、ワーク搬入部21、位置決め部22、検査部23、及びワーク搬出部24に区分されている。そして、ワーク搬入部21は、さらに供給部21aとロードアーム21bとが備えられている。そして、位置決め部22にはインデックステーブル22aとベルトコンベア22bが、検査部23には検査方法25が、そしてワーク搬出部24にはアンロ―ドアーム24aと搬出部24bとがそれぞれ備えられている。実際の装置(アプリケーション)における6つの部分との関係でいうと、供給部1と、ロードアーム3とでワーク搬入部21が構成され、アンロードアーム6と、排出部7とでワーク搬出部24が構成される。   FIG. 4 shows an overall view of the components. As shown in the figure, the inspection apparatus 20 is divided into a work carry-in part 21, a positioning part 22, an inspection part 23, and a work carry-out part 24. The workpiece carry-in unit 21 further includes a supply unit 21a and a load arm 21b. The positioning unit 22 includes an index table 22a and a belt conveyor 22b, the inspection unit 23 includes an inspection method 25, and the work unloading unit 24 includes an unload arm 24a and an unloading unit 24b. In terms of the relationship with the six parts in the actual apparatus (application), the work carry-in part 21 is constituted by the supply part 1 and the load arm 3, and the work carry-out part 24 is constituted by the unload arm 6 and the discharge part 7. Is configured.

図5は図4のコンポーネント関連図の一部に対応し、ワーク搬入部21における検査装置A並びに検査装置Bの共通性と差異性が示されている。同図に示すように、検査装置Aは、ワーク搬入部21として供給部(エレベータ供給)21aとロードアーム21bが備えられているが、それに対して検査装置Bは供給部21aはなく、ロードアーム21bのみ備えられている。すなわち、これらの検査装置においては、供給部21aが差異部分であり、ロードアーム21bは共通部分となる。そして、このように製品バリエーションにおける差異部分となった供給部21aは、オプション部品として切り出しておく。   FIG. 5 corresponds to a part of the component relation diagram of FIG. 4, and shows the commonality and difference between the inspection apparatus A and the inspection apparatus B in the work carry-in unit 21. As shown in the figure, the inspection apparatus A is provided with a supply part (elevator supply) 21a and a load arm 21b as a work carry-in part 21, whereas the inspection apparatus B does not have a supply part 21a but a load arm. Only 21b is provided. That is, in these inspection apparatuses, the supply part 21a is a different part, and the load arm 21b is a common part. And the supply part 21a used as the difference part in a product variation in this way is cut out as an optional component.

図6は図4のコンポーネント関連図の一部に対応し、位置決め部22における検査装置A並びに検査装置Bの共通性と差異性が示されている。同図にて示されるように、検査装置Aは、位置決め部22としてインデックステーブル22aを採用しているが、それに対して検査装置Bはベルトコンベア22bを採用している。すなわち、これらの検査装置においては、インデックステーブル22aとベルトコンベア22bとのいずれかを選択することとなる。そして、このような場合は、インデックステーブル22aとベルトコンベア22bとを代替部品(代替コンポーネント)として切り出しておく。   6 corresponds to a part of the component relation diagram of FIG. 4, and shows the commonality and difference between the inspection apparatus A and the inspection apparatus B in the positioning unit 22. As shown in the figure, the inspection apparatus A employs an index table 22a as the positioning portion 22, whereas the inspection apparatus B employs a belt conveyor 22b. That is, in these inspection apparatuses, either the index table 22a or the belt conveyor 22b is selected. In such a case, the index table 22a and the belt conveyor 22b are cut out as substitute parts (substitute components).

このとき、ラダープログラムにて必要な回路を行単位で取り出すマクロ例としては、
!$IF(condition)[
true statements
!][
false statements
!]
となる。ここで、conditionには、条件を記述する。ある特性が選択されているかどうかを条件とする場合は、
;$feature=true
もしくは、
;$feature=false
と記述する。このとき、feature(特性)には、特定の特性名を指定する。そして、truestatementsとfalse statementsには、取り出したい範囲の回路が入り、行コメントに記述された[]で囲む。
At this time, as a macro example to extract the necessary circuit in the ladder program in line units,
! $ IF (condition) [
true statements
! ] [
false statements
! ]
It becomes. Here, the condition is described in condition. If you are conditional on whether a characteristic is selected,
; $ Feature = true
Or
; $ Feature = false
Is described. At this time, a specific characteristic name is designated as a feature. Truestatements and false statements contain the circuit in the range you want to extract, and are enclosed in [] written in the line comment.

このようなマクロを使用した例が図7及び図8に示されている。図7には上述したワーク搬入部21のファンクションブロックが示されており、オプションの扱いが示されている。同図にて示されるように、「エレベータ供給」が条件として記述されており、オプションとして選択されていることが示されている。   Examples using such macros are shown in FIGS. FIG. 7 shows a function block of the workpiece carry-in unit 21 described above, and the handling of options is shown. As shown in the figure, “Elevator supply” is described as a condition and indicates that it is selected as an option.

そして、図8には位置決め部22のファンクションブロックが示されており、代替の扱いが示されている。同図にて示されるように、インデックステーブルとベルトコンベアが代替として記述されている。このように、アプリケーション毎の部品に生じる差異は部品の変形で対応する。尚、ここでは、ワーク搬入部21におけるエレベータ供給と、位置決め部22におけるインデックステーブルとベルトコンベアについて説明したが、他の差異についても同様に対応できることは言うまでもない。   FIG. 8 shows a function block of the positioning unit 22 and shows an alternative treatment. As shown in the figure, an index table and a belt conveyor are described as alternatives. In this way, the difference that occurs in the components for each application is dealt with by deformation of the components. In addition, although the elevator supply in the workpiece carry-in part 21 and the index table and the belt conveyor in the positioning part 22 have been described here, it is needless to say that other differences can be dealt with similarly.

図9及び図10に、特性モデルの例が示されている。特性モデルとは、製品ラインアップを特性によって表現したモデルである。ここで「特性」は、機能、性能、デザインなどユーザが製品を選択する基準になる概念である。また、特性モデルは、装置を共通性と差異性に着目して分析した特性のモデルである。   9 and 10 show examples of characteristic models. The characteristic model is a model that represents the product lineup by characteristics. Here, the “characteristic” is a concept that becomes a reference for the user to select a product, such as function, performance, and design. In addition, the characteristic model is a characteristic model obtained by analyzing devices by paying attention to commonality and difference.

これらの図にて示されるように、検査装置30は、その特性によって供給31,ワーク搬入32,位置決め33,検査34,ワーク搬出35,排出36のコンポーネントに分けられる。そして、供給31にはエレベータ供給がオプションコンポーネントとして備えられている。ここで、エレベータ供給に設けられている円37aは、この特性がオプションコンポーネントとして選択可能に設定されていることを示している。それに対して、ワーク搬入32及びワーク搬出35に設けられたロボット輸送38及び40は、オプションとしての特性ではないため、エレベータ供給37における円37aのような表示はされていない。   As shown in these drawings, the inspection apparatus 30 is divided into components of a supply 31, a workpiece carry-in 32, a positioning 33, an inspection 34, a workpiece carry-out 35, and a discharge 36 according to the characteristics. The supply 31 is provided with an elevator supply as an optional component. Here, a circle 37a provided in the elevator supply indicates that this characteristic is set to be selectable as an optional component. On the other hand, the robot transports 38 and 40 provided in the workpiece carry-in 32 and the workpiece carry-out 35 are not optional characteristics, and thus are not displayed as a circle 37a in the elevator supply 37.

また、位置決め33には停止位置39が設けられており、その停止位置は、その特性上さらに4ポジション39aとセンサによる位置決め39bとが代替コンポーネントとして設けられている。同様に、検査34にはカラーセンサ34aと画像センサ34bが、そして排出36には不良品のみ押し出し36aとロボットによる分別36bとがそれぞれ代替整コンポーネントとして設定されている。   Further, the positioning 33 is provided with a stop position 39, and the stop position is further provided with a 4-position 39a and a sensor positioning 39b as alternative components in view of its characteristics. Similarly, a color sensor 34a and an image sensor 34b are set for the inspection 34, and a defective product push-out 36a and a robot sorting 36b are set for the discharge 36, respectively.

また、この特性モデルと、図4に示したコンポーネント関連図とを対比すると、特性モデル図の供給31とワーク搬入32とが、コンポーネント関連図のワーク搬入部21に対応し、特性モデル図のワーク搬出35と排出36とが、コンポーネント関連図のワーク搬出部24に対応する。このように、各図を作成する際の視点が異なることから、まとめ方が一部相違する。   Further, when this characteristic model is compared with the component relation diagram shown in FIG. 4, the supply 31 and the workpiece carry-in 32 of the characteristic model diagram correspond to the workpiece carry-in portion 21 of the component relation diagram, and the workpiece of the characteristic model diagram. The carry-out 35 and the discharge 36 correspond to the work carry-out unit 24 in the component relation diagram. Thus, since the viewpoints at the time of creating each drawing are different, the way of summarizing is partially different.

図11は、本発明に係るプログラム作成支援装置10の一実施の形態が示されている。同図に示すように、この実施の形態においては、ドメイン分析支援ツール50と、プログラム部品管理ツール60と、プログラム部品データベース70と、単体テストツール71と、PLCシミュレータ72とを備えている。なお、ドメイン分析支援ツール50は、なくても良い。   FIG. 11 shows an embodiment of a program creation support apparatus 10 according to the present invention. As shown in the figure, in this embodiment, a domain analysis support tool 50, a program part management tool 60, a program part database 70, a unit test tool 71, and a PLC simulator 72 are provided. Note that the domain analysis support tool 50 may be omitted.

ドメイン分析支援ツール50内の特性モデルエディタ51は、開発対象ドメインにおける製品ラインアップの共通性と差異性とを分析し、製品ラインアップを「特性」によって表現した分析モデルである特性モデル(製品の特性情報)52を作成するものである。つまり、図9に示す特性モデルを作成するエディタである。この特性モデルを作成することによって、共通性と差異性(オプションの有無や、選択(代替え)可能な部品の有無等)が分析でき、図において表現できる。係る特性モデルが、プログラム部品管理ツール60に与えられる。   The characteristic model editor 51 in the domain analysis support tool 50 analyzes the commonality and the difference of the product lineup in the development target domain, and the characteristic model (the product model) is an analysis model expressing the product lineup by “characteristics”. Characteristic information) 52 is created. That is, the editor creates the characteristic model shown in FIG. By creating this characteristic model, it is possible to analyze the commonality and the difference (the presence / absence of options, the presence / absence of parts that can be selected (substituted), etc.) and can be expressed in a diagram. Such a characteristic model is given to the program part management tool 60.

プログラム部品管理ツール60は、プロダクト・パラメータ・マネージャ61と、コンポーネント・マネージャ62と、マクロ・プロセッサ63と、コンポーネント関連図エディタ64と、コンポーネント・エディタ65と、ワークメモリ66とを備えている。   The program parts management tool 60 includes a product parameter manager 61, a component manager 62, a macro processor 63, a component relation diagram editor 64, a component editor 65, and a work memory 66.

プロダクト・パラメータ・マネージャ61は、ある設備装置や製品のアプリケーションを構築するのに必要なプログラム部品群と、そこに記述されるマクロへの入力パラメータセット(「プロダクト・パラメータ」と呼ぶ)67を管理するものである。本実施の形態では、ドメイン分析支援ツール50が作成した特性モデルと製品の特性情報を元に、プロダクト・パラメータを作成する機能も持っている。   The product parameter manager 61 manages a group of program parts necessary for constructing an application of a certain facility device or product, and an input parameter set (called “product parameter”) 67 to a macro described therein. To do. The present embodiment also has a function of creating product parameters based on the characteristic model created by the domain analysis support tool 50 and the product characteristic information.

つまり、差異性に基づいて変更可能な各種の組み合わせからなるアプリケーションを実現するために記述されるマクロへの入力パラメータセット(プロダクト・パラメータ)67を作成する。上述した例では、検査装置Aを実現するためのマクロの入力パラメータや、検査装置Bを実現するためのマクロへの入力パラメータを作成する。もちろん、選択・生成可能なアプリケーションは、検査装置A,Bに限られるものではなく、他の部品の組み合わせからなる検査装置も生成可能なため、それらの検査装置を実現するためのマクロへの入力パラメータも作成する。   That is, an input parameter set (product parameter) 67 to a macro described to realize an application composed of various combinations that can be changed based on the difference is created. In the example described above, a macro input parameter for realizing the inspection apparatus A and a macro input parameter for realizing the inspection apparatus B are created. Of course, the applications that can be selected and generated are not limited to the inspection apparatuses A and B, and an inspection apparatus composed of a combination of other parts can also be generated. Therefore, input to a macro for realizing those inspection apparatuses is possible. Create parameters.

このマクロへの入力パラメータセット67の作成であるが、製品の特性情報を認識しその差異性に基づいて選択可能な組み合わせを全て自動的に抽出することで、自動的に生成するようにすることができる。ただし、係る自動的に生成する方法によると、現実的でないアプリケーションも構築されるため、例えば、図9に示す特性モデル図を表示装置に表示すると共に、図示省略する入力装置をユーザが操作して、差異性の部分(選択可能な部分)について指定する(図10中黒丸印)。プロダクト・パラメータ・マネージャ61は、係る指定された組み合わせに基づいてマクロへの入力パラメータを生成する。これにより、ユーザが、入力装置を操作してアプリケーションを複数設定することで、マクロへの入力パラメータセット(プロダクト・パラメータ)67が生成される。   The creation of the input parameter set 67 for this macro is to be automatically generated by recognizing product characteristic information and automatically extracting all selectable combinations based on the difference. Can do. However, according to such an automatically generating method, an unrealistic application is also constructed. For example, the characteristic model diagram shown in FIG. 9 is displayed on the display device, and the input device (not shown) is operated by the user. , A difference portion (selectable portion) is designated (black circle in FIG. 10). The product parameter manager 61 generates an input parameter to the macro based on the designated combination. Accordingly, when the user operates the input device to set a plurality of applications, an input parameter set (product parameter) 67 to the macro is generated.

プログラム部品データベース70は、図12に示すように、製品の特性情報と、資産プログラム情報とが格納されている。製品の特性情報は、ドメイン分析支援ツール50で作成された特性モデルと、特性の組み合わせ(「マクロへの入力パラメータ」に対応)を規定する特性選択データ(マクロへの入力パラメータである)がある。資産プログラム部品情報は、各部品を構成するコンポーネントごとに登録される。これら各コンポーネントは、図4中符号20から25で示す個々のコンポーネントに対応し、「a」,「b」などの付記号が付された符号は、変更箇所及び変更内容を示すためのマクロとして、上位のコンポーネント中に記述される。   As shown in FIG. 12, the program parts database 70 stores product characteristic information and asset program information. The product characteristic information includes a characteristic model created by the domain analysis support tool 50 and characteristic selection data (which is an input parameter to the macro) that defines a combination of characteristics (corresponding to “input parameters to the macro”). . The asset program part information is registered for each component constituting each part. These components correspond to the individual components indicated by reference numerals 20 to 25 in FIG. 4, and the reference numerals with “a”, “b”, and the like are used as macros for indicating the changed parts and the changed contents. Is described in the upper component.

各コンポーネントは、コンポーネントヘッダと、そのコンポーネントヘッダに関連付けられた資産プログラム部品並びにテストシナリオから構成される。資産プログラム部品は、そのコンポーネントを実現するために基本となるラダープログラムである。この資産プログラム部品を元にして、一部を変更した新プログラム部品を作成する。資産プログラム部品のラダープログラムを変化したいところが存在する場合には、マクロ記述が組み込まれる。そして、1つのコンポーネントに対し、1つのファンクションブロックが構築される。テストシナリオは、プログラム部品への入力条件、および期待出力を時系列に記載したものである。作成されたユーザプログラムの検証(単体テスト)時に使用する。   Each component includes a component header, asset program parts associated with the component header, and a test scenario. The asset program part is a ladder program that is the basis for realizing the component. Based on this asset program part, a new program part with a part changed is created. If there is a place to change the ladder program of the asset program part, a macro description is incorporated. One function block is constructed for one component. The test scenario describes the input conditions to the program parts and the expected output in time series. Used when verifying the created user program (unit test).

コンポーネントヘッダは、図13に示すようなデータ構造からなる。図から明らかなように、上位から順に、コンポーネント名,実現している特性のリスト,インタフェース定義,関連コンポーネントリスト,プログラム種別,プログラム部品ファイル,テストシナリオリスト並びにコメントから構築される。   The component header has a data structure as shown in FIG. As is apparent from the figure, the component name, the realized characteristic list, the interface definition, the related component list, the program type, the program part file, the test scenario list, and the comment are constructed in order from the top.

「コンポーネント名」には、コンポーネント関連図エディタで表示されるそのコンポーネントの名称が記述される。このコンポーネント名は、対応するコンポーネントの1番上の欄に標記される。   “Component name” describes the name of the component displayed in the component relation diagram editor. This component name is marked in the top column of the corresponding component.

「実現している特性のリスト」には、コンポーネントにより実現/実装されている特性のリストが記述される。特性の名前でもあり、コンポーネント関連図エディタで表示された場合に、そのコンポーネントの2番目の欄に標記される。また、特性モデル図(図9等)において、各それぞれの特性として標記される。   In the “list of realized characteristics”, a list of characteristics realized / implemented by the component is described. It is also the name of the property, and when displayed in the component relationship diagram editor, it is marked in the second column for that component. In the characteristic model diagram (FIG. 9 and the like), each characteristic is marked.

インタフェース定義と、関連コンポーネントリストは、外部との関連を定義する領域である。「インタフェース定義」には、他のコンポーネントが利用可能な入出力定義を記述する。具体的には、変数名およびデータ型、入出力の区別などが記述される。「関連コンポーネントリスト」には、そのコンポーネントが動作するために必要なコンポーネントを記載したリストが記述される。たとえば、図4において検査装置20のコンポーネントには、ワーク搬入部21,位置決め部22,検査部23,ワーク搬出部24の各コンポーネントを特定する情報がリストとして記述される。これにより、各コンポーネントの接続関係がわかり、コンポーネント関連図も再現できる。   The interface definition and the related component list are areas for defining a relation with the outside. In the “interface definition”, an input / output definition that can be used by other components is described. Specifically, variable names and data types, input / output distinction, and the like are described. In the “related component list”, a list describing components necessary for the operation of the component is described. For example, in FIG. 4, information specifying each component of the work carry-in part 21, the positioning part 22, the inspection part 23, and the work carry-out part 24 is described as a list in the components of the inspection apparatus 20. Thereby, the connection relation of each component can be understood, and the component relation diagram can also be reproduced.

プログラム種別と、プログラム部品ファイルは、コンポーネント本体であり、「プログラム種別」には、プログラム部品が実装されている言語、または実行できるPLC機種の種別が記述され、「プログラム部品ファイル」には、上記プログラム種別により、実装されたプログラムのソースコードが記述される。   The program type and the program part file are component bodies, the “program type” describes the language in which the program part is mounted or the type of PLC model that can be executed, and the “program part file” The source code of the implemented program is described according to the program type.

テストシナリオリストは、制御対象情報であり、上記プログラム部品への入力条件、および期待出力を時系列に記載したシナリオファイルを複数リストにしたものが記述される。このテストシナリオリストは、図13(b)に示すように、シナリオIDと、テスト結果と、テストシナリオファイル名と、適合特性選択データ名とを関連付けたテーブルとなっている。ここで、シナリオIDは、テストシナリオをユニークに特定するための認識番号であり、テスト結果の欄は、そのテストシナリオに従って実行した結果(OK/NG)並びに未テスト状態(−)が格納される。テキストシナリオファイル名は、各テキストシナリオのファイル名が格納される。適合特性選択データ名は、対応するテキストシナリオを用いてテストを行なえる特性選択データのファイル名を格納する。すなわち、異なる特性選択データであっても、プログラム部品への入力条件、およびそれに対する期待出力の時系列データが等しいことがある。特に、アプリケーション群を構成する各アプリケーションは、バージョンアップであったり、製品の品揃えであり共通する部分も多数あるため、異なる特性選択データであっても同一のテストシナリオを用いることができることがある。また、1つの特性選択データに対し、複数のテストシナリオが用意されることももちろんある。   The test scenario list is information to be controlled and describes a list of a plurality of scenario files in which the input conditions to the program parts and the expected output are described in time series. As shown in FIG. 13B, this test scenario list is a table in which scenario IDs, test results, test scenario file names, and compatible characteristic selection data names are associated with each other. Here, the scenario ID is an identification number for uniquely identifying the test scenario, and the result (OK / NG) executed according to the test scenario and the untested state (-) are stored in the test result column. . The text scenario file name stores the file name of each text scenario. The compatible characteristic selection data name stores a file name of characteristic selection data that can be tested using the corresponding text scenario. That is, even with different characteristic selection data, the input conditions to the program component and the expected output time series data may be the same. In particular, each application that constitutes an application group may be upgraded, or may have a product lineup and have many common parts, so the same test scenario may be used even with different characteristic selection data. . Of course, a plurality of test scenarios may be prepared for one characteristic selection data.

なお、「コメント」には、コンポーネントの内容を把握するためのコメントが記述される。このように、コンポーネントヘッダにより、そのコンポーネントに格納された資産プログラム部品並びにテストシナリオとのリンクが張られるとともに、他のコンポーネントとの関連づけが行なわれる。   In the “comment”, a comment for understanding the content of the component is described. As described above, the component header links the asset program part and the test scenario stored in the component and associates them with other components.

単体テストツール71は、ラダー部品に与える仮想入力と期待出力のペアをテストケースとして設定できる。設定した「仮想入力」をPLCシミュレータ72に与え、シミュレーションを実行し、その出力と期待出力を比較して、テストケースのOK/NGを判定する機能を持つ。その判定結果は、コンポーネント関連図エディタ64,コンポーネント・マネージャ62経由でプログラム部品データベース70に格納される。   The unit test tool 71 can set a pair of virtual input and expected output given to the ladder part as a test case. The set “virtual input” is given to the PLC simulator 72, the simulation is executed, the output is compared with the expected output, and OK / NG of the test case is determined. The determination result is stored in the program parts database 70 via the component relation diagram editor 64 and the component manager 62.

PLCシミュレータ72はプログラマブルコントローラ(PLC)をパソコン上で模擬実行するエミュレータである。ダウンロードされたラダープログラムを、単体テストツール71から与えられる仮想的なI/O情報を元に実行する。   The PLC simulator 72 is an emulator that simulates and executes a programmable controller (PLC) on a personal computer. The downloaded ladder program is executed based on virtual I / O information given from the unit test tool 71.

コンポーネント・マネージャ62は、プログラム部品データベース70にアクセスし、データの読み書きを行なう。一例を示すと、ラダープログラムの作成用の資産プログラム部品(マクロ付)が格納されているプログラム部品データベース70から、プロダクト・パラメータ・マネージャ61によって作成されたプロダクト・パラメータに従い、必要となる資産プログラム部品68を取り出す機能を有する。また、プログラム部品データベース70に格納されていない部品を新規作成したり、既存の資産プログラム部品に編集を加えた場合において、新たに作成された資産プログラム部品をプログラム部品データベース70に格納する機能も有する。   The component manager 62 accesses the program parts database 70 to read / write data. As an example, the required asset program parts according to the product parameters created by the product parameter manager 61 from the program parts database 70 storing the asset program parts (with macros) for creating the ladder program. The function of taking out 68 is provided. In addition, when a part not stored in the program part database 70 is newly created or an existing asset program part is edited, the newly created asset program part is stored in the program part database 70. .

マクロ・プロセッサ63は、マクロ記述とプロダクト・パラメータに従い、ラダープログラムの変形を実行し、特定アプリケーション用のプログラム部品を生成する機能を有する。すなわち、アプリケーションの要求仕様(特性)と差異部分の関連づけを行なうもので、図14に示すように、必要な資産プログラム部品を読み出し、資産プログラム部品中にマクロ記述が存在するものに対しては、マクロへの入力パラメータである特性選択データに基づいてマクロ処理を実行し、ラダープログラム中の不要な回路を削除し、必要十分なラダー回路で記述された特定のアプリケーション用プログラム部品が生成される。マクロ処理は、あらかじめマクロ記述で定義した変化点を特性選択データを入力パラメータとして変形処理するもので、係る処理をマクロ・プロセッサ63が実行する。   The macro processor 63 has a function of executing a modification of the ladder program according to the macro description and the product parameter, and generating a program component for a specific application. That is, associating the required specifications (characteristics) of the application with the difference part, as shown in FIG. 14, when a necessary asset program part is read and a macro description exists in the asset program part, Macro processing is executed based on the characteristic selection data that is an input parameter to the macro, unnecessary circuits in the ladder program are deleted, and a specific application program component described by a necessary and sufficient ladder circuit is generated. In the macro process, the change point defined in advance in the macro description is transformed using the characteristic selection data as an input parameter, and the macro processor 63 executes the process.

なお、図14に示すように、資産プログラム部品の中には、実際のプログラムと、マクロに加え、その子コンポーネントとが編集禁止状態にあるか否かを規定する「読み取り専用属性フラグ」と、テストが完了して合格した資産プログラム部品であるかを特定するための「テスト済みフラグ」がある。これらのフラグについての利用は、後述する。   As shown in FIG. 14, the asset program parts include a “read-only attribute flag” that specifies whether or not an actual program, a macro, and its child components are in an edit prohibited state, and a test. There is a “tested flag” for identifying whether the asset program part is completed and passed. The use of these flags will be described later.

コンポーネント関連図エディタ64は、コンポーネント間の関連を視覚的に表示した図であるコンポーネント関連図(図4参照)を表示装置のエディタ画面上に表示すると共に、そのコンポーネント関連図上で編集・テスト対象コンポーネントを特定し、コンポーネントの編集手段たるコンポーネント・エディタ65や、テスト手段たる単体テストツール71を起動する。コンポーネント関連図は、例えばプログラムデータベース70に格納されたコンポーネントヘッダの関連コンポーネントリストなどを参照することで各コンポーネントの関係がわかるので、コンポーネント関連図を構築できる。換言すると、コンポーネント関連図が構築できるような情報を関連コンポーネントリストに登録する。また、特性モデルと同様に、コンポーネント関連図もプログラム部品データベース70に登録しておき、それを読み出すようにしても良い。   The component relation diagram editor 64 displays a component relation diagram (see FIG. 4), which is a diagram visually showing the relation between components, on the editor screen of the display device, and is edited and tested on the component relation diagram. A component is specified, and a component editor 65 as a component editing means and a unit test tool 71 as a test means are activated. The component relation diagram can be constructed by referring to the relation component list of the component header stored in the program database 70, for example, so that the relationship between the components can be understood. In other words, information that can build a component relation diagram is registered in the related component list. Similarly to the characteristic model, the component relation diagram may be registered in the program parts database 70 and read out.

また起動処理は、具体的には、図15に示すように、表示装置に表示されたコンポーネント関連図エディタ34のエディタ画面Wに表示されたコンポーネント関連図の中から、処理対象のコンポーネントを選択する。係る選択は、たとえばユーザがポインティングデバイスを操作し、エディタ画面W上のポインタを移動し、目的のコンポーネント(図では「ワーク搬入部」)の上に位置させた後、クリックする。すると、コンポーネント関連図エディタ64は、そのクリックされた位置の座標位置からどのコンポーネントが指定・選択されたかを判断し、選択されたことを示す標記(図の例では、頂点並びに中間点に○を表示)をするとともに、起動する手段(編集/単体テスト)を選択する入力メニューリストMLを表示する。そして、入力メニューリストML中の「編集」が選択された場合には、編集手段たるコンポーネント・エディタ65を起動し、入力メニューリストML中の「単体テスト」が選択された場合には、テスト手段たる単体テストツール71を起動する。これらの処理もコンポーネント関連図エディタ64が行なう。   Specifically, in the activation process, as shown in FIG. 15, the component to be processed is selected from the component relation diagram displayed on the editor screen W of the component relation diagram editor 34 displayed on the display device. . For this selection, for example, the user operates the pointing device, moves the pointer on the editor screen W, places the pointer on the target component (“work loading portion” in the figure), and then clicks. Then, the component relation diagram editor 64 determines which component has been designated / selected from the coordinate position of the clicked position, and indicates that it has been selected (in the example of the figure, a circle is added to the vertex and the middle point). Display) and an input menu list ML for selecting a starting means (edit / unit test) is displayed. When “edit” in the input menu list ML is selected, the component editor 65 as an editing unit is activated. When “unit test” in the input menu list ML is selected, the component editor 65 is used as a test unit. The unit test tool 71 is activated. These processes are also performed by the component relation diagram editor 64.

さらにコンポーネント関連図エディタ64は、指定されたコンポーネントの資産プログラム部品(マクロ記述済み)68を取得すると共に、そのコンポーネントを元とし(以下、親のコンポーネントと表現)、その元から派生したコンポーネント(以下、子のコンポーネントと表現)が有るか否かを判断する。つまり、図15のコンポーネント関連図で下位側に接続されたコンポーネント(子)があるか否かを判断し、存在する場合には、その子のコンポーネントに対応する資産プログラム部品68も読み出し、読み出した各資産プログラム部品を合成し、合成したプログラムをワークメモリ66に格納する。図15に示す例では、「ワーク搬入部」が選択されたため、その下位に繋がる「供給部」と「ロードアーム」の各コンポーネントが子のコンポーネントとなり、それぞれの資産プログラム部品も読み出され、合成される。ただし、選択されたのはあくまでも親のコンポーネントである「ワーク搬入部」であるため、本実施の形態では、編集対象は係る親のコンポーネント(ワーク搬入部)に対する資産プログラム部品の部分のみとした。換言すると、子のコンポーネント(供給部,ロードアーム)に対応する資産プログラム部品については、プログラムの中身(ラダー回路)を見ることはできるものの、編集処理はできないようにしている。もちろん、本発明は係る機能を設けるものに限られるものではなく、このコンポーネントに対しても編集できるようにしても良い。   Further, the component relation diagram editor 64 obtains the asset program part (macro described) 68 of the designated component, and based on the component (hereinafter referred to as a parent component), a component derived from the source (hereinafter referred to as the parent component). , Child components and expressions). That is, it is determined whether or not there is a component (child) connected to the lower side in the component relation diagram of FIG. 15, and if it exists, the asset program part 68 corresponding to the child component is also read and each read The asset program parts are synthesized, and the synthesized program is stored in the work memory 66. In the example shown in FIG. 15, since the “work carry-in part” is selected, the components “supply part” and “load arm” connected to the lower part become child components, and the respective asset program parts are also read and synthesized. Is done. However, since only the “work carry-in part” that is the parent component is selected, in this embodiment, only the part of the asset program part for the parent component (work carry-in part) is selected. In other words, for the asset program parts corresponding to the child components (supply unit, load arm), the contents of the program (ladder circuit) can be viewed, but the editing process cannot be performed. Of course, the present invention is not limited to providing such a function, and this component may be editable.

このとき、コンポーネント関連図エディタ64は、ワークメモリ66に格納した際の日時情報を記憶保持する機能も持つ。また、起動されたコンポーネント・エディタ65は、このワークメモリ66に格納されたプログラム(合成済み)を読み出して編集処理をする。そして、コンポーネント・エディタ65は、編集処理が終了したならば、編集後のプログラムをワークメモリ66に保存する。この保存された編集後のプログラムは、コンポーネント関連図エディタ64で読み出され、編集対象の資産プログラム部品(編集後)をコンポーネント・マネージャ62を介してプログラム部品データベース70の対応するコンポーネントのファイルに格納し、更新処理をする。コンポーネント関連図エディタ64は、コンポーネント・エディタ65で編集処理が行なわれなかった場合には、上述したプログラム部品データベース70への更新処理を行なわないようにしている。編集処理がされたか否かは、コンポーネント関連図エディタ64がワークメモリ66に保存した際に記憶した日時情報と、現在のプログラムについての保存時の日時情報を比較し、一致すれば編集処理がされておらず、一致しなければ編集処理がされたと判断するようにしている。もちろん、編集処理の有無の判断は、これに限ることはなく、サムチェックや、編集前のプログラム全体を記憶しておきそれと比較するなどの他、各種の方式を採ることができる。   At this time, the component relation diagram editor 64 also has a function of storing and holding date and time information when stored in the work memory 66. In addition, the activated component editor 65 reads out the program (synthesized) stored in the work memory 66 and performs editing processing. When the editing process is completed, the component editor 65 stores the edited program in the work memory 66. The saved edited program is read by the component relation diagram editor 64, and the asset program part to be edited (after editing) is stored in the corresponding component file in the program part database 70 via the component manager 62. And update processing. When the component editor 65 does not perform the editing process, the component relation diagram editor 64 does not perform the update process to the program part database 70 described above. Whether the editing process has been performed is compared with the date / time information stored when the component relation diagram editor 64 saved in the work memory 66 and the date / time information at the time of saving for the current program. If they do not match, it is determined that the editing process has been performed. Of course, the determination of the presence / absence of the editing process is not limited to this, and various methods other than the sum check and storing the entire program before editing and comparing it can be adopted.

コンポーネント・エディタ65は、コンポーネントの編集等を行なうものであり、本実施の形態ではマクロ記述を含んだラダープログラム部品の編集を行うものである。つまり、コンポーネント・エディタ65の一形態として、ラダーエディタ(ラダープログラミングツール)がある。この実施の形態においては、マクロの編集機能と、ラダープログラムの編集機能とを併せ持っている。図16は、起動されたコンポーネント・エディタ(ラダーエディタ)65の操作画面を示している。   The component editor 65 edits components and the like. In this embodiment, the component editor 65 edits ladder program parts including macro descriptions. That is, as one form of the component editor 65, there is a ladder editor (ladder programming tool). This embodiment has both a macro editing function and a ladder program editing function. FIG. 16 shows an operation screen of the activated component editor (ladder editor) 65.

次に、編集機能を説明する。本実施の形態では、コンポーネント関連図エディタ64とコンポーネント・エディタ65との協働により、編集機能を実現している。具体的には、図17,図18に示すフローチャートを実行するものである。   Next, the editing function will be described. In the present embodiment, the editing function is realized by the cooperation of the component relation diagram editor 64 and the component editor 65. Specifically, the flowcharts shown in FIGS. 17 and 18 are executed.

まず、コンポーネント関連図エディタ64は、ポインティングデバイスを操作して指定された(ポインタでクリックされた)コンポーネントを認識し、そのコンポーネントのコンポーネントヘッダをコンポーネント・マネージャ62を介してプログラム部品データベース70より取得する。   First, the component relation diagram editor 64 recognizes a component designated (clicked with a pointer) by operating a pointing device, and acquires a component header of the component from the program parts database 70 via the component manager 62. .

該当コンポーネントの「資産プログラム部品」ファイルが存在するか否かを判断し(S2)、存在する場合には、該当コンポーネント、およびそれに関連する子のコンポーネントのリストを作成する(S3)。このリストの作成は、上述したように、コンポーネントヘッダの関連コンポーネントリストに基づいて作成できる。   It is determined whether or not the “asset program part” file of the relevant component exists (S2), and if it exists, a list of the relevant component and its related child components is created (S3). As described above, this list can be created based on the related component list in the component header.

ついで、上記リストに従い、プログラム部品データベース70より、リストに載った個々の資産プログラム部品のファイルを取り出すとともに(S4)、その取り出した個々の「資産プログラム部品」のファイルを合成し、コンポーネント・エディタ65のラダープログラミングツールが認識できる1つのプログラムファイルとする。(S5)。   Next, in accordance with the above list, the individual asset program part files listed in the list are extracted from the program part database 70 (S4), and the extracted individual “asset program part” files are synthesized to the component editor 65. One program file that can be recognized by the ladder programming tool. (S5).

ユーザが指定したコンポーネント以外、つまり、子のコンポーネントに対応するプログラム部分(ファンクションブロック)は、編集ができないように読み取り専用属性に変更する(S6)。つまり、図14に示すように、資産プログラム部品には、プログラム(マクロ付)とともに、読み取り専用属性フラグと、テスト済みフラグが設定されている。そこで、読み取り専用属性フラグをONにする。   Other than the component designated by the user, that is, the program part (function block) corresponding to the child component is changed to a read-only attribute so that it cannot be edited (S6). That is, as shown in FIG. 14, a read-only attribute flag and a tested flag are set in the asset program part together with the program (with macro). Therefore, the read-only attribute flag is turned ON.

そして、該当プログラムファイルをコンポーネント・エディタ65に渡す。具体的には、処理ステップS5で作成した1つのプログラムファイル(S6の処理で設定した読み取り専用属性フラグON情報とともに)をワークメモリ66に保存する。このとき、保存日時を記憶する。そして、コンポーネント・エディタ65を起動する。また、処理ステップS2の分岐判断がNo、つまり、該当コンポーネントの「資産プログラム部品」ファイルが存在しない場合には、「資産プログラム部品」のファイルを新規作成する(S8)。上述した処理ステップS1からS8までの各処理は、コンポーネント関連図エディタ64が実行する。   Then, the program file is transferred to the component editor 65. Specifically, the one program file created in process step S5 (along with the read-only attribute flag ON information set in the process of S6) is stored in the work memory 66. At this time, the storage date is stored. Then, the component editor 65 is activated. If the branch determination in processing step S2 is No, that is, if the “asset program part” file of the corresponding component does not exist, a new “asset program part” file is created (S8). Each process from the above-described processing steps S1 to S8 is executed by the component relation diagram editor 64.

次に、コンポーネント・エディタ65は、ワークメモリ66に格納された該当プログラムファイルをロードし、該当「資産プログラム部品」の内容(ファンクションブロックのラダープログラム)を表示装置のエディタ画面に表示する(図16参照)。ユーザは、コンポーネント・エディタ65であるラダープログラミングツール(ラダーエディタ)を操作し、表示されたラダー回路に対する編集処理を行ない、その後ユーザによる編集処理を終了する(S10,S11)。すると、編集後のラダープログラムについて、文法が正しいか否かのチェックを行ない(S12)、文法が正しくなるまで編集処理を行なわせる。上述した処理ステップS10からS12までの各処理は、コンポーネント・エディタ65が実行する。   Next, the component editor 65 loads the corresponding program file stored in the work memory 66, and displays the contents of the corresponding “asset program part” (function block ladder program) on the editor screen of the display device (FIG. 16). reference). The user operates a ladder programming tool (ladder editor) that is the component editor 65 to perform editing processing on the displayed ladder circuit, and thereafter ends the editing processing by the user (S10, S11). Then, the edited ladder program is checked whether or not the grammar is correct (S12), and the editing process is performed until the grammar is correct. The component editor 65 executes each processing from the above processing steps S10 to S12.

コンポーネント・エディタ65が終了したならば、プログラム変更の有無を判断する(S13)。本実施の形態では、現在のワークメモリ66に記憶されているプログラムファイルの保存日時と、処理ステップS7で記憶保持した日時情報とを比較し、一致している場合には、プログラム変更がなく、一致していない場合には、プログラム変更があったと判断するようにした。   When the component editor 65 is finished, it is determined whether or not there is a program change (S13). In the present embodiment, the saved date and time of the program file stored in the current work memory 66 is compared with the date and time information stored and held in the processing step S7. If they do not match, it was determined that there was a program change.

プログラム変更があった場合には、そのコンポーネントのテスト済みフラグをOFFにし(S14)、該当プログラムを「資産プログラム部品」としてプログラム部品データベース70に保存する(S15)。つまり、後述する単体テストにより合格し、テスト済みフラグがONになっている場合でも、編集処理によりプログラムの内容が変更された場合には、そのテスト済みフラグは編集前のプログラムについてのものであるため、フラグをOFFにし、不合格状態(ここでは未テスト状態)に戻す。また、これに伴い、プログラム部品データベース70に格納されるテストシナリオのテスト結果の欄は「−」にする。なお、処理ステップS13の分岐判断がNo、つまり、プログラム変更がなかった場合には、そのまま処理を終了する。上述した処理ステップS13からS15までの各処理は、コンポーネント関連図エディタ64が実行する。   If there is a program change, the tested flag of the component is turned OFF (S14), and the corresponding program is saved in the program part database 70 as an “asset program part” (S15). In other words, even if the unit test described later passes and the tested flag is ON, if the contents of the program are changed by editing processing, the tested flag is for the program before editing. , The flag is turned OFF, and the state is returned to the rejected state (here, the untested state). Accordingly, the test result column of the test scenario stored in the program parts database 70 is set to “−”. If the branch determination in process step S13 is No, that is, if there is no program change, the process is terminated as it is. Each process from the above-described process steps S13 to S15 is executed by the component relation diagram editor 64.

図19は、編集禁止手段の機能を示すフローチャートである。図18の処理ステップS10のファンクションブロックの編集処理を行なうべく、ユーザがその編集しようとするファンクションブロックを指定した場合、その指定されたファンクションブロックを認識し(S21)、該当ファンクションのラダー回路を表示する(S22)。そして、その該当ファンクションブロックに関連する読み取り専用属性フラグがONか否かを判断し(S23)、読み取り専用属性がONの場合には、編集モードを解除する(S26)。これにより、ラダー回路を見ることはできるが、編集処理は禁止される。また、読み取り専用属性がOFFの場合には、そのまま編集モードに移行し(S24)、ユーザからの編集命令を待ち、入力された指示に従ってラダー回路の編集(変更)を行なう(S25)。この図19に示すフローチャートに示された機能は、コンポーネント・エディタ65であるラダープログラミングツールが行なう。   FIG. 19 is a flowchart showing the function of the edit prohibition means. When the user designates the function block to be edited in order to perform the function block editing process in the processing step S10 in FIG. 18, the designated function block is recognized (S21), and the ladder circuit of the corresponding function is displayed. (S22). Then, it is determined whether or not the read-only attribute flag related to the corresponding function block is ON (S23). If the read-only attribute is ON, the edit mode is canceled (S26). Thereby, although the ladder circuit can be seen, the editing process is prohibited. If the read-only attribute is OFF, the process shifts directly to the edit mode (S24), waits for an edit command from the user, and edits (changes) the ladder circuit according to the input instruction (S25). The ladder programming tool which is the component editor 65 performs the functions shown in the flowchart shown in FIG.

次に、単体テスト機能について説明する。図20は、一部のコンポーネントに対して単体テストを実行した後のコンポーネント関連図エディタ63により表示されるコンポーネント関連図を示している。図20に示すように、単体テスト機能を実行し、テスト済み(合格)のコンポーネントにはテスト済みマークMを付けたり、表示する色を変えたりしている(図では、両方行なっている)。このように表示形態を変えることで、「単体テストを実行していない」か或いは「単体テストを実行したがNG」のコンポーネントと、単体テストが完了(OK)」して完成されたコンポーネントとを、一目で識別することができる。   Next, the unit test function will be described. FIG. 20 shows a component relation diagram displayed by the component relation diagram editor 63 after a unit test is executed on some components. As shown in FIG. 20, the unit test function is executed, and a tested mark M is attached to a tested (passed) component or the display color is changed (both are performed in the figure). By changing the display form in this way, it is possible to see at a glance the component that “unit test is not executed” or “unit test is executed but NG” and the component that is completed after unit test is completed (OK). Can be identified.

そして、係る単体テスト機能は、本実施の形態では、コンポーネント関連図エディタ64と単体テストツール71と、PLCシミュレータ72との協働により実現している。具体的には、図21に示すフローチャートを実行するものである。   In this embodiment, the unit test function is realized by the cooperation of the component relation diagram editor 64, the unit test tool 71, and the PLC simulator 72. Specifically, the flowchart shown in FIG. 21 is executed.

ユーザがポインティングデバイスを操作してコンポーネントを指定すると共に、入力メニューリストML中の「単体テスト」が選択された場合、コンポーネント関連図エディタ64は、指定されたコンポーネントを認識し、そのコンポーネントのコンポーネントヘッダをコンポーネント・マネージャ62を介してプログラム部品データベース70より取得する(S31)。次いで、該当コンポーネントの「資産プログラム部品」ファイルが存在するか否かを判断し(S32)、存在しない場合には、エラー表示をして(S37),処理を終了する。   When the user operates the pointing device to specify a component and “unit test” in the input menu list ML is selected, the component relation diagram editor 64 recognizes the specified component and displays the component header of the component. Obtained from the program parts database 70 via the component manager 62 (S31). Next, it is determined whether or not the “asset program part” file of the corresponding component exists (S32). If it does not exist, an error is displayed (S37), and the process is terminated.

一方、存在する場合には、特性選択データを(ユーザに選択要求し)、プログラム部品データベース70より取り出す(S33)。すなわち、本実施の形態では、単体テストをする特定アプリケーション用プログラム部品を生成するためのマクロへの入力パラメータ(特性選択データ)をマニュアルで指定するようにしている。これは、例えば、上述した編集処理機能により編集したプログラムが正常に動作するか否かをチェックしたいことが多々ある。特に、マクロに対応する一部のラダー回路を編集した場合、その編集したラダー回路に関連する特性選択データを優先的にテストしたいということがある。そこで、係る要求を満たすために、ユーザが単体テストを実行したいコンポーネントを指定させるとともに、特性選択データを指定させるようにした。もちろん、プログラム部品データベース70に格納された特性選択データを順次抽出するように自動実行するようにしても良い。   On the other hand, if it exists, the characteristic selection data (requests the user to select) is taken out from the program parts database 70 (S33). That is, in this embodiment, input parameters (characteristic selection data) to a macro for generating a program component for a specific application for unit testing are manually specified. For example, there are many cases where it is desired to check whether or not a program edited by the editing processing function described above operates normally. In particular, when some ladder circuits corresponding to a macro are edited, it may be desired to preferentially test characteristic selection data related to the edited ladder circuit. Therefore, in order to satisfy such a requirement, the user specifies the component for which the unit test is to be executed and also specifies the characteristic selection data. Of course, the characteristic selection data stored in the program parts database 70 may be automatically executed so as to be sequentially extracted.

次いで、ユーザに指定された特性選択データに対応する「特定アプリケーション用プログラム部品」を生成する(S34)。この処理ステップ34の具体的な処理手順は、図22に示すフローチャートを実行する。すなわち、まず該当コンポーネント、およびそれに関連する子のコンポーネントのリストを作成する(S41)。係る処理は、編集処理における処理ステップS3と同様である。そして、上記リストに従い、「プログラム部品データベース70」より、個々の「資産プログラム部品」のファイルを取り出す(S42)。係る処理は、編集処理における処理ステップS4と同様である。   Next, a “specific application program part” corresponding to the characteristic selection data designated by the user is generated (S34). The specific processing procedure of this processing step 34 executes the flowchart shown in FIG. That is, first, a list of the corresponding component and its related child components is created (S41). Such processing is the same as the processing step S3 in the editing processing. Then, in accordance with the above list, each “asset program part” file is extracted from the “program part database 70” (S42). Such processing is the same as the processing step S4 in the editing processing.

その後、指定された該当特性選択データ(マクロへの入力パラメータ)を用いてマクロ・プロセッサ63にてマクロ処理を行い、「資産プログラム部品」を「特定アプリケーション用プログラム部品」に変換する(S43)。ここで、該当特性選択データは、指定されたコンポーネントはもちろんのこと、子のコンポーネントが存在する場合には、その子のコンポーネントについての特性選択データも含まれる。換言すると、S33におけるユーザの選択に伴い取り出された特性選択データは、子のコンポーネントについても指定され、取り出される。そして、個々の「特定アプリケーション用プログラム部品73」のファイルを合成し、1つのプログラムファイルとする(S44)。   Thereafter, macro processing is performed by the macro processor 63 using the designated characteristic selection data (input parameters to the macro) to convert “asset program parts” into “specific application program parts” (S43). Here, the corresponding characteristic selection data includes not only the specified component but also the characteristic selection data for the child component when there is a child component. In other words, the characteristic selection data extracted in accordance with the selection by the user in S33 is also specified for the child component and extracted. Then, the files of the individual “specific application program parts 73” are combined into one program file (S44).

このようにして特定アプリケーション用プログラム部品が生成される。つまり、子のコンポーネントが存在しない場合には、特定アプリケーション用プログラム部品は元々指定された1つのコンポーネントから生成された1つの特定のアプリケーション用プログラム部品からなるプログラムファイルで構成されるが、子のコンポーネントが存在する場合には、各コンポーネントに基づく特定アプリケーション用プログラム部品を合成し、1つのプログラムファイルを生成する。   In this way, the program component for the specific application is generated. That is, when there is no child component, the specific application program part is composed of a program file composed of one specific application program part generated from the originally specified one component. If there exists a program component for a specific application based on each component, one program file is generated.

次に、コンポーネント関連図エディタ64は、コンポーネント・マネージャ62を介して、処理ステップ34を実行して生成された「特定アプリケーション用プログラム部品」に対応したテストシナリオを、プログラム部品データベース70から取り出す(S35)。この処理ステップ35の具体的な処理手順は、図23に示すフローチャートを実行する。すなわち、まず、コンポーネント関連図エディタ64は、コンポーネント・マネージャ62を介してプログラム部品データベース70に格納された該当コンポーネントヘッダより、テストシナリオリストを取得する。つまり、子のコンポーネントが存在する場合には、その子のコンポーネントに対するテストシナリオも取得する。そして、取得したテストシナリオリストから、該当特性選択データと適合するテストシナリオを抽出する(S52)。すなわち、図13(b)に示すように、コンポーネントヘッダのテストシナリオリスト名の欄には、適合特性選択データ名が記述されているため、指定された特性選択データと一致するテストシナリオファイル名をすべて抽出し、取得することができる。   Next, the component relation diagram editor 64 retrieves, from the program part database 70, the test scenario corresponding to the “program part for specific application” generated by executing the processing step 34 via the component manager 62 (S35). ). The specific processing procedure of this processing step 35 executes the flowchart shown in FIG. That is, first, the component relation diagram editor 64 acquires a test scenario list from the corresponding component header stored in the program parts database 70 via the component manager 62. That is, when a child component exists, a test scenario for the child component is also acquired. Then, a test scenario that matches the characteristic selection data is extracted from the acquired test scenario list (S52). That is, as shown in FIG. 13B, the test scenario list name column of the component header describes the compatible characteristic selection data name, so that the test scenario file name that matches the specified characteristic selection data is displayed. All can be extracted and acquired.

コンポーネント関連図エディタ64は、抽出した「指定された特性選択データと一致するテストシナリオファイル名」を候補テストシナリオとして表示画面に表示し、ユーザに対して今回実行するテストシナリオの選択を促す(S53)。そして、ユーザが選択したならば、その選択されたテストシナリオ名に対応するテストシナリオのファイルを取得する(S54)。   The component relation diagram editor 64 displays the extracted “test scenario file name matching the specified characteristic selection data” on the display screen as a candidate test scenario, and prompts the user to select a test scenario to be executed this time (S53). ). If the user selects it, a test scenario file corresponding to the selected test scenario name is acquired (S54).

コンポーネント関連図エディタ64は、上記の処理ステップS34,S35を実行して取得した該当するプログラムファイルとテストシナリオを単体ツールに渡す(S36)。そして、単体ツールは、取得したプログラムファイルとテストシナリオに基づいてテストを実行する(S38)。係るテストの具体的な処理手順は、図24に示すフローチャートを実行する。すなわち、まず、単体テストツール71は、該当プログラムファイルをPLCシミュレータ72にダウンロードし(S61)、PLCシミュレータ72の実行を開始する(S62)。次いで、単体テストツール71は、テストシナリオを順番に実行する(S63)。シナリオが終了したか否かを判断し(S64)、終了していない場合には、シナリオに従い入力を変更する(S65)。この入力の変更に伴い、PLCシミュレータ72は、演算実行して出力をするので、単体ツール71は、その出力を記録し、シナリオの想定結果と比較する(S66)。そして、比較した結果、出力が想定内か否か、つまり、想定結果と一致するか否かを判断し(S67)、想定内の場合には、処理ステップS63に戻り、次のシナリオの実行をする。   The component relation diagram editor 64 passes the corresponding program file and test scenario acquired by executing the above processing steps S34 and S35 to the single tool (S36). Then, the single tool executes a test based on the acquired program file and the test scenario (S38). The specific processing procedure of such a test executes the flowchart shown in FIG. That is, first, the unit test tool 71 downloads the corresponding program file to the PLC simulator 72 (S61), and starts the execution of the PLC simulator 72 (S62). Next, the unit test tool 71 sequentially executes the test scenarios (S63). It is determined whether or not the scenario has ended (S64). If it has not ended, the input is changed according to the scenario (S65). As the input is changed, the PLC simulator 72 executes the calculation and outputs it, so that the single tool 71 records the output and compares it with the assumed scenario result (S66). Then, as a result of the comparison, it is determined whether or not the output is within the assumption, that is, whether or not the output matches the assumption result (S67). If within the assumption, the process returns to processing step S63 to execute the next scenario. To do.

処理ステップ67の分岐判断でNo、つまり、PLCシミュレータ72が求めた出力と、想定結果とが一致しなかった場合には、このテストシナリオについてのテスト結果をNGとする(S68)。また、処理ステップ64の分岐判断でYesとなった場合には、シナリオを最後まで実行して全ての出力の結果が想定結果と一致したことを意味するので、このテストシナリオについてのテスト結果をOKとする(S69)。   If the branch determination in process step 67 is No, that is, if the output obtained by the PLC simulator 72 does not match the expected result, the test result for this test scenario is set to NG (S68). In addition, if the branch determination at processing step 64 results in Yes, it means that the scenario has been executed to the end and the results of all outputs have coincided with the expected results, so the test results for this test scenario are OK. (S69).

このようにして指定された特性選択データに基づく特定アプリケーション用プログラム部品についての、選択されたテストシナリオを用いた単体テストツールでのテストが終了すると、テスト結果をテストシナリオリスト内の該当テストシナリオの結果に反映する(S39)。すなわち、単体テストツール71は、コンポーネント関連図エディタ64から渡された該当プログラムファイルとテストシナリオに基づくテストが終了したならば、そのテスト結果をコンポーネント関連図エディタ64に渡すため、コンポーネント関連図エディタ64は、受け取ったテスト結果(OK/NG)を、該当するコンポーネントヘッダのテストシナリオリスト名のテスト結果の欄に格納する。   When the test with the unit test tool using the selected test scenario for the specific application program part based on the characteristic selection data specified in this way is completed, the test result is the result of the corresponding test scenario in the test scenario list. (S39). That is, when the unit test tool 71 completes the test based on the corresponding program file and the test scenario passed from the component relation diagram editor 64, the unit test tool 71 passes the test result to the component relation diagram editor 64. The received test result (OK / NG) is stored in the test result column of the test scenario list name of the corresponding component header.

コンポーネント関連図エディタ64は、全てのテストシナリオのテスト結果がOKのコンポーネントには、図20に示すようにテスト済みマークMを付けたり、色を変える(S40)。これにより、コンポーネント関連図を見るだけで、テストが完了(全てのテストシナリオのテスト結果がOK:合格)していないコンポーネントを一目で見つけることができる。よって、使用者は、編集処理或いは単体テストをすべきコンポーネントを見つけ、必要な処理をスムーズに実行できる。なお、テストに合格したコンポーネントは、本来プログラムが完成しており、修正する必要はないが、編集機能により編集をすることはできる。係る場合には、図18の処理ステップS14の実行により、テスト済みフラグがOFFとなるため、全てのテストシナリオのテスト結果がOKの条件を満たさなくなるので、コンポーネント関連図エディタ64は、テスト済みマークMを消去したり、色を元の状態に戻す処理を行なうことになる。   The component relation diagram editor 64 adds a tested mark M as shown in FIG. 20 or changes the color to components whose test results of all test scenarios are OK (S40). As a result, it is possible to find at a glance a component that has not been tested (the test results of all test scenarios are OK) by simply looking at the component relation diagram. Therefore, the user can find a component to be edited or unit tested, and can smoothly execute the necessary processing. The components that have passed the test are originally completed in the program and do not need to be corrected, but can be edited using the editing function. In such a case, the execution of the processing step S14 in FIG. 18 turns off the tested flag, so the test results of all test scenarios do not satisfy the OK condition. A process of deleting M or returning the color to the original state is performed.

これにより、たとえ一度単体テストに合格したコンポーネントであっても、その後に編集処理をした場合は、その編集によって書き換えられたラダー回路が正常に動作する保証がないため、一旦不合格状態に戻すことになる。よって、ユーザは再度単体テストを実行し、編集後のコンポーネントもテストが合格するか否かの判断を行なうことができる。   As a result, even if the component has passed the unit test once, if the editing process is performed after that, there is no guarantee that the ladder circuit rewritten by the editing will operate normally. Become. Therefore, the user can execute the unit test again and determine whether or not the edited component passes the test.

なお、上述した実施の形態では、合格したコンポーネントに合格したことがわかる表示形態(マーク付与や色替え)とし、合格していないも(不合格と未テスト)は基本の表示形態のままとしたが、合格していないものについては、不合格と未テストをさらに識別可能に異なる表示形態をとるようにしても良い。   In the above-described embodiment, the display form (marking or color change) that indicates that the component that has passed has been passed is used, and those that have not passed (failed and untested) remain in the basic display form. However, for those that have not passed, different display forms may be adopted so as to further distinguish between failed and untested.

合格した特定アプリケーション用プログラム部品は、特定のPLCに格納されて、そのPLCは特定アプリケーション用プログラム部品(ラダープログラム)をサイクリックに実行し、検査装置の一部である特定アプリケーションを制御する。また、合格した複数の特定アプリケーション用プログラム部品をもとに、それらを合成したプログラムを作成し、必要なデストをする。その後、その合成プログラムをPLCに格納し、そのPLCが合成プログラムをサイクリックに実行し、検査装置全体を任意に制御する。   The passed specific application program part is stored in a specific PLC, and the PLC cyclically executes the specific application program part (ladder program) to control a specific application which is a part of the inspection apparatus. In addition, based on a plurality of program parts for specific applications that have passed, a program is created by synthesizing them, and the necessary destination is made. Thereafter, the synthesis program is stored in the PLC, and the PLC executes the synthesis program cyclically to arbitrarily control the entire inspection apparatus.

製品の共通性と差異性との分析を説明する図である。It is a figure explaining the analysis of the commonality and difference of a product. アプリケーションの一形態である検査装置の構造を示す図である。It is a figure which shows the structure of the test | inspection apparatus which is one form of an application. 検査装置における特性のバリエーションを表形式で示した図である。It is the figure which showed the variation of the characteristic in an inspection apparatus with a table form. コンポーネントの全体構成図である。It is a whole block diagram of a component. オプションコンポーネントを説明する図である。It is a figure explaining an option component. 代替コンポーネントを説明する図である。It is a figure explaining an alternative component. オプションコンポーネントを記述するファンクションブロックの一例を示す図である。It is a figure which shows an example of the function block which describes an option component. 代替コンポーネントを記述するファンクションブロックの一例を示す図である。It is a figure which shows an example of the function block which describes an alternative component. 特性モデルの全体図である。It is a whole figure of a characteristic model. 特性モデルにおいて、オプションコンポーネントと代替コンポーネントの選択状態を示す図である。It is a figure which shows the selection state of an option component and an alternative component in a characteristic model. 本発明の一実施の形態を示す図である。It is a figure which shows one embodiment of this invention. プログラム部品データベースに格納される情報の一例を示す図である。It is a figure which shows an example of the information stored in a program components database. コンポーネントヘッダのデータ構造の一例を示す図である。It is a figure which shows an example of the data structure of a component header. マクロ処理の作用・原理を説明する図である。It is a figure explaining the effect | action and principle of a macro process. コンポーネント関連図エディタにおける表示画面の一例を示す図である。It is a figure which shows an example of the display screen in a component related figure editor. コンポーネント・エディタの操作画面の一例を示す図である。It is a figure which shows an example of the operation screen of a component editor. 編集機能の一例を示すフローチャートの一部である。It is a part of flowchart which shows an example of an edit function. 編集機能の一例を示すフローチャートの一部である。It is a part of flowchart which shows an example of an edit function. 編集禁止処理の機能を説明するフローチャートである。It is a flowchart explaining the function of an edit prohibition process. テスト結果を反映させた表示形態の一例を示すコンポーネント関連図である。It is a component related figure which shows an example of the display form in which the test result was reflected. 単体テストの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of a unit test. 図21のS34の具体的な処理手順を示すフローチャートである。It is a flowchart which shows the specific process sequence of S34 of FIG. 図21のS35の具体的な処理手順を示すフローチャートである。It is a flowchart which shows the specific process sequence of S35 of FIG. 図21のS38の具体的な処理手順を示すフローチャートである。It is a flowchart which shows the specific process sequence of S38 of FIG.

符号の説明Explanation of symbols

50 ドメイン支援分析ツール
51 特性モデルエディタ
52 製品の特性情報
60 プログラム部品管理ソフトウェア
60 プログラム管理ツール
61 プロダクト・パラメータ・マネージャ
62 コンポーネント・マネージャ
63 マクロ・プロセッサ
64 コンポーネント・エディタ
65 コンポーネント・エディタ
66 ワークメモリ
67 マクロへの入力パラメータ(特性選択データ)
68 資産プログラム部品(マクロ記述済み)
70 プログラム部品データベース
71 単体テストツール
72 PLCシミュレータ
73 特定アプリケーション用プログラム部品
50 Domain support analysis tool 51 Characteristic model editor 52 Product characteristic information 60 Program parts management software 60 Program management tool 61 Product parameter manager 62 Component manager 63 Macro processor 64 Component editor 65 Component editor 66 Work memory 67 Macro Input parameters (characteristic selection data)
68 Asset program parts (macro description completed)
70 Program Parts Database 71 Unit Test Tool 72 PLC Simulator 73 Program Parts for Specific Applications

Claims (8)

機器制御プログラムを構成するための汎用性のある複数の資産プログラム部品と、その資産プログラム部品に基づいて生成される特定のアプリケーション用プログラム部品への入力条件および期待出力を時系列に記載したテストシナリオと、を関連づけて記憶するプログラム部品記憶手段と、
前記資産プログラム部品の接続関係を示す関連図を表示装置に表示し、処理対象の資産プログラム部品並びに処理内容を選択させる選択手段と、
前記資産プログラム部品を編集する編集手段と、
前記特定のアプリケーション用プログラム部品がダウンロードされたシミュレータに対し、前記テストシナリオに従って入力条件を与えると共に、そのシミュレータの実行結果と前記期待出力とを比較するテスト手段と、
を備え、
前記資産プログラム部品は、あらかじめ予期されている変化点が存在する場合に、その変化点をマクロ記述として含むプログラム部品であり、
前記マクロ記述を含む資産プログラム部品に対応する前記特定のアプリケーション用プログラム部品は、マクロ処理を実行して生成され、
前記関連図上の資産プログラム部品の表示態様を、前記テスト手段による比較結果を反映させるように構成した、
ことを特徴とするプログラム部品管理装置。
A test scenario that describes multiple asset program parts for configuring a device control program, and the input conditions and expected output to a specific application program part generated based on the asset program parts in time series And a program component storage means for storing
A selection means for displaying a related diagram showing a connection relation of the asset program parts on a display device, and selecting an asset program part to be processed and a processing content;
Editing means for editing the asset program part;
Test means for giving an input condition according to the test scenario to the simulator in which the specific application program part is downloaded, and comparing the execution result of the simulator with the expected output;
With
The asset program part is a program part including a change point as a macro description when a change point expected in advance exists.
The specific application program component corresponding to the asset program component including the macro description is generated by executing macro processing,
The display mode of the asset program parts on the related diagram is configured to reflect the comparison result by the test means,
A program component management apparatus characterized by the above.
前記選択手段により選択された資産プログラム部品に、子の資産プログラム部品が存在するか否かを判断し、前記子の資産プログラム部品が存在する場合には、前記資産プログラム部品と前記子の資産プログラム部品とを合成して1つのプログラムを生成するプログラム合成手段を有し、
前記編集手段は、前記プログラム合成手段により合成されたプログラムに対して編集処理を行なうようにしたことを特徴とする請求項1に記載のプログラム部品管理装置。
It is determined whether or not there is a child asset program part in the asset program part selected by the selection means, and when the child asset program part exists, the asset program part and the child asset program Having a program synthesis means for synthesizing parts and generating one program;
2. The program component management apparatus according to claim 1, wherein the editing unit performs an editing process on the program synthesized by the program synthesizing unit.
前記子の資産プログラム部品に対しては、プログラムの内容の表示を許可するが、前記編集手段による編集を禁止するよう設定する禁止手段を備えたことを特徴とする請求項2に記載のプログラム部品管理装置。 3. The program component according to claim 2, further comprising a prohibition unit configured to permit display of the contents of the program for the child asset program component, but to prohibit editing by the editing unit. Management device. 前記選択手段により選択された資産プログラム部品に、子の資産プログラム部品が存在するか否かを判断し、前記子の資産プログラム部品が存在する場合には、前記資産プログラム部品に対応する前記特定のアプリケーション用プログラム部品と、前記子の資産プログラム部品に対応する前記特定のアプリケーション用プログラム部品とを合成して1つのプログラムを生成するプログラム合成手段を有し、
前記シミュレータにダウンロードされ実行される前記特定のアプリケーション用プログラム部品は、前記プログラム合成手段で生成されたプログラムとすることを特徴とする請求得1から3のいずれか1項に記載のプログラム管理装置。
It is determined whether or not there is a child asset program part in the asset program part selected by the selection means, and when the child asset program part is present, the specific program corresponding to the asset program part is determined. Program synthesis means for synthesizing the application program component and the specific application program component corresponding to the child asset program component to generate one program,
4. The program management apparatus according to claim 1, wherein the specific application program component downloaded and executed by the simulator is a program generated by the program synthesis unit. 5.
前記テスト手段による比較結果を反映は、テストシナリオを実行して合格したものと、合格していないものを識別可能にするものであることを特徴とする請求項1から4のいずれか1項に記載のプログラム管理装置。 The reflection result of the comparison by the test means is to enable identification of a test that has passed a test scenario and a test that has not passed, according to any one of claims 1 to 4. The program management apparatus described. 前記合格したものの表示態様で表示された資産プログラム部品を前記編集手段で編集処理したか否かを判断し、編集処理された場合には表示態様を合格していない状態に変更する手段を備えたことを特徴とする請求項5に記載のプログラム管理装置。 It has been determined whether or not the asset program part displayed in the display mode of the passed thing has been edited by the editing means, and when edited, the means for changing the display mode to a state that has not passed The program management apparatus according to claim 5, wherein: 資産プログラム部品について準備したテストシナリオすべてが合格となった場合に、その資産プログラム部品を合格したものとすることを特徴とする請求項5又は6に記載のプログラム管理装置。 The program management apparatus according to claim 5 or 6, wherein when all the test scenarios prepared for the asset program parts are passed, the asset program parts are passed. 前記資産プログラム部品は、ラダープログラムにより構成され、
前記変化点は、当該ラダープログラムの接点や回路を組み替えることを目的としたマクロ処理言語でマクロ記述されたものであることを特徴とする請求項1から7のいずれか1項に記載のプログラム管理装置。
The asset program part is configured by a ladder program,
The program management according to any one of claims 1 to 7, wherein the change point is a macro description in a macro processing language intended to rearrange contacts and circuits of the ladder program. apparatus.
JP2005322670A 2005-11-07 2005-11-07 Program management device Active JP4488231B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005322670A JP4488231B2 (en) 2005-11-07 2005-11-07 Program management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005322670A JP4488231B2 (en) 2005-11-07 2005-11-07 Program management device

Publications (2)

Publication Number Publication Date
JP2007128456A true JP2007128456A (en) 2007-05-24
JP4488231B2 JP4488231B2 (en) 2010-06-23

Family

ID=38151030

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005322670A Active JP4488231B2 (en) 2005-11-07 2005-11-07 Program management device

Country Status (1)

Country Link
JP (1) JP4488231B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11188048B2 (en) 2018-10-23 2021-11-30 Keyence Corporation Programmable logic controller and main unit
JP7391269B1 (en) 2022-12-14 2023-12-04 三菱電機株式会社 FA control program generation support program, FA control program generation support device, FA control program generation support method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11188048B2 (en) 2018-10-23 2021-11-30 Keyence Corporation Programmable logic controller and main unit
JP7391269B1 (en) 2022-12-14 2023-12-04 三菱電機株式会社 FA control program generation support program, FA control program generation support device, FA control program generation support method

Also Published As

Publication number Publication date
JP4488231B2 (en) 2010-06-23

Similar Documents

Publication Publication Date Title
US6961873B2 (en) Environment based data driven automated test engine for GUI applications
CN109840206B (en) Data testing method, device, terminal and storage medium
US6948152B2 (en) Data structures for use with environment based data driven automated test engine for GUI applications
KR100744886B1 (en) Asadal : system for providing feature-oriented software product line engineering environment
US7526498B2 (en) Method for generating data structures for automatically testing GUI applications
US20060089728A1 (en) Sequence program editing apparatus
US20050281453A1 (en) Computer aided quality assurance software system
JP5039428B2 (en) Programmable controller and PLC system
JP7455501B2 (en) Dynamic modification of manufacturing plans according to manufacturing deviations
US20130144409A1 (en) Control program generation device, control program generation program, and control program generation method
KR20080048454A (en) Building finite state machine model
JP2009169828A (en) Test case creation device and creation program
US20050033457A1 (en) Simulation aid tools and ladder program verification systems
JP4488231B2 (en) Program management device
JP4379687B2 (en) Simulation support tool and ladder program verification system and program product
KR20190094779A (en) Automatically Generate Device for PLC Instruction Compiler Test-Case
JP4609655B2 (en) Attached data generator for program parts
EP3734379A1 (en) Method and system for generating control programs in a cloud computing environment
JP6794668B2 (en) Programming device
JP4767309B2 (en) Information processing apparatus, information processing method, and computer program
KR20070049126A (en) Asadal : system for providing feature-oriented software product line engineering environment
JP2007102359A (en) Macro program materializing high function component conversion of ladder program
JP6097231B2 (en) Program generating apparatus and method
KR101767723B1 (en) Method for verifying plc instruction using ld program
JP2000215038A (en) Information management device and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080313

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091209

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100208

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: 20100310

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130409

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100323

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130409

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140409

Year of fee payment: 4