JP2007102380A - Debugging method for control component having variability and debugging support device - Google Patents

Debugging method for control component having variability and debugging support device Download PDF

Info

Publication number
JP2007102380A
JP2007102380A JP2005289245A JP2005289245A JP2007102380A JP 2007102380 A JP2007102380 A JP 2007102380A JP 2005289245 A JP2005289245 A JP 2005289245A JP 2005289245 A JP2005289245 A JP 2005289245A JP 2007102380 A JP2007102380 A JP 2007102380A
Authority
JP
Japan
Prior art keywords
macro
program
program part
specific application
debugging
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
JP2005289245A
Other languages
Japanese (ja)
Other versions
JP4488227B2 (en
Inventor
Shigeru Hitomi
繁 人見
Tetsuo Kagawa
徹雄 香川
Hiroshi Yoshida
寛 吉田
Yukihiro Kawakami
幸浩 川上
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 JP2005289245A priority Critical patent/JP4488227B2/en
Publication of JP2007102380A publication Critical patent/JP2007102380A/en
Application granted granted Critical
Publication of JP4488227B2 publication Critical patent/JP4488227B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To achieve the improvement of the debugging efficiency of program components including macro description by providing an environment for achieving the efficiency of the unit test operation of ladder program components including macro. <P>SOLUTION: This debug method comprises a means for describing macro in program components; a macro processing means for executing macro processing in the program components including macro, and for deforming the program components; a debug processing means for executing debug processing for the deformed program components; a means for describing the correction places and correction content of correction performed by the debug processing in specific application exclusive program components as comments; a macro inverse transformation processing means for executing macro inverse transformation by referring to comments added to the specific application exclusive program components; and a means for storing the program components including the macro description obtained by the macro inverse transformation processing in a program component database in which program components are stored. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、ラダー言語によって記述された機器制御プログラムの部品化並びに再利用化に関する発明である。   The present invention relates to componentization and reuse of a device control program described in a ladder language.

ラダープログラムの部品化・再利用化については、一般的に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. It is also known to simplify a program displayed in a graphic form by replacing complex processes appearing at a plurality of locations on the program with simple macro operation component graphics (see Patent Document 1).

しかしながら、ラダープログラムが用いられる機器制御システムの分野では、製品ラインナップを充実させてユーザのニーズに対応できるように、大部分は同一であるが部分的に差異のあるシステムを多数開発しているケースが多い。近年、製品ラインアップの共通性と差異性とを分析し、効果的なソフトウェア資産の形成を目指す『プロダクトライン・ソフトウェア・エンジニアリング(以下、PLSEと省略)』と呼ばれる手法が提唱されつつあり、機器制御システムの分野へも適用が試みられている。   However, 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. In recent years, a method called “Product Line Software Engineering” (hereinafter abbreviated as PLSE) is being proposed to analyze the commonality and difference of product lineups and to create effective software assets. Application has also been attempted in the field of control systems.

ラダープログラムは、全回路をサイクリックスキャンすることによって動作するという特徴から、プログラムの規模の増大がそのまま実行時間性能の低下つながる性質がある。そのため実行性能の観点から利用するラダープログラム部品は、極力使用されるアプリケーションに不要な回路を含まないことが望まれる。   Since the ladder program operates by performing a cyclic scan of the entire circuit, there is a property that an increase in the scale of the program leads to a decrease in the execution time performance as it is. Therefore, it is desirable that the ladder program component used from the viewpoint of execution performance does not include a circuit unnecessary for an application to be used as much as possible.

しかしながら、複数のアプリケーションにおいて再利用できる汎用性のあるプログラム部品を作成するには、プログラム部品の内部構成や振る舞いにある程度のバリエーションを持たせ、オプション設定などにより内部構成や振る舞いを少し変更させることができる必要が生じる。たとえば火災検出アルゴリズムのプログラム部品を考える場合、火災検出用のセンサの数や種類、自己診断機能の有無などの、アルゴリズムそのものは同一であっても、使用する具体的なアプリケーションにより複数のバリエーションやオプションを含むことが多い。このようなオプション選択も入力値としてプログラム部品を記述することで汎用性をもったプログラム部品を実装することはできる。しかしながらこの場合、あるシステムの実現には不要なラダー回路が部品中に存在することになりプログラムの実行性能が無為に低下する。このため実行性能の制約に厳しい分野では、汎用性のあるプログラム部品を構成することが困難となっている。   However, in order to create a versatile program part that can be reused in multiple applications, it is necessary to have some variation in the internal structure and behavior of the program part, and to slightly change the internal structure and behavior by setting options, etc. It needs to be possible. 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, and the execution performance of the program is reduced unnecessarily. For this reason, it is difficult to construct a versatile program component in a field where execution performance is severely restricted.

ラダープログラミングにおいてファンクション・ブロックの概念は、後に詳細に説明するが、プログラムの階層的な設計を実現している。しかしJava(登録商標)やC++などのオブジェクト指向高級言語がプログラム実行時に動的に子インスタンスを構成できるのと異なり、ファンクション・ブロックでは子インスタンスを静的に親ファンクション・ブロック中に記述する。このため中間階層のプログラムを部品化することが困難であり、結果的に大部分は同じだが一部だけが異なる多くのプログラム部品を作成しなければならないという問題が生じる。   In ladder programming, the concept of function blocks will be described in detail later, and a hierarchical design of the program is realized. However, unlike object-oriented high-level languages such as Java (registered trademark) and C ++, which can dynamically configure child instances at the time of program execution, child blocks are statically described in the parent function block in the function block. For this reason, it is difficult to make a program of an intermediate layer into parts, and as a result, there arises a problem that many program parts that are mostly the same but different in part must be created.

そのような場合を以下に、図25にて示される例を参照して説明する。図25には、ラダープログラミングにおけるファンクションブロックによるプログラムの階層的な設計の一例が示されている。図25(a)にて示されるように、縮みきった状態と伸びきった状態を判定するセンサを持つエアシリンダ100を制御するプログラム部品を一例として考える。このエアシリンダ100には、筒状のシリンダ部101と、このシリンダ部101に挿入され、前後に伸縮可能なアーム部102によって概略構成される。このようなエアシリンダには、その伸びきり状態や縮みきり状態を検出するためのセンサが用いられ、例えば、センサとして光センサがついているものもあれば、同じ入出力をもつ磁気センサを持つものも考えられる。   Such a case will be described below with reference to the example shown in FIG. FIG. 25 shows an example of a hierarchical design of a program using function blocks in ladder programming. As shown in FIG. 25A, a program part for controlling the air cylinder 100 having a sensor for determining a contracted state and a fully extended state is considered as an example. The air cylinder 100 is generally configured by a cylindrical cylinder portion 101 and an arm portion 102 that is inserted into the cylinder portion 101 and can be extended and contracted forward and backward. Such an air cylinder uses a sensor for detecting the fully extended state or the fully contracted state. For example, some of the air cylinders have an optical sensor, and some have a magnetic sensor having the same input / output. Is also possible.

しかし、図25(b)にて示されるように、ロボットアームの制御プログラム111には、エアシリンダの制御を行うプログラム112が組み込まれており、さらに、そのエアシリンダを制御するプログラム112に、磁気センサの制御プログラム113が組み込まれており、階層的な構造を有している。このようなエアシリンダにおいては、センサの種類にかかわらずエアシリンダ制御部の挙動は同一であるのだが、磁気センサを制御するプログラムがエアシリンダの制御プログラムに、そしてロボットアームの制御プログラムに組み込まれているため、センサとして光センサを用いるような場合においては、センサの制御プログラムのみを取り替えるということができない。従って、このような場合、ファンクション・ブロックでは使用するセンサの種類の組み合わせの数だけ『エアシリンダ』部品を作成しなければならない。   However, as shown in FIG. 25B, the robot arm control program 111 includes a program 112 for controlling the air cylinder, and the program 112 for controlling the air cylinder includes a magnetic program. A sensor control program 113 is incorporated and has a hierarchical structure. In such an air cylinder, the behavior of the air cylinder control unit is the same regardless of the type of sensor, but the program for controlling the magnetic sensor is incorporated into the control program for the air cylinder and the control program for the robot arm. Therefore, in the case where an optical sensor is used as the sensor, it is not possible to replace only the sensor control program. Therefore, in such a case, in the function block, “air cylinder” parts must be created for the number of combinations of sensor types to be used.

例えば、C言語ではマクロ処理によってソースコードを変形させることにより、C言語の言語仕様の範囲では実現できない高度な部品化を行う試みが既になされている。しかし当然ながら、C言語に特化したマクロであり、本発明が対象とするラダープログラミングの分野にはそのまま適用することはできない。   For example, in the C language, an attempt has been made to make a high-level component that cannot be realized within the scope of the C language specification by modifying the source code by macro processing. However, as a matter of course, it is a macro specialized for the C language, and cannot be applied as it is to the field of ladder programming targeted by the present invention.

そして、本含発明の発明者は、性能的なオーバーヘッドを生じさせることなく汎用性の高いラダープログラムの部品化を実現する手段の一つとして、部品のバリアビリティーポイント(変化点)を定義して、予めラダープログラムにマクロとして組み込み、与える具体的なパラメータセットを変更することによってマクロ処理により変形した部品を生成する手法を考案した。
特開平6−230804号公報
The inventor of the present invention defines a part variable point (change point) as one of means for realizing a part of a highly versatile ladder program without causing a performance overhead. A method has been devised in which a part deformed by macro processing is generated by changing a specific parameter set that is embedded in a ladder program in advance as a macro.
JP-A-6-230804

しかしながら、マクロを含むラダープログラムはマクロ処理(最終的な部品として確定した状態)した後でないと実行できないので、原始プログラム(資産部品)とテストやデバッグ対象のプログラムが異なる。このことは、マクロ記述を施した原始プログラムには、変化点を組み込んでいることから不要な回路も入っており、そこに具体的なパラメータを入力してマクロ処理を実行することによりテストやデバッグ処理を行う最終部品として完成するためである。そして、プログラムのテストを実行するためにはシミュレータが用いられるが、そのシミュレータは、具体的なパラメータが入っている最終的なプログラムでないとテストを実行できない。   However, since a ladder program including a macro can only be executed after macro processing (a state determined as a final part), the source program (asset part) is different from the program to be tested or debugged. This is because the original program with macro description includes unnecessary points because it incorporates change points, and it is possible to test and debug by entering specific parameters and executing macro processing. This is because the final part to be processed is completed. A simulator is used to execute the test of the program, but the simulator can execute the test only if it is a final program containing specific parameters.

また、部品をデバッグするためには、以下のような煩雑な作業が必要となり、作業効率が低下してしまうという不具合が生じていた。
1.マクロ記述を含む資産部品をマクロ処理し、特定アプリケーション専用の部品に変形する。
2.その変形部品をラダープログラミングツールで読み込み、PLCにダウンロードする。
3.PLCを実行し、PLCの外部入力をON/OFFしながらラダー部品の動作を確認する。
4.ラダー部品にバグがある場合は、ラダープログロ倉ミングツールで修正する。バグがなくなるまでPLCで実行しながら繰り返す。
5.修正が完了したら、PLCよりラダープログラミングツールでラダー部品をアップロードする。
6.修正箇所を特定した上で、マクロ記述を含む資産部品に修正を手動で反映する。
Further, in order to debug a part, the following complicated work is required, resulting in a problem that work efficiency is lowered.
1. Performs macro processing on asset parts including macro descriptions and transforms them into parts dedicated to specific applications.
2. The deformed part is read with a ladder programming tool and downloaded to the PLC.
3. Execute PLC and check the operation of ladder parts while turning on / off PLC external input.
4). If there are bugs in the ladder parts, fix them with the ladder pro-growing tool. Repeat while running on the PLC until the bug disappears.
5. When the correction is completed, upload the ladder part from the PLC using the ladder programming tool.
6). After specifying the correction part, the correction is manually reflected in the asset part including the macro description.

上記のように、変形後の最終部品でテストを行っても、変形部品としての状態で不具合があるかどうかの判定にすぎず、マクロ記述を含む資産部品の状態に不具合があるかどうかは分からない。そのため、ユーザが手動にてラダープログラミングツールを介して、資産部品に対してテスト結果を反映させるという煩雑な作業が求められていた。   As described above, even if a test is performed on the final part after deformation, it is only a determination as to whether there is a defect in the deformed part state, and it is not known whether there is a defect in the state of the asset part including the macro description. Absent. For this reason, there has been a demand for a complicated operation in which the user manually reflects the test result on the asset part via the ladder programming tool.

本発明は上記の問題点に着目したもので、その目的とするところは、マクロを含むラダープログラム部品の単体テスト作業を効率化する環境を提供し、マクロ記述を含む資産部品のデバッグ効率の向上を実現することである。   The present invention focuses on the above-mentioned problems, and its object is to provide an environment for improving the unit test work of ladder program parts including macros, and to improve the debugging efficiency of asset parts including macro descriptions. Is to realize.

本発明のさらに他の目的並びに作用効果については、明細書の以下の記述を参照することにより、当業者であれば容易に理解されるであろう。   Other objects and operational effects of the present invention will be easily understood by those skilled in the art by referring to the following description of the specification.

本発明の実施の形態においては、ラダープログラムを作成するためのプログラム部品のデバッグ方法であって、当該ラダープログラムの接点や回路を組み替えることを目的としたマクロ処理言語をプログラム部品に記述する手段と、マクロ記述を含むプログラム部品にマクロ処理を実行し、特定アプリケーション専用プログラム部品へと変形させるマクロ処理手段と、特定アプリケーション専用プログラム部品に対して単体テストを実行し、適宜修正を行うデバッグ処理を実行するデバッグ処理手段と、デバッグ処理にて行った修正を、特定アプリケーション専用プログラム部品にその修正箇所と修正内容をコメントとして記述する手段と、特定アプリケーション専用プログラム部品に付加されたコメントを参照してマクロ処理を実行する前のマクロ記述を含むプログラム部品に変換するマクロ逆変換処理手段と、を具備することを特徴とする。   In an embodiment of the present invention, there is provided a debugging method for a program part for creating a ladder program, and means for describing a macro processing language in the program part for the purpose of rearranging contacts and circuits of the ladder program , Execute macro processing on program parts containing macro descriptions and transform them into program parts dedicated to specific applications, and execute unit tests on program parts dedicated to specific applications and debug processing to make appropriate modifications Macro processing with reference to the debug processing means, the means to describe the corrections made in the debug processing as comments in the program part dedicated to the specific application, and the comment added to the program part dedicated to the specific application Before running Characterized by comprising the macro inverse transform means for converting the program components including a macro description, the.

ここで言う『コメント』とは、ラインコメント、命令コメント、または変数コメント等を含み、実行された特定アプリケーション専用プログラム部品への修正についてその実行箇所や実行内容を特定するコメントである。そして、このコメントの特徴として、マクロ処理に対応していないラダーのプログラミングツールでも開くことが可能とされている。   The “comment” referred to here includes a line comment, an instruction comment, a variable comment, and the like, and is a comment that specifies the execution location and execution content of the correction to the specific application program part executed. As a feature of this comment, it can be opened even by a ladder programming tool that does not support macro processing.

このような構成により、多岐にわたるアプリケーションに対応できるように可変性を有するプログラム部品に対して効率よくデバッグ処理を実行することが可能となる。   With such a configuration, it is possible to efficiently execute debug processing on a program component having variability so as to be compatible with various applications.

また、デバッグ処理の過程で発生した修正をコメントとして記述することで、そのコメントを参照して特定のアプリケーション専用プログラム部品を、可変性を有するマクロ記述を含むプログラム部品に変換することが可能となる。   In addition, by describing a modification that occurred during the debugging process as a comment, it is possible to convert a program component dedicated to a specific application into a program component including a macro description having variability by referring to the comment. .

本発明の実施の形態においては、マクロ逆変換処理手段によって得られたマクロ記述を含むプログラム部品を、プログラム部品を格納するプログラム部品データベースに格納する手段とことを特徴とする。   The embodiment of the present invention is characterized in that the program part including the macro description obtained by the macro inverse conversion processing means is stored in a program part database for storing the program parts.

このような構成により、デバッグ処理にて知見されたバグ等に対応する修正をプログラムデータベースに自動的に反映させることが可能となる。   With such a configuration, it becomes possible to automatically reflect in the program database the correction corresponding to the bug found in the debugging process.

本発明の実施の形態においては、デバッグ処理が、仮想入力と期待出力とを設定可能とされた単体テストツールとPLCシミュレータを含む仮想実行環境において実行され、単体テストツールは、シミュレータに仮想入力を与える手段と、PLCシミュレータからの出力を予め設定された期待出力と比較してテストの可否を判断する手段と、をさらに具備することを特徴とする。   In the embodiment of the present invention, the debugging process is executed in a virtual execution environment including a unit test tool and a PLC simulator capable of setting a virtual input and an expected output, and the unit test tool provides a virtual input to the simulator. And a means for comparing the output from the PLC simulator with a preset expected output to determine whether or not the test is possible.

このような構成により、特定アプリケーション専用プログラムに対して仮想のラダー実行環境にてプログラム部品単体でのテストが実行可能とされ、実際にプログラム部品を組み込んでラダープログラムを作成する前に、部品単位でデバッグ作業が行うことが可能となる。ため、デバッグ処理の作業効率が向上する。また、デバッグ処理の過程で生じた修正は自動的にマクロ逆変換処理によってプログラム部品データベースに反映されるため、デバッグ処理とデータベースへの修正入力処理の作業効率が向上する。   With such a configuration, it is possible to execute a single program part test in a virtual ladder execution environment for a program dedicated to a specific application. Before actually creating a ladder program by incorporating a program part, Debugging work can be performed. Therefore, the work efficiency of the debugging process is improved. In addition, since the correction that occurred during the debugging process is automatically reflected in the program part database by the macro inverse conversion process, the work efficiency of the debugging process and the correction input process to the database is improved.

本発明の実施の形態においては、ラダー言語によって記述された複数のプログラム部品を組み合わせて機器制御プログラムにおけるプログラム部品のデバッグ処理を支援するデバッグ支援装置であって、当該ラダープログラムの接点や回路を組み替えることを目的としたマクロ処理言語をプログラム部品に記述する手段と、マクロ記述を含むプログラム部品にマクロ処理を実行し、特定アプリケーション専用プログラム部品へと変形させるマクロ処理手段と、特定アプリケーション専用プログラム部品に対して単体テストを実行し、適宜修正を行うデバッグ処理を実行するデバッグ処理手段と、デバッグ処理にて行った修正を、特定アプリケーション専用プログラム部品にその修正箇所と修正内容をコメントとして記述する手段と、特定アプリケーション専用プログラム部品に付加されたコメントを参照してマクロ処理を実行する前のマクロ記述を含むプログラム部品に変換するマクロ逆変換処理手段とを具備することを特徴とする。   In an embodiment of the present invention, a debugging support device that supports a debugging process of a program part in a device control program by combining a plurality of program parts described in a ladder language, the contact and circuit of the ladder program are rearranged A macro processing language for the purpose of describing the macro processing language in the program part, a macro processing means for executing the macro processing on the program part including the macro description and transforming it into the program part dedicated to the specific application, and the program part dedicated to the specific application Debug processing means for executing unit tests and executing debug processing to make corrections as appropriate, means for describing corrections made in the debug processing as comments in specific application program parts, Specific app Characterized by comprising a macro inverse conversion processing means for converting the program components including a previous macro description executing the reference to the macro processes the added comments application dedicated program components.

このような構成により、多岐にわたるアプリケーションに対応できるように可変性を有するプログラム部品に対して効率よくデバッグ処理を実行することが可能となる。   With such a configuration, it is possible to efficiently execute debug processing on a program component having variability so as to be compatible with various applications.

また、デバッグ処理の過程で発生した修正をコメントとして記述することで、そのコメントを参照して特定のアプリケーション専用プログラム部品を、可変性を有するマクロ記述を含むプログラム部品に変換することが可能となる。   In addition, by describing a modification that occurred during the debugging process as a comment, it is possible to convert a program component dedicated to a specific application into a program component including a macro description having variability by referring to the comment. .

本発明の実施の形態においては、マクロ逆変換処理手段によって得られたマクロ記述を含むプログラム部品を、プログラム部品を格納するプログラム部品データベースに格納する手段とをさらに具備することを特徴とする。   The embodiment of the present invention further includes means for storing a program part including the macro description obtained by the macro inverse conversion processing means in a program part database for storing the program parts.

このような構成により、デバッグ処理にて知見されたバグ等に対応する修正をプログラムデータベースに自動的に反映させることが可能となる。   With such a configuration, it becomes possible to automatically reflect in the program database the correction corresponding to the bug found in the debugging process.

本発明の実施の形態においては、デバッグ処理が、仮想入力と期待出力とを設定可能とされた単体テストツールとPLCシミュレータを含む仮想実行環境において実行され、単体テストツールは、シミュレータに仮想入力を与える手段と、PLCシミュレータからの出力を予め設定された期待出力と比較してテストの可否を判断する手段と、をさらに具備することを特徴とする。   In the embodiment of the present invention, the debugging process is executed in a virtual execution environment including a unit test tool and a PLC simulator capable of setting a virtual input and an expected output, and the unit test tool provides a virtual input to the simulator. And a means for comparing the output from the PLC simulator with a preset expected output to determine whether or not the test is possible.

このような構成により、特定アプリケーション専用プログラムに対して仮想のラダー実行環境にてプログラム部品単体でのテストが実行可能とされ、実際にプログラム部品を組み込んでラダープログラムを作成する前に、部品単位でデバッグ作業が行うことが可能となる。ため、デバッグ処理の作業効率が向上する。また、デバッグ処理の過程で生じた修正は自動的にマクロ逆変換処理によってプログラム部品データベースに反映されるため、デバッグ処理とデータベースへの修正入力処理の作業効率が向上する。   With such a configuration, it is possible to execute a single program part test in a virtual ladder execution environment for a program dedicated to a specific application. Before actually creating a ladder program by incorporating a program part, Debugging work can be performed. Therefore, the work efficiency of the debugging process is improved. In addition, since the correction that occurred during the debugging process is automatically reflected in the program part database by the macro inverse conversion process, the work efficiency of the debugging process and the correction input process to the database is improved.

以上の説明で明らかなように、本発明によれば、マクロを含むラダープログラムのデバッグ作業において、手作業での煩雑な作業を省くことが可能となり、開発作業効率を向上させるという利点を有する。   As is apparent from the above description, according to the present invention, it is possible to omit manual work in debugging work of ladder programs including macros, and there is an advantage of improving development work efficiency.

また、本発明によれば、修正された特定アプリケーションのプログラム部品の変更点のみを、原始プログラム(マクロ記述を含む資産部品)に自動反映できるようになり、作業効率を向上させることが可能となるという利点を有する。   Further, according to the present invention, it becomes possible to automatically reflect only changes in the program parts of the modified specific application to the source program (asset parts including macro descriptions), thereby improving work efficiency. Has the advantage.

以下に、この発明の好適な実施の一形態を添付図面を参照しながら詳細に説明する。   In the following, a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings.

本発明においては、対象となる製品のアプリケーション群(プロダクトライン)において共通性と差異性とを分析し、共通部分と差異部分とが一つの部品内に混在しないように部品を設計する。図1に製品の共通性と差異性とを分けた一例を説明する図が示されている。同図(a)には、開発対象のみを考慮した分析並びに設計の一例が示されている。同図にて示されるように、対象となる製品のみを考慮した場合、その製品を基礎として、異なる状況に対応できるような次の製品、並びに製品のバリエーションを作成する際に、例えば、同図の変更箇所1〜4にて示されるように変更箇所が多岐にわたってしまう。そのため、次の製品を作成するためにどこを変更すればよいのか分かりづらくなってしまう。また、それらの変更箇所1〜4は、モジュールA〜Dに組み込まれており、変更箇所のみを入れ替えて対応することが困難である。そのため、共通部分が多く、部分的な変更によって対応できるような場合においても再度製品を作成する必要が生じてしまうことがある。そこで、同図(b)にて示されるように、対象となる製品のみではなく、製品の品揃えに加えて将来のバージョンアップも含めて、共通性と差異性とを分析することによって、同図(c)にて示されるように、対象製品のバリエーションにおいて差異部分のみをまとめたモジュール5を構成することが可能となる。そして、このように共通部分と差異部分とを明確に分けて部品設計を行うことにより、異なる製品バリエーション等を作成する際にはその差異部分に対応する別のモジュール6と置き換えることにより容易に当該製品のバリエーションを作成することが可能となる。   In the present invention, the commonality and the difference are analyzed in the application group (product line) of the target product, and the parts are designed so that the common parts and the different parts are not mixed in one part. FIG. 1 is a diagram for explaining an example in which the commonality and the difference between products are divided. FIG. 4A shows an example of analysis and design considering only the development object. As shown in the figure, when considering only the target product, when creating the next product and product variations that can handle different situations based on that product, for example, the figure As shown by the change points 1 to 4 in FIG. This makes it difficult to know where to change to create the next product. Moreover, those changed locations 1 to 4 are incorporated in the modules A to D, and it is difficult to respond by replacing only the changed locations. Therefore, it may be necessary to create a product again even when there are many common parts and it can be handled by partial changes. Therefore, as shown in the figure (b), by analyzing not only the target product but also the product lineup and future version upgrades, the commonality and the difference are analyzed. As shown in FIG. 3C, it is possible to configure the module 5 in which only different parts 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 6 corresponding to the difference part. Product variations can be created.

図2には、一つの実施形態として検査装置10が示されている。同図において点線にて描かれた円11〜17にて示されるように、当該検査装置はその機能や処理内容によって大まかに7つの部分に分けられる。   FIG. 2 shows an inspection apparatus 10 as one embodiment. As shown by circles 11 to 17 drawn by dotted lines in the figure, the inspection apparatus is roughly divided into seven parts depending on the function and processing contents.

先ず、供給部11を介して当該検査装置において検査対象となるワークが装置へと供給される。そして、エレベータ12とロードアーム13とを介して、ワークはインデックステーブル14へと移動する。このインデックステーブル14が回転動作を行うことにより、ワークは検査位置へと移動し、検査ヘッド15が所定位置に降下し検査を行う。インデックステーブル14は更に回転し、ワークを取り出し位置へと移動する。アンロードアーム16によってワークはインデックステーブル14から取り出され、排出部17は、検査結果に従い良品/不良品とを分別して排出する。   First, a workpiece to be inspected in the inspection apparatus is supplied to the apparatus via the supply unit 11. Then, the workpiece moves to the index table 14 via the elevator 12 and the load arm 13. As the index table 14 rotates, the workpiece moves to the inspection position, and the inspection head 15 descends to a predetermined position for inspection. The index table 14 further rotates and moves the workpiece to the take-out position. The workpiece is taken out from the index table 14 by the unload arm 16, and the discharge unit 17 separates and discharges the non-defective product / defective product according to the inspection result.

次に、上記の検査装置に対して、同様の検査機能を有するものの、一部の特性において仕様の異なるバリエーションが表形式にて図3に示されている。同図における検査装置Aが先に図2を用いて説明した検査装置の一例であり、検査装置Bとは、その検査装置Aの特性を一部を変更したバリエーションである。同図に示される検査装置Aと検査装置Bとの特性を比較すると、ワークの搬入及び搬出に関しては双方ともロボット輸送を採用しているが、それ以外の特性においては差異が見られる。例えば、供給部において、検査装置Aはエレベータ供給を採用しているが、検査装置Bは採用していない。同様に、検査対象のワークを位置決めするために、検査装置Aはインデックステーブルを用いているが、検査装置Bはベルトコンベアを採用している。同様に、ワークの停止位置についても、検査装置Aは4ポジションによる位置決めを行っているが、検査装置Bではセンサによる位置決めを採用している。そして、検査を行う際に、検査装置Aはカラーセンサを採用しているが、検査装置Bは画像センサを用いている。また、検査後のワークの排出については、検査装置Aはロボットによる良品と不良品との分別を行っており、検査装置Bでは不良品のみを押し出す方法を採用している。   Next, FIG. 3 shows, in a tabular form, variations with different specifications but having the same inspection function as the above-described inspection apparatus, but with some characteristics. The inspection apparatus A in the figure is an example of the inspection apparatus described above 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 unit, the inspection apparatus A adopts elevator supply, but the inspection apparatus B does not. 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に示されている。図4には、コンポーネントの全体図が示されている。同図にて示されるように、検査装置20は、ワーク搬入部21、位置決め部22、検査部23、及びワーク搬出部24に区分されている。そして、ワーク搬入部21は、さらに供給部21aとロードアーム21bとが備えられている。そして、位置決め部22にはインデックステーブル22aとベルトコンベア22bが、検査部23には検査方法25が、そしてワーク搬出部24にはアンロ―ドアーム24aと仕分け部24bとがそれぞれ備えられている。   4 to 6 are component diagrams in which the inspection apparatus A and the inspection apparatus B are divided into common parts and different parts according to characteristics. 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 carry-out unit 24 includes an unload arm 24a and a sorting unit 24b.

図5には、ワーク搬入部21における検査装置A並びに検査装置Bの共通性と差異性が示されている。同図にて示されるように、検査装置Aは、ワーク搬入部21として供給部(エレベータ供給)21aとロードアーム21bが備えられているが、それに対して検査装置Bは供給部21aはなく、ロードアーム21bのみ備えられている。すなわち、これらの検査装置においては、供給部21aが差異部分であり、ロードアーム21bは共通部分となる。そして、このように製品バリエーションにおける差異部分となった供給部21aは、オプション部品として切り出しておく。   FIG. 5 shows the commonality and difference between the inspection apparatus A and the inspection apparatus B in the workpiece carry-in portion 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 the work carry-in part 21, whereas the inspection apparatus B does not have the supply part 21a. Only the load arm 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には位置決め部22における検査装置A並びに検査装置Bの共通性と差異性が示されている。同図にて示されるように、検査装置Aは、位置決め部22としてインデックステーブル22aを採用しているが、それに対して検査装置Bはベルトコンベア22bを採用している。すなわち、これらの検査装置においては、インデックステーブル22aとベルトコンベア22bとのいずれかを選択することとなる。そして、このような場合は、インデックステーブル22aとベルトコンベア22bとを代替部品(代替コンポーネント)として切り出しておく。   FIG. 6 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(特性)には、特定の特性名を指定する。そして、true statementsと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. True statements and false statements contain the range of circuits 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に、特性モデルの例が示されている。特性モデルとは、後に詳細に説明するが、製品ラインアップを特性によって表現したモデルである。これらの図にて示されるように、検査装置30は、その特性によって供給31,ワーク搬入32,位置決め33,検査34,ワーク搬出35,排出36のコンポーネントに分けられる。そして、供給31にはエレベータ供給がオプション・コンポーネントとして備えられている。ここで、エレベータ供給に設けられている円37aは、この特性がオプション・コンポーネントとして選択可能に設定されていることを示している。それに対して、ワーク搬入32及びワーク搬出35に設けられたロボット輸送38及び40は、オプションとしての特性ではないため、エレベータ供給37における円37aのような表示はされていない。   9 and 10 show examples of characteristic models. The characteristic model, which will be described in detail later, is a model that expresses the product lineup by characteristics. 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 as alternative components for the discharge 36, respectively.

図10は、上述の特性モデルにおいて、オプションの選択有無、及びどちらの代替コンポーネントが使用されているかを示している。同図にて示されるように、オプションとして設けられているエレベータ供給37には、黒点41にてマーキングが施されている。この黒点41は、対象となる特性コンポーネントが選択されていることを示すものである。同様に、4ポジション39a、画像センサ34b、及びロボットによる分別36bにも黒点41が施され、これらの特性が選択されていることを示している。そして、このような特性を組み合わせていくと、先に説明した検査装置Aのような特性を有する検査装置が実現される。さらに、このような特性モデル、並びに特性の選択有無をしめすマーキングをユーザに対して画像モニタ等にて表示することによって、どの特性が選択されているのか、並びに選択可能な特性が一目瞭然となる。   FIG. 10 shows whether or not an option is selected and which alternative component is used in the above-described characteristic model. As shown in the figure, the optional elevator supply 37 is marked with a black dot 41. This black point 41 indicates that the target characteristic component is selected. Similarly, a black point 41 is also applied to the 4-position 39a, the image sensor 34b, and the classification 36b by the robot, indicating that these characteristics are selected. When such characteristics are combined, an inspection apparatus having characteristics such as the inspection apparatus A described above is realized. Further, by displaying such a characteristic model and markings indicating whether or not the characteristic is selected on the image monitor or the like, it becomes obvious at a glance which characteristic is selected and the selectable characteristic.

次に、本発明における実施形態のソフトウェア構成図が図11に示されている。   Next, FIG. 11 shows a software configuration diagram of the embodiment of the present invention.

同図にて示されるように、この実施形態においては、ドメイン分析支援ツール50、プログラム部品管理ソフトウェア60、ラダー・プログラミング・ツール70、及びプログラム部品データベース80とによって概略構成されている。   As shown in the figure, in this embodiment, a domain analysis support tool 50, a program part management software 60, a ladder programming tool 70, and a program part database 80 are schematically configured.

ドメイン分析支援ツール50内のFeatureモデルエディタ(以下、特性モデルエディタと言う)51とは、開発対象ドメインにおける製品ラインアップの共通性と差異性とを分析し、製品ラインアップを『特性』によって表現した分析モデルである『Feature Model(以下、特性モデルと言う)』と製品の特性情報52を作成するものである。   The Feature Model Editor (hereinafter referred to as “Characteristic Model Editor”) 51 in the domain analysis support tool 50 analyzes the commonality and difference of the product lineup in the development target domain, and expresses the product lineup by “characteristics”. The analysis model “Feature Model (hereinafter referred to as a characteristic model)” and the product characteristic information 52 are created.

次に、プログラム管理ソフトウェア60内の各機能を説明する。プロダクト・パラメータ・マネージャ61とは、ある製品のアプリケーションを構築するために必要なプログラム部品群と、そこに含まれるマクロへの入力パラメータセット(以下、プロダクト・パラメータと言う)を管理するものである。本実施形態では、ドメイン分析支援ツール50が作成する特性モデルと、製品の特性情報52を元に、プロダクト・パラメータを作成する機能も備えている。   Next, each function in the program management software 60 will be described. The product parameter manager 61 manages a group of program parts necessary for constructing an application of a certain product and an input parameter set (hereinafter referred to as a product parameter) to a macro included therein. . 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 52.

コンポーネント・マネージャ66とは、ラダープログラムの作成用のプログラム部品65が格納されているプログラム部品データベース80から、プロダクト・パラメータ・マネージャ61によって作成されたプロダクト・パラメータに従い、必要となるラダープログラム部品を取り出す機能を有する。また、プログラム部品データベース80に格納されていない部品を新規作成したり、既存のプログラム部品65に編集を加えた場合において、新たに作成されたプログラム部品65をプログラム部品データベース80に格納する機能も有する。   The component manager 66 takes out the necessary ladder program parts from the program part database 80 storing the program parts 65 for creating the ladder program according to the product parameters created by the product parameter manager 61. It has a function. In addition, when a part that is not stored in the program part database 80 is newly created or an existing program part 65 is edited, the program part database 65 has a function of storing the newly created program part 65 in the program part database 80. .

コンポーネント・エディタ62とは、マクロを含んだラダープログラム部品の編集を行うものである。この実施形態においては、マクロの編集機能と、ラダープログラムの編集機能とを併せ持っている。   The component editor 62 edits ladder program parts including macros. This embodiment has both a macro editing function and a ladder program editing function.

コンポーネント・デバッガ63とは、マクロ処理事項前後での、ラダープログラムの紐付け情報を管理する。マクロ処理後のプログラム部品に対する修正や変更を、マクロ処理実行前の汎用的なプログラム部品に反映させる機能を有する。   The component debugger 63 manages ladder program linking information before and after macro processing items. It has a function of reflecting corrections and changes to program parts after macro processing in general-purpose program parts before execution of macro processing.

マクロ・プロセッサ67とは、マクロ記述とプロダクト・パラメータに従い、ラダープログラムの変形を実行し、特定アプリケーション用のプログラム部品を生成する機能を有する。   The macro processor 67 has a function of generating a program component for a specific application by executing a modification of the ladder program according to the macro description and the product parameter.

そして、ラダー・プログラミング・ツール70には、図示しないラダーエディタ・デバッガが含まれており、一般的なラダープログラミングツールであるため、詳細な説明は省略する。このラダープログラミングツール70では、プログラム部品管理ソフトウェアによって生成されたラダープログラム部品(特定アプリケーション専用プログラム部品90)を用いて、アプリケーションを作成する。また、ラダー・プログラミング・ツール70は、図示しないが、PLCシミュレータと単体テストツール等によって構成されるラダー実行環境と接続されており、作成されたプログラムをラダー実行環境へとダウンリロードし、単体テストを実行可能とする。   The ladder programming tool 70 includes a ladder editor / debugger (not shown), which is a general ladder programming tool, and thus detailed description thereof is omitted. The ladder programming tool 70 creates an application using a ladder program component (specific application dedicated program component 90) generated by the program component management software. Although not shown, the ladder programming tool 70 is connected to a ladder execution environment constituted by a PLC simulator and a unit test tool, and the created program is downloaded to the ladder execution environment and a unit test is executed. Make it possible.

次に、図12〜図14に、全体の処理を示すフローチャートが示されている。これらのフローチャートにて示されるように、特性モデルエディタ51は、ユーザが選択した特性を保存する(ステップ1001)。しして、プロダクト・パラメータ・マネージャ61が特性選択結果よりマクロへの入力パラメータ64を生成する(ステップ1002)。続いて、コンポーネント・マネージャ66は、ユーザが選択したコンポーネントを記憶し(ステップ1003)、プログラム部品データベース80より資産プログラム部品(マクロ記述済みのプログラム部品)65を取り出し(ステップ1004)、資産プログラム部品65と入力パラメータ64とをマクロ・プロセッサへと渡す(ステップ1005)。マクロ・プロセッサ67は、マクロ処理を実行し、資産プログラム部品65を変形して、特定アプリケーション専用プログラム部品90を生成する(ステップ1006)。   Next, FIGS. 12 to 14 are flowcharts showing the overall processing. As shown in these flowcharts, the characteristic model editor 51 stores the characteristic selected by the user (step 1001). Then, the product parameter manager 61 generates a macro input parameter 64 from the characteristic selection result (step 1002). Subsequently, the component manager 66 stores the component selected by the user (step 1003), retrieves the asset program part (program part with macro description) 65 from the program part database 80 (step 1004), and sets the asset program part 65. And the input parameter 64 are passed to the macro processor (step 1005). The macro processor 67 executes macro processing, transforms the asset program component 65, and generates a specific application dedicated program component 90 (step 1006).

図11に続き、コンポーネント・デバッガ63は、特定アプリケーション専用プログラム部品90をラダー・プログラミング・ツール70へと送る(ステップ1007)。そして、ラダー実行環境にプログラムをダウンロードし、単体テストを実行する(ステップ1008)。この単体テストに合格しない場合(ステップ1009,NO)、ラダー・プログラミング・ツール70にてプログラムを修正し(ステップ1010)、ステップ1008に戻りラダー実行環境にダウンロードし単体テストを実行する。それに対して、ステップ1008の単体テストに合格した場合(ステップ1009,YES)、ラダー・プログラミング・ツール70にてプログラムをアップロードする(ステップ1011)。続いて、コンポーネント・デバッガ63にてマクロの逆変換処理を実行する(ステップ1012)。ここで、マクロの逆変換処理に成功した場合(ステップ1013,YES)、コンポーネント・デバッガ63にてマクロの逆変換処理を実行し(ステップ1014)、コンポーネント・マネージャ66が資産プログラム部品を上書き更新する(ステップ1015)。それに対して、ステップ1012におけるマクロの逆変換処理が成功しなかった場合(ステップ1013,NO)、修正前との差分を表示し(ステップ1016)、ユーザがコンポーネント・エディタ62で直接資産プログラムの更新を実行する(ステップ1017)。ここでのマクロ逆変換処理が成功しない場合とは、マクロ処理した部分にユーザが変更を加えた場合のことであり、その修正が加えられる前との差分(差異部分)を表示して、ユーザが直接マクロプログラムを更新するようにしたものである。   Continuing with FIG. 11, the component debugger 63 sends the program component 90 dedicated to the specific application to the ladder programming tool 70 (step 1007). Then, the program is downloaded to the ladder execution environment and a unit test is executed (step 1008). If this unit test is not passed (step 1009, NO), the program is corrected by the ladder programming tool 70 (step 1010), the process returns to step 1008, and is downloaded to the ladder execution environment to execute the unit test. On the other hand, when the unit test of step 1008 is passed (step 1009, YES), the program is uploaded by the ladder programming tool 70 (step 1011). Subsequently, the inverse conversion process of the macro is executed by the component debugger 63 (step 1012). If the macro reverse conversion process is successful (step 1013, YES), the component debugger 63 executes the macro reverse conversion process (step 1014), and the component manager 66 overwrites and updates the asset program part. (Step 1015). On the other hand, if the macro inversion process in step 1012 has not succeeded (step 1013, NO), the difference from the previous correction is displayed (step 1016), and the user directly updates the asset program in the component editor 62. Is executed (step 1017). The case where the macro inversion process is not successful here means that the user has made a change to the macro-processed part, and displays the difference (difference part) from before the correction was made. Is to update the macro program directly.

続いて、図15及び図16に、マクロ処理のフローチャートが記されている。同図にて示されるように、先ず資産プログラム部品を格納しているファイルがオープンされ(ステップ1301)、新しい特定アプリケーションプログラム部品90を格納するファイルを新規作成する(ステップ1302)。続いて、資産プログラム部品のスキャンが実行される(ステップ1303)。資産プログラム部品65をスキャンした結果、ファイルの終わりであれば(ステップ1304,YES)、資産プログラム部品ファイル、特定アプリケーションプログラム部品ファイルをクローズし、処理を終える(ステップ1305)。   Subsequently, FIGS. 15 and 16 are flowcharts of the macro processing. As shown in the figure, a file storing asset program parts is first opened (step 1301), and a new file storing new specific application program parts 90 is created (step 1302). Subsequently, the asset program part is scanned (step 1303). If the result of scanning the asset program part 65 is the end of the file (step 1304, YES), the asset program part file and the specific application program part file are closed, and the process ends (step 1305).

ステップ1303に戻り、資産プログラム部品65をスキャンした結果、ファイルの終わりでなければ(ステップ1304,NO)、続いてマクロ処理が行われているかどうかの判別が実行される(ステップ1306)。このとき、マクロ処理が行われていなければ、資産プログラム部品65から特定アプリケーション専用プログラム部品90に、その行を単純コピーし(ステップ1307)、ステップ1304に戻りファイルの終わりであるかどうかの判別を実行する。それに対して、マクロ処理がある場合(ステップ1306,YES)、マクロ命令を取り出し(ステップ1308)、マクロIDをインクリメントする(ステップ1309)。   Returning to step 1303, if the result of scanning the asset program component 65 is not the end of the file (step 1304, NO), then it is determined whether macro processing is being performed (step 1306). At this time, if the macro processing is not performed, the line is simply copied from the asset program part 65 to the specific application program part 90 (step 1307), and the process returns to step 1304 to determine whether it is the end of the file. Execute. On the other hand, if there is macro processing (step 1306, YES), a macro instruction is taken out (step 1308), and the macro ID is incremented (step 1309).

続いて、取り出されたマクロ命令の種類の判別が行われる(ステップ1310)。このとき、同図においては、必要な回路を取り出す(ステップ1311)、回路を行単位でコピーする(ステップ1312)、及び命令をAND接続でコピーする(ステップ1313)の3つが記載されているが、これらはマクロ命令の一例に過ぎず、後に説明する様々なマクロ命令の種類の判別を実行する。マクロ命令の種類判別が実行されると、続いて、コメントとして記述されているマクロ命令にマクロIDを追加する(ステップ1314)。ここで言うマクロIDとは、ラダープログラムにおけるマクロ処理の記述部位を示す識別子であり、例えば、ライン番号等が用いられる。そして、マクロ命令で削除されるオリジナル回路はコメントアウトし、マーク(REM文とマクロIDを追加)を付けておく(ステップ1315)。ここで言うREMとは、Remarkの略であり、コメントが挿入されていることを意味するものである。   Subsequently, the type of the extracted macro instruction is determined (step 1310). At this time, in the same figure, the required circuit is extracted (step 1311), the circuit is copied in units of rows (step 1312), and the instruction is copied by AND connection (step 1313). These are merely examples of macro instructions, and various types of macro instructions to be described later are determined. When the macro instruction type determination is executed, a macro ID is subsequently added to the macro instruction described as a comment (step 1314). The macro ID referred to here is an identifier indicating a description part of macro processing in the ladder program, and for example, a line number or the like is used. Then, comment out the original circuit to be deleted by the macro instruction and add a mark (add REM sentence and macro ID) (step 1315). Here, REM is an abbreviation for Remark, and means that a comment is inserted.

その後、マクロ命令で追加、変形された結果の回路の前後にコメントでマクロIDを挿入する(ステップ1316)。ここで、その例を以下に示す。
MacroID=3:マクロ命令[]
]
BEGIN(3)
変形結果
END(3)
マクロIDの挿入後、特定アプリケーションプログラム部品ファイルに一連の処理を書き出し(ステップ1317)、ステップ1304に戻ってファイルの終わりであるかどうかの識別を実行し、その後上述の処理を繰り返す。
Thereafter, a macro ID is inserted by comment before and after the circuit resulting from addition and transformation by the macro instruction (step 1316). Here, an example is shown below.
( * MacroID = 3: Macro instruction [ * ]
( * ) * )
( * BEGIN (3) * )
Deformation result
( * END (3) * )
After the macro ID is inserted, a series of processing is written to the specific application program component file (step 1317), and the process returns to step 1304 to identify whether it is the end of the file, and then the above processing is repeated.

本実施形態においては、ラダープログラムに対して以下の操作を行うためのマクロを定義する。   In the present embodiment, macros for performing the following operations on the ladder program are defined.

<宣言の変更>
(1)変数宣言の複製
(2)変数名の変更
(3)入出力属性の変更
<ラダー回路の変更>
(1)接点名の変更
(2)応用命令へのオペランド変更
(3)ファンクション・ブロック・インスタンスの入れ替え
(4)ライン内の特定のIN接点のn倍化
(ア)IN接点を連番で複製し、AND命令で接続
(イ)IN接点を連番で複製し、OR命令で接続
(5)ライン内の特定のOUT接点のn倍化
(ア)OUT接点を連番で複製し、OR命令で接続
(イ)応用命令を連番で複製し、OR命令で接続
(ウ)ファンクション・ブロック・インスタンスを連番で複製し、OR命令で接続
(6)ライン単位での変形
(ア)ブロック単位での入れ替え
(イ)ブロック単位でのn倍化
(7)POU(Program Organization Unit:プログラム部品)名の変更
(8)POUのn倍化
<Change of declaration>
(1) Copy of variable declaration (2) Change of variable name (3) Change of input / output attribute <Change of ladder circuit>
(1) Contact name change (2) Operand change to application instruction (3) Replacement of function block instance (4) Specific IN contact in line is multiplied by n (a) IN contact is duplicated with serial number Connect with AND command (a) Duplicate IN contact with serial number and connect with OR command (5) Multiply specific OUT contact within line (a) Duplicate OUT contact with serial number, OR command (A) Duplicate application instructions with serial numbers and connect with OR instructions (c) Duplicate function block instances with serial numbers and connect with OR instructions (6) Transformation in line units (a) Block units (A) n-fold in block units (7) change of POU (Program Organization Unit) name (8) n-fold POU

そして、図17に、本実施形態におけるマクロの定義体系が示されている。同図にて示されるように、この例でのマクロ定義は、FB(Function Block)内部変数宣言の操作、回路の操作、POU操作の3つに大別され、それらの操作からさらに詳細操作が枝分かれしている。   FIG. 17 shows a macro definition system in this embodiment. As shown in the figure, the macro definition in this example is roughly divided into three operations: FB (Function Block) internal variable declaration operation, circuit operation, and POU operation. Branched.

本マクロを使用した例が図18に示されている。同図にて示されるケースは、先に説明した、行単位で必要な回路を取り出すマクロの一例であり、inputというオプションが存在していることが前提とされる。図18(a)では、行単位で回路を取り出す条件として、inputと言う特性が記述されており、そのinputが選択されていることが条件であることを示す
;$feature(この例ではinput)=true
という記述もされている。これに対してマクロ処理を行う。inputという特性が選択されていると、図18(b)の回路が得られる。それに対して、inputとい特性が選択されていないと、条件が満たされていないため、上同図(b)の回路は取り出されずに、図18(c)の回路が得られる。このとき、条件として記述されている特性が選択されているか否かは先に図9及び図10を参照して説明した特性モデルで確認することが可能である。
An example using this macro is shown in FIG. The case shown in the figure is an example of a macro for extracting a necessary circuit in units of rows, as described above, and it is assumed that an option “input” exists. In FIG. 18 (a), a characteristic called input is described as a condition for extracting a circuit in units of rows, and it indicates that the condition is that the input is selected.
; $ Feature (input in this example) = true
It is also described. Macro processing is performed on this. When the input characteristic is selected, the circuit of FIG. 18B is obtained. On the other hand, if the input characteristic is not selected, the condition is not satisfied, so that the circuit shown in FIG. 18B is obtained without taking out the circuit shown in FIG. At this time, whether or not the characteristic described as the condition is selected can be confirmed by the characteristic model described above with reference to FIGS.

この処理をテキストファイル形式で表したものが図19に示されている。同図にて示されるように、条件である特性(input)が選択されているかどうかで得られる回路は異なる。同図左側が、inputが選択されている場合を示し、同図右側がinputが選択されていない場合を示している。尚、他のマクロの例が図20の表に示されている。図20の表にてFBとは、Function Blockの略であり、ファンクションブロックを意味するものであり、POUとは、上述のプログラム部品を意味する。   FIG. 19 shows this processing in a text file format. As shown in the figure, the circuit obtained differs depending on whether or not the characteristic (input) is selected. The left side of the figure shows the case where input is selected, and the right side of the figure shows the case where input is not selected. Other macro examples are shown in the table of FIG. In the table of FIG. 20, FB is an abbreviation for Function Block, meaning a function block, and POU means the above-described program component.

次に、図21〜24を参照して本発明による、マクロ記述を含むプログラム部品のデバッグ方法を説明する。図21には、特定アプリケーション専用プログラム部品のデバッグ処理と、ツールの機能の関係を説明するための図が記されている。   Next, a method for debugging a program part including a macro description according to the present invention will be described with reference to FIGS. FIG. 21 is a diagram for explaining the relationship between the debugging process of the program component dedicated to the specific application and the function of the tool.

同図にて示されるように、コンポーネントエディタ120は、プログラム部品データベース130に格納されているプログラム部品を取り出し、その部品に対してマクロ記述を埋め込むことによりマクロ入り資産部品の作成を行い、作成されたマクロ記述入り資産部品をプログラム部品データベース130に格納する。そして、プログラム部品管理ソフトウェア140内に格納されているマクロ処理部141(マクロプロセッサ)が、当該マクロ記述が埋め込まれたプログラム部品に対してマクロ処理を実行し、プログラム部品に対する変形を実行する。   As shown in the figure, the component editor 120 takes out a program part stored in the program part database 130 and creates a macro-containing asset part by embedding a macro description in the part. The asset part containing the macro description is stored in the program part database 130. Then, the macro processing unit 141 (macro processor) stored in the program component management software 140 executes macro processing on the program component in which the macro description is embedded, and executes transformation on the program component.

マクロプロセッサ141によって変形されたプログラム部品(同図では変形部品)151は、特定アプリケーション専用プログラム部品150となり、ラダープログラミングツール160へと送られる。ラダープログラミングツール160は、単体テストツール171とPLCシミュレータ172を備えたラダー実行環境170に接続されており、特定アプリケーション専用プログラム部品150を用いたプログラムを作成し、ラダー実行環境170へとダウンロードする。ラダー実行環境170とは、テストを実行するための仮想実行環境である。ラダー実行環境170においては、単体テストツール171がダウンロードしたプログラムをPLCシミュレータ172に仮想入力し、単体テストを実行する。このとき、単体テストツール171は、仮想入力と期待出力のペアがテストケースとして設定されている。そして、PLCシミュレータ172に仮想入力を与え、PLCシミュレータ172からの出力と、設定していた期待出力とを比較して、単体テストのOK/NGを判定する。単体テストの結果がNGであれば、ラダープログラミングツール160にて部品の修正が実行され、テストに合格するまで繰り返し実行される。   A program component 151 (modified component in the figure) 151 transformed by the macro processor 141 becomes a program component 150 dedicated to a specific application, and is sent to the ladder programming tool 160. The ladder programming tool 160 is connected to a ladder execution environment 170 having a unit test tool 171 and a PLC simulator 172, and creates a program using the program component 150 dedicated to the specific application and downloads it to the ladder execution environment 170. The ladder execution environment 170 is a virtual execution environment for executing a test. In the ladder execution environment 170, the program downloaded by the unit test tool 171 is virtually input to the PLC simulator 172, and the unit test is executed. At this time, the unit test tool 171 has a pair of virtual input and expected output set as a test case. Then, a virtual input is given to the PLC simulator 172, and the output from the PLC simulator 172 is compared with the set expected output to determine OK / NG of the unit test. If the result of the unit test is NG, the parts are corrected by the ladder programming tool 160 and are repeatedly executed until the test is passed.

ラダープログラミングツール160にて修正された部品152は特定アプリケーション専用プログラム部品150として、プログラム部品管理ソフトウェア140に格納されるマクロ逆変換部(コンポーネントデバッガ)142によって、マクロの逆変換処理が実行される。このマクロ逆変換部142にてマクロの逆変換処理が実行されることにより、単体テストに合格した修正された部品152を、マクロ記述入りのプログラム部品の状態に戻すことが可能となり、その状態でプログラム部品データベース130にマクロ実行前の資産部品にラダープログラミングツール160で行われた修正が反映され、格納される。   The component 152 corrected by the ladder programming tool 160 is subjected to macro inverse conversion processing by the macro inverse conversion unit (component debugger) 142 stored in the program component management software 140 as the program component 150 dedicated to the specific application. By executing the macro reverse conversion process in the macro reverse conversion unit 142, it is possible to return the modified part 152 that has passed the unit test to the state of the program part including the macro description, and in this state the program In the parts database 130, the modifications made by the ladder programming tool 160 are reflected and stored in the asset parts before the macro execution.

このマクロの逆変換処理のフローチャートが図22に示されている。同巣にて示されるように、先ず、資産プログラム部品を格納する一時ファイルを新規作成する(ステップ2401)。続いて、特定アプリケーション専用プログラム部品を格納するファイルをオープンし(ステップ2402)、特定アプリケーション専用プログラム部品をスキャンする(ステップ2403)。このとき、ファイルの終わりであれば(ステップ2404,YES)、資産プログラム部品ファイル、特定アプリケーション専用プログラムファイルをクローズし(ステップ2405)、作業は終了する。これに対して、ファイルの終わりでなければ(ステップ2404,NO)、続いて当該特定アプリケーション専用プログラム部品にREMマークが記述されているかどうかの識別が実行される(ステップ2406)。ここでのREMとは、先に説明したように、コメントが挿入されていることを示す識別子であり、REMマークがあるということは、ラダープログラミングツールにて修正が実行されたことを意味するものである。   A flowchart of the inverse macro conversion process is shown in FIG. As shown in the same box, first, a temporary file for storing the asset program part is newly created (step 2401). Subsequently, a file storing the program component dedicated to the specific application is opened (step 2402), and the program component dedicated to the specific application is scanned (step 2403). At this time, if it is the end of the file (step 2404, YES), the asset program part file and the specific application dedicated program file are closed (step 2405), and the operation is completed. On the other hand, if it is not the end of the file (step 2404, NO), then it is identified whether or not the REM mark is described in the program component dedicated to the specific application (step 2406). As described above, REM is an identifier indicating that a comment has been inserted. The presence of a REM mark means that correction has been executed by a ladder programming tool. It is.

そして、REMマークがある場合(ステップ2406,YES)、当該特定アプリケーション専用プログラム部品からREMマークを削除し、コメントアウトを解除したものを資産プログラム部品にコピーし(ステップ2407)、ステップ2403に戻り、特定アプリケーション部品のスキャンを行い、ファイルの終わりに到達するまで作業を繰り返す。   If there is a REM mark (YES in step 2406), the REM mark is deleted from the program part dedicated to the specific application, and the commented-out release is copied to the asset program part (step 2407), and the process returns to step 2403 to specify Scan the application parts and repeat until you reach the end of the file.

また、ステップ2406において、REMマークがない場合(ステップ2406,NO)、続いてBEGINマークの有無が確認される(ステップ2408)。ここで、BEGINマークがある場合(ステップ2408,YES)、ENDマークまでスキップし(ステップ2409)、ステップ2404に戻り特定アプリケーション部品のスキャンを行い、ファイルの終わりに到達するまで作業を繰り返す。また、ステップ2408にてBEGINマークがない場合(ステップ2408,NO)、特定アプリケーション専用プログラム部品から資産プログラム部品に対象となる行を単純コピーし(ステップ2410)、ステップ2404に戻り特定アプリケーション部品のスキャンを行い、ファイルの終わりに到達するまで作業を繰り返す。   If there is no REM mark in step 2406 (step 2406, NO), the presence or absence of the BEGIN mark is subsequently confirmed (step 2408). If there is a BEGIN mark (step 2408, YES), the process skips to the END mark (step 2409), returns to step 2404, scans for a specific application component, and repeats the operation until the end of the file is reached. If there is no BEGIN mark in step 2408 (step 2408, NO), the target line is simply copied from the specific application program part to the asset program part (step 2410), and the process returns to step 2404 to scan for the specific application part. Repeat until you reach the end of the file.

本発明においては、プログラム部品には、様々なアプリケーションに対応できるように、変化点(変更箇所)にマクロ記述が組み込まれている。そして、このマクロ記述を含むプログラム部品に、パラメータを入力することによって、特定のアプリケーション専用のプログラム部品が作成される。ところが、マクロ記述を含むプログラム部品は、先に説明したように、多様のアプリケーションに対応できるように部品の変化点ををマクロとして組み込んでいるため、その状態ではシミュレータによるテストやデバッグ処理が実行できない。   In the present invention, a macro description is incorporated in a change point (change location) in the program part so as to be compatible with various applications. A program component dedicated to a specific application is created by inputting a parameter to the program component including the macro description. However, as described above, program parts including macro descriptions incorporate part changes as macros so that they can be used in a variety of applications. In this state, testing and debugging cannot be executed by the simulator. .

そこで、上述のように、特定アプリケーション専用プログラム部品をマクロ処理によって作成し、テストやデバッグ処理を実行できる状態にすることが必要となる。また、デバッグ処理の過程で、特定アプリケーション専用プログラム部品に不具合が生じて修正が必要となった場合、その修正箇所並びに修正内容をコメントとして特定アプリケーション専用プログラム部品に記述することによって、当該コメントを参照して特定アプリケーション専用プログラム部品に対してマクロ逆変換処理を実行して原始プログラムであるマクロ記述を含むプログラム部品を得ることが可能となる。その後、得られたマクロ記述を含むプログラム部品をプログラム部品データベースに反映させることにより、マクロ記述を含むプログラム部品のデバッグ処理並びにデータベースへの反映を自動的に行うことが可能となり、デバッグ処理の作業効率が向上する。   Therefore, as described above, it is necessary to create a program component dedicated to a specific application by macro processing so that the test and debug processing can be executed. In addition, if a problem occurs in a program part dedicated to a specific application during the debugging process and correction is necessary, the correction part and the details of the correction are described as a comment in the program part dedicated to the specific application. Thus, it is possible to obtain a program part including a macro description as a source program by executing a macro reverse conversion process on the program part dedicated to the specific application. Then, by reflecting the obtained program part including the macro description in the program part database, it is possible to automatically perform the debugging process of the program part including the macro description and the reflection to the database. Will improve.

次に、図23及び図24を参照して、マクロ逆変換処理の一例を説明する。図23には、マクロ記述入りの資産部品(マクロ処理実行前)に対してマクロ処理を実行した場合の一例が示されており、図24には、特定アプリケーション専用プログラム部品に対してマクロ逆変換処理を実行した一例が示されている。   Next, an example of macro inverse transformation processing will be described with reference to FIGS. FIG. 23 shows an example in which macro processing is executed on an asset part with macro description (before execution of macro processing), and FIG. 24 shows reverse macro conversion for a program part dedicated to a specific application. An example of executing the process is shown.

図23にて示されるように、資産部品において設定されている条件(inputという特性が選択されているかどうか)によって、2通りの処理が実行される。このことは、先に説明したのでここでの説明は省略する。ここで、inputがtrueであると仮定し、その結果作成された部品が特定アプリケーション専用プログラム部品であるとする。この場合、inputがtrueとなり、条件を満たしているため、
LD in
OUT out
が選択され、
LD in_1
AND in_2
OUT out
は削除される。そして、削除した項目については、REM文によってコメントとして残されている。
As shown in FIG. 23, two kinds of processing are executed depending on the condition set in the asset part (whether or not the characteristic “input” is selected). Since this has been described above, a description thereof is omitted here. Here, it is assumed that input is true, and the created component is a program component dedicated to a specific application. In this case, since input is true and the condition is met,
LD in
OUT out
Is selected,
LD in_1
AND in_2
OUT out
Is deleted. The deleted item is left as a comment by the REM sentence.

続いて、図24似て示されるように、この特定アプリケーション専用プログラム部品に対してマクロ逆変換処理を行うと、削除された項目については、当該特定アプリケーションプログラム部品にREM文にてコメントとして記述されているため、マクロ逆変換処理を実行することにより、容易にマクロ処理前の資産部品を得ることが可能となる。ここで、同図にて『xxxxxxx』にて示されるのは、当該特定アプリケーション専用プログラム部品が、単体テストの結果を受けてラダープログラミングツールが何らかの修正を施していた場合であり、その修正部分を表している。この修正がマクロ逆変換処理によって資産部品にも反映されている。このようなマクロ逆変換処理、並びに特定アプリケーション専用プログラム部品に施された修正事項を資産部品に自動反映させることにより、ラダー実行環境において好適な資産部品を再構築して以後の使用に備えて保存することが可能となる。   Subsequently, as shown in FIG. 24, when the macro inverse conversion process is performed on the program component dedicated to the specific application, the deleted item is described as a comment in the REM sentence in the specific application program component. Therefore, by executing the macro inverse transformation process, it is possible to easily obtain the asset part before the macro process. In this figure, “xxxxxxx” indicates that the program component dedicated to the specific application has undergone some unit test results and the ladder programming tool has made some corrections. ing. This correction is also reflected in asset parts by the macro inverse transformation process. By reversing the macro inverse transformation process and the corrections made to the program parts dedicated to specific applications to the asset parts, reconstruct a suitable asset part in the ladder execution environment and save it for future use. It becomes possible to do.

本発明によれば、マクロを含むラダープログラムのデバッグ作業において、手作業での修正反映などの煩雑な作業を自動化し、作業効率を向上させることが可能となるという利点を有する。   According to the present invention, there is an advantage that it is possible to automate complicated work such as manual correction reflection and improve work efficiency in debugging work of a ladder program including a macro.

製品の共通性と差異性との分析を説明する図である。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 inspection apparatus which is one Embodiment of this invention. 検査装置における特性のバリエーションを表形式で示した図である。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 software block diagram in embodiment of this invention. 全体の処理を示すフローチャート(その1)である。It is a flowchart (the 1) which shows the whole process. 全体の処理を示すフローチャート(その2)である。It is a flowchart (the 2) which shows the whole process. 全体の処理を示すフローチャート(その3)である。It is a flowchart (the 3) which shows the whole process. マクロ処理を示すフローチャート(その1)である。It is a flowchart (the 1) which shows a macro process. マクロ処理を示すフローチャート(その2)である。It is a flowchart (the 2) which shows a macro process. マクロの定義体系を説明するための図である。It is a figure for demonstrating the definition system of a macro. 本発明のマクロ処理の実行例を説明するための図である。It is a figure for demonstrating the example of execution of the macro processing of this invention. 本発明のマクロ処理をテキストファイル形式で表した図である。It is the figure which represented the macro process of this invention in the text file format. 本発明におけるマクロの一例を示す図である。It is a figure which shows an example of the macro in this invention. 特定アプリケーション専用プログラム部品のデバッグ処理とツールの機能の関係を説明するための図である。It is a figure for demonstrating the relationship between the debugging process of a program component only for a specific application, and the function of a tool. マクロ逆変換処理を示すフローチャートである。It is a flowchart which shows a macro reverse conversion process. マクロ処理を実行した一例を説明するための図である。It is a figure for demonstrating an example which performed the macro process. マクロ逆変換処理を実行した一例を説明するための図である。It is a figure for demonstrating an example which performed the macro inversion process. ファンクションブロックによるプログラムの階層構造を説明する図である。It is a figure explaining the hierarchical structure of the program by a function block.

符号の説明Explanation of symbols

1〜4 変更箇所
5 差異箇所のモジュール
6 変更用モジュール
10 検査装置
11 供給部
12 エレベータ
13 ロードアーム
14 インデックステーブル
15 検査部
16 アンロードアーム
17 排出部
20 検査装置
21 ワーク搬入部
21a 供給部
21b ロードアーム
22 位置決め部
22a インデックステーブル
22b ベルトコンベア
23 検査部
24 ワーク搬出部
24a アンロードアーム
24b 仕分け部
25 検査方法
50 ドメイン支援分析ツール
51 Featureモデルエディタ
52 製品の特性情報
60 プログラム部品管理ソフトウェア
61 プロダクト・パラメータ・マネージャ
62 コンポーネント・エディタ
63 コンポーネント・デバッガ
64 入力パラメータ
65 プログラム部品
66 コンポーネント・マネージャ
67 マクロプロセッサ
70 ラダー・プログラミング・ツール
80 プログラム部品データベース
90 特定アプリケーション専用プログラム部品
100 エアシリンダ
101 シリンダー部
102 アーム部
111 ロボットアーム制御プログラム
112 エアシリンダ制御プログラム
113 磁気センサ制御プログラム
1-4 Change points 5 Modules of difference points 6 Modules for change 10 Inspection device 11 Supply unit 12 Elevator 13 Load arm 14 Index table 15 Inspection unit 16 Unload arm 17 Discharge unit 20 Inspection device 21 Work loading unit 21a Supply unit 21b Load Arm 22 Positioning unit 22a Index table 22b Belt conveyor 23 Inspection unit 24 Work unloading unit 24a Unload arm 24b Sorting unit 25 Inspection method 50 Domain support analysis tool 51 Feature model editor 52 Product characteristic information 60 Program parts management software 61 Product parameter Manager 62 Component editor 63 Component debugger 64 Input parameter 65 Program part 66 Component manager 67 Macro processor 70 Ladder programming tool 80 Program parts database 90 Program parts for specific application 100 Air cylinder 101 Cylinder part 102 Arm part 111 Robot arm control program 112 Air cylinder control program 113 Magnetic sensor control program

Claims (6)

ラダープログラムを作成するためのプログラム部品のデバッグ方法であって、
当該ラダープログラムの接点や回路を組み替えることを目的としたマクロ処理言語をプログラム部品に記述する手段と、
マクロ記述を含むプログラム部品にマクロ処理を実行し、特定アプリケーション専用プログラム部品へと変形させるマクロ処理手段と、
特定アプリケーション専用プログラム部品に対して単体テストを実行し、テスト結果に応じて適宜修正を行うデバッグ処理を実行するデバッグ処理手段と、
デバッグ処理にて行った修正を、特定アプリケーション専用プログラム部品にその修正箇所と修正内容をコメントとして記述する手段と、
特定アプリケーション専用プログラム部品に付加されたコメントを参照してマクロ処理を実行する前のマクロ記述を含むプログラム部品に変換するマクロ逆変換処理手段と
を具備するプログラム部品のデバッグ方法。
A program part debugging method for creating a ladder program,
Means for describing in a program part a macro processing language intended to rearrange the contacts and circuits of the ladder program;
Macro processing means for executing macro processing on a program part including a macro description and transforming it into a program part dedicated to a specific application;
A debug processing means for executing a unit test on a program component dedicated to a specific application and executing a debug process for appropriately modifying according to the test result;
Means to describe the corrections made in the debugging process as comments in the program part dedicated to the specific application,
A program part debugging method comprising: macro inverse conversion processing means for converting a program part including a macro description before executing macro processing with reference to a comment added to a program part dedicated to a specific application.
マクロ逆変換処理手段によって得られたマクロ記述を含むプログラム部品を、プログラム部品を格納するプログラム部品データベースに格納する手段をさらに具備する請求項1に記載のプログラム部品のデバッグ方法。 2. The program part debugging method according to claim 1, further comprising means for storing a program part including the macro description obtained by the macro inverse conversion processing means in a program part database for storing the program part. デバッグ処理が、仮想入力と期待出力とを設定可能とされた単体テストツールとPLCシミュレータを含む仮想実行環境において実行され、
単体テストツールは、シミュレータに仮想入力を与える手段と、
PLCシミュレータからの出力を予め設定された期待出力と比較してテストの可否を判断する手段と、
をさらに具備する請求項1に記載のプログラム部品のデバッグ方法。
The debugging process is executed in a virtual execution environment including a unit test tool and a PLC simulator that can set virtual inputs and expected outputs.
The unit test tool is a means of giving virtual inputs to the simulator,
Means for comparing the output from the PLC simulator with a preset expected output to determine whether the test is possible;
The program part debugging method according to claim 1, further comprising:
ラダー言語によって記述された複数のプログラム部品を組み合わせて機器制御プログラムにおけるプログラム部品のデバッグ処理を支援するデバッグ支援装置であって、
当該ラダープログラムの接点や回路を組み替えることを目的としたマクロ処理言語をプログラム部品に記述する手段と、
マクロ記述を含むプログラム部品にマクロ処理を実行し、特定アプリケーション専用プログラム部品へと変形させるマクロ処理手段と、
特定アプリケーション専用プログラム部品に対して単体テストを実行し、適宜修正を行うデバッグ処理を実行するデバッグ処理手段と、
デバッグ処理にて行った修正を、特定アプリケーション専用プログラム部品にその修正箇所と修正内容をコメントとして記述する手段と、
特定アプリケーション専用プログラム部品に付加されたコメントを参照してマクロ処理を実行する前のマクロ記述を含むプログラム部品に変換するマクロ逆変換処理手段と
を具備することを特徴とするプログラム部品のデバッグ支援装置。
A debugging support device that supports a debugging process of a program part in a device control program by combining a plurality of program parts described in a ladder language,
Means for describing in a program part a macro processing language intended to rearrange the contacts and circuits of the ladder program;
Macro processing means for executing macro processing on a program part including a macro description and transforming it into a program part dedicated to a specific application;
A debug processing means for executing a unit test for a program component dedicated to a specific application and executing a debug process for correcting as appropriate;
Means to describe the corrections made in the debugging process as comments in the program part dedicated to the specific application,
A program component debugging support device, comprising: a macro inverse conversion processing unit that converts a program component including a macro description before executing macro processing with reference to a comment added to a program component dedicated to a specific application. .
マクロ逆変換処理手段によって得られたマクロ記述を含むプログラム部品を、プログラム部品を格納するプログラム部品データベースに格納する手段をさらに具備することを特徴とする請求項4に記載のデバッグ支援装置。 5. The debugging support apparatus according to claim 4, further comprising means for storing a program part including the macro description obtained by the macro inverse conversion processing means in a program part database for storing the program part. デバッグ処理が、仮想入力と期待出力とを設定可能とされた単体テストツールとPLCシミュレータを含む仮想実行環境において実行され、
単体テストツールは、シミュレータに仮想入力を与える手段と、
PLCシミュレータからの出力を予め設定された期待出力と比較してテストの可否を判断する手段と、
をさらに具備することを特徴とする請求項4に記載のデバッグ支援装置。
The debugging process is executed in a virtual execution environment including a unit test tool and a PLC simulator that can set virtual inputs and expected outputs.
The unit test tool is a means of giving virtual inputs to the simulator,
Means for comparing the output from the PLC simulator with a preset expected output to determine whether the test is possible;
The debugging support apparatus according to claim 4, further comprising:
JP2005289245A 2005-09-30 2005-09-30 Debugging method of control component having variability and debugging support apparatus Active JP4488227B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005289245A JP4488227B2 (en) 2005-09-30 2005-09-30 Debugging method of control component having variability and debugging support apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005289245A JP4488227B2 (en) 2005-09-30 2005-09-30 Debugging method of control component having variability and debugging support apparatus

Publications (2)

Publication Number Publication Date
JP2007102380A true JP2007102380A (en) 2007-04-19
JP4488227B2 JP4488227B2 (en) 2010-06-23

Family

ID=38029282

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005289245A Active JP4488227B2 (en) 2005-09-30 2005-09-30 Debugging method of control component having variability and debugging support apparatus

Country Status (1)

Country Link
JP (1) JP4488227B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2107457A2 (en) 2008-02-26 2009-10-07 Hitachi Ltd. Automatic software configuring system
WO2010013538A1 (en) 2008-07-29 2010-02-04 株式会社日立製作所 Software configuration management method and system
US8095880B2 (en) 2008-04-22 2012-01-10 International Business Machines Corporation System administration discussions indexed by system components
US8875104B2 (en) 2010-11-09 2014-10-28 International Business Machines Corporation Efficiently developing software using test cases to check the conformity of the software to the requirements
US10286481B2 (en) 2012-11-05 2019-05-14 Fluor Technologies Corporation FSW tool with graduated composition change

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2107457A2 (en) 2008-02-26 2009-10-07 Hitachi Ltd. Automatic software configuring system
US8387010B2 (en) 2008-02-26 2013-02-26 Hitachi, Ltd. Automatic software configuring system
US8095880B2 (en) 2008-04-22 2012-01-10 International Business Machines Corporation System administration discussions indexed by system components
US8589799B2 (en) 2008-04-22 2013-11-19 International Business Machines Corporation System administration discussions indexed by system components
WO2010013538A1 (en) 2008-07-29 2010-02-04 株式会社日立製作所 Software configuration management method and system
US8452742B2 (en) 2008-07-29 2013-05-28 Hitachi Automotive Systems, Ltd. Software configuration management method and system
US8875104B2 (en) 2010-11-09 2014-10-28 International Business Machines Corporation Efficiently developing software using test cases to check the conformity of the software to the requirements
US8875105B2 (en) 2010-11-09 2014-10-28 International Business Machines Corporation Efficiently developing software using test cases to check the conformity of the software to the requirements
US10286481B2 (en) 2012-11-05 2019-05-14 Fluor Technologies Corporation FSW tool with graduated composition change

Also Published As

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

Similar Documents

Publication Publication Date Title
Stănciulescu et al. Concepts, operations, and feasibility of a projection-based variation control system
US20110161938A1 (en) Including defect content in source code and producing quality reports from the same
CN109918081B (en) Compiling method and compiler
US8572583B2 (en) Method and system for testing software for industrial machine
JP4488227B2 (en) Debugging method of control component having variability and debugging support apparatus
KR20060120539A (en) Graphical programing device and programmable indicator
US20190012168A1 (en) Program generating apparatus
JP4488226B2 (en) Macro program that realizes highly functional ladder program
JP2009193181A (en) Software development support system and method, and program for the method
KR20190094779A (en) Automatically Generate Device for PLC Instruction Compiler Test-Case
CN110928760A (en) Unit testing method and device in embedded system
US20130111431A1 (en) Validation of a system model including an activity diagram
JP4888663B2 (en) Verification program automatic generation apparatus, method and program thereof
Thompson et al. An integrated development environment for prototyping safety critical systems
JP2016200872A (en) Control program creation device, control program debug method
Julius et al. A model-driven approach for transforming GRAFCET specification into PLC code including hierarchical structures
JP2007128455A (en) Program component attached data generating device
JP2011204069A (en) Testing method, and automatic test specification and test data generation apparatus
JP2007128456A (en) Program management device
JP7392821B2 (en) Automatic testing method and device for control software and computer program
JPH10293683A (en) Device for comparatively analyzing program, method therefor and mechanically readable recording medium recording comparative analytic program for program
EP4261678A1 (en) Generation of a technical instruction
JP4692452B2 (en) Program creation method of programmable controller
JP2010250598A (en) Program development support device
US7062400B2 (en) Apparatus and program for designing system LSI, and method for verifying integrity of the program for designing system LSI

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20080314

Free format text: JAPANESE INTERMEDIATE CODE: A621

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091126

A131 Notification of reasons for refusal

Effective date: 20091209

Free format text: JAPANESE INTERMEDIATE CODE: A131

A521 Written amendment

Effective date: 20100205

Free format text: JAPANESE INTERMEDIATE CODE: A523

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 (prs date is renewal date of database)

Year of fee payment: 3

Free format text: PAYMENT UNTIL: 20130409

R150 Certificate of patent (=grant) 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 (prs date is renewal date of database)

Year of fee payment: 3

Free format text: PAYMENT UNTIL: 20130409

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

Free format text: PAYMENT UNTIL: 20140409

Year of fee payment: 4