JP2008033913A - Program development support apparatus for plc - Google Patents

Program development support apparatus for plc Download PDF

Info

Publication number
JP2008033913A
JP2008033913A JP2007168054A JP2007168054A JP2008033913A JP 2008033913 A JP2008033913 A JP 2008033913A JP 2007168054 A JP2007168054 A JP 2007168054A JP 2007168054 A JP2007168054 A JP 2007168054A JP 2008033913 A JP2008033913 A JP 2008033913A
Authority
JP
Japan
Prior art keywords
program
variable
area
support apparatus
development support
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
JP2007168054A
Other languages
Japanese (ja)
Other versions
JP4735854B2 (en
Inventor
Yutaka Abe
裕 阿部
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 JP2007168054A priority Critical patent/JP4735854B2/en
Publication of JP2008033913A publication Critical patent/JP2008033913A/en
Application granted granted Critical
Publication of JP4735854B2 publication Critical patent/JP4735854B2/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 development support apparatus capable of simply and quickly performing operation for converting a part of an existing ladder program into an FB program. <P>SOLUTION: The program development support apparatus comprises an area selection means for optionally selecting an area in an existing ladder program which is required to be converted into an FB program, a guide picture display means for displaying a variable definition guide picture necessary for converting the ladder program of the area optionally selected by the area selection means into the FB program, and an FB program generation means for generating the FB program on the basis of the contents of respective variables defined through operation to be executed according to the guide picture displayed by the guide picture display means. On the guide picture displayed by the guide picture display means, the variable sorts of respective variables are previously defined by variable sort information found out through automatic judgment processing based on the operands of respective instructions included in the ladder program of the selected area and known information. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

この発明は、ファンクションブロック(以下、FBと称する)プログラムを含むラダープログラムを実行する機能を有するプログラマブルコントローラ(以下、PLCと称する)のプログラム開発支援装置に関する。   The present invention relates to a program development support apparatus for a programmable controller (hereinafter referred to as PLC) having a function of executing a ladder program including a function block (hereinafter referred to as FB) program.

IEC1131の普及やプログラムの部品化による再利用性の向上の必要性が高まるにつれて、FBを使用したPLCプログラムの作成が行われる場合が増えてきた(特許文献1参照)。その1つの流れとして、プログラム開発支援装置を使用して、既存のラダープログラムの一部分をFBプログラムに置き換える場合がある。   As the necessity of improving reusability by increasing the spread of IEC1131 and program componentization, the number of cases where PLC programs using FBs are created has increased (see Patent Document 1). As one flow, there is a case where a part of an existing ladder program is replaced with an FB program using a program development support apparatus.

このような場合におけるプログラム開発支援装置の操作手順が図10〜図12に示されている。なお、図10はラダー言語で作成されたユーザプログラムの画面表示例を示す図、図11は選択されたプログラム領域を含むユーザプログラムの画面表示例を示す図、図12はFBプログラム生成のための従来の案内画面の説明図である。   The operation procedure of the program development support apparatus in such a case is shown in FIGS. 10 is a diagram showing a screen display example of a user program created in a ladder language, FIG. 11 is a diagram showing a screen display example of a user program including a selected program area, and FIG. 12 is a diagram for generating an FB program. It is explanatory drawing of the conventional guidance screen.

いま仮に、図10に示されるように、プログラム開発支援装置を構成するコンピュータ(例えば、パソコン等)の画面上に、ラダー言語で作成されたユーザプログラム(以下、ラダープログラムと称する)が表示されているものと想定する。   As shown in FIG. 10, a user program (hereinafter referred to as a ladder program) created in a ladder language is displayed on the screen of a computer (for example, a personal computer) constituting the program development support apparatus. Assuming that

このときに、いわゆるマウスのドラッグ操作で、ラダープログラム中のFBプログラムに変換したい領域を選択すると、図11に示されるように、選択された領域aは他の領域と異なる色で表示された状態となる。   At this time, when a region to be converted into the FB program in the ladder program is selected by a so-called mouse drag operation, the selected region a is displayed in a different color from the other regions as shown in FIG. It becomes.

その後、FBプログラム生成のための案内画面上において、図12(b)に示されるように、選択されたラダープログラムをペースト処理すると、同図(a)に示されるように、同画面の別の領域には変数定義表が表示される。   Thereafter, when the selected ladder program is pasted on the guidance screen for generating the FB program as shown in FIG. 12B, another screen of the same screen is displayed as shown in FIG. A variable definition table is displayed in the area.

この変数定義表は、5個のタブTB1〜TB5によって選択可能な5つのページ画面を有している。それらのページ画面は、タブTB1に対応する内部変数(Internals)を定義するページ、タブTB2に対応する入力変数(Inputs)を定義するページ、タブTB3に対応する出力変数(Outputs)を定義するページ、タブTB4に対応する入出力変数(In Out)を定義するページ、及びタブTB5に対応する外部変数(Externals)を定義するページを含んでいる。   This variable definition table has five page screens that can be selected by using five tabs TB1 to TB5. These page screens are a page defining internal variables (Internals) corresponding to the tab TB1, a page defining input variables (Inputs) corresponding to the tab TB2, and a page defining output variables (Outputs) corresponding to the tab TB3. , A page defining an input / output variable (In Out) corresponding to the tab TB4, and a page defining an external variable (Externals) corresponding to the tab TB5.

ここで各変数について簡単に説明する。入力変数とは、ラダープログラム中のFBプログラムに変換したい領域内では、入力用途のオペランドに使用されている変数であり、かつ、領域外でも使用されている変数をFBプログラム内で扱う場合の変数の種別のことである。   Here, each variable will be briefly described. An input variable is a variable that is used as an operand for input purposes in an area that is to be converted to an FB program in a ladder program and that is used outside the area in the FB program. It is a type of.

出力変数とは、ラダープログラム中のFBプログラムに変換したい領域内では、出力用途のオペランドに使用されている変数であり、かつ、領域外でも使用されている変数をFBプログラム内で扱う場合の変数の種別のことである。   An output variable is a variable that is used as an operand for output within an area that is to be converted to an FB program in a ladder program and that is used outside the area in the FB program. It is a type of.

入出力変数とは、ラダープログラム中のFBプログラムに変換したい領域内では、入力および出力の両方の用途のオペランドに使用されている変数であり、かつ、領域外でも使用されている変数をFBプログラム内で扱う場合の変数の種別のことである。   An input / output variable is a variable that is used as an operand for both input and output in an area to be converted to an FB program in a ladder program, and a variable that is also used outside the area is an FB program. This is the type of variable when handled in the.

内部変数とは、ラダープログラム中のFBプログラムに変換したい領域内でのみ使用されている変数をFBプログラム内で扱う場合の変数の種別のことである。   The internal variable is a type of variable when a variable used only in an area to be converted into an FB program in the ladder program is handled in the FB program.

以上で説明した変数は、変数名と呼ばれるラベルを用いてプログラムに含まれる命令のオペランドとして使用される。   The variables described above are used as operands of instructions included in the program using labels called variable names.

図12(a)から明らかなように、選択領域に含まれる全ての命令(ラダープログラムの場合は、接点、コイル、各種の応用命令など)のオペランドに使用される変数名は、FBプログラム内において、仮に、内部変数として初期設定される。すなわち、図12(a)に示されるように、全ての変数名はタブTB1に対応する内部変数ページにまとめて表示される。   As is clear from FIG. 12A, the variable names used for the operands of all the instructions included in the selected area (in the case of a ladder program, contacts, coils, various application instructions, etc.) Temporarily set as an internal variable. That is, as shown in FIG. 12A, all variable names are displayed together on the internal variable page corresponding to the tab TB1.

一方、プログラム開発支援装置の側では、選択された領域内の全ての命令のオペランドに使用される変数名が、内部変数、入力変数、出力変数、入出力変数として適切に定義された場合に限り、その選択されたラダープログラムに対応するFBプログラムを正常に生成するように構成されている。   On the other hand, on the program development support device side, only when the variable names used for the operands of all instructions in the selected area are appropriately defined as internal variables, input variables, output variables, and input / output variables. The FB program corresponding to the selected ladder program is normally generated.

そのため、以後オペレータは、当初内部変数を定義するページに表示された全ての変数名を、1つ1つ確認しながら、適切な変数種別に割り当て、該当する種別ページへと転記するといった操作を行わねばならない。選択された領域内に存在する命令数が増加するにつれて、上述の割り振りないし転記作業は煩雑を極め、多大なる時間と労力を費やす結果となる。   Therefore, after that, the operator performs operations such as assigning to the appropriate variable type and posting to the corresponding type page while checking all the variable names initially displayed on the page defining the internal variable one by one. I have to. As the number of instructions existing in the selected area increases, the above-described allocation or transcription work becomes extremely complicated and results in a great deal of time and effort.

例えば、特定の命令のオペランドに使用される変数名が内部変数であるか外部変数であるかを確認するためには、その変数名が選択領域以外の他の領域に存在するか否かを確認せねばならない。これには膨大な時間と労力を要する。
特開2004−280341号公報
For example, to check whether a variable name used for an operand of a specific instruction is an internal variable or an external variable, check whether the variable name exists in a region other than the selected region I have to do it. This takes a lot of time and effort.
JP 2004-280341 A

上述の例からも明らかなように、従来のプログラム開発支援装置において、既存のラダープログラムの一部をFBプログラムに変換するためには、アドレスベースで作成されたラダープログラムを、変数ベースのFBプログラムに置き換える必要性から、(1)各命令オペランドに使用されているアドレスの変数名定義が必要であること、(2)各命令オペランドに使用されているアドレスの用途(入力、出力、入出力など)の決定が必要であること、といった非常に複雑な作業が要求されるという問題点があった。   As is clear from the above example, in order to convert a part of an existing ladder program into an FB program in the conventional program development support apparatus, the ladder program created on the basis of an address is changed to a variable-based FB program. (1) It is necessary to define the variable name of the address used for each instruction operand. (2) Use of the address used for each instruction operand (input, output, input / output, etc.) ) Is required to be very complicated.

この発明は、このような従来の問題点に着目してなされたものであり、その目的とするところは、既存のラダープログラムの一部をFBプログラムに変換するための操作を、簡単かつ迅速に行うことが可能なプログラム開発支援装置を提供することにある。   The present invention has been made paying attention to such a conventional problem, and its object is to easily and quickly perform an operation for converting a part of an existing ladder program into an FB program. An object of the present invention is to provide a program development support apparatus that can be performed.

この発明のさらに他の目的ならびに作用効果については、明細書の以下の記述を参照することにより、当業者であれば容易に理解されるであろう。   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.

上述の課題を解決するための手段としては、次のような構成を採用することができる。すなわち、このプログラム開発支援装置は、FBプログラムを含むラダープログラムを実行する機能を有するPLCのプログラム開発支援装置である。このプログラム開発支援装置には、既存のラダープログラム中のFBプログラムに変換したい領域を任意に選択するための領域選択手段と、領域選択手段により任意に選択された領域のラダープログラムをFBプログラムに変換するに必要な変数定義用の案内画面を表示する案内画面表示手段と、案内画面表示手段により表示された案内画面にしたがう操作を介して定義された各変数の内容に基づいてFBプログラムを生成するFBプログラム生成手段が設けられている。加えて、このプログラム開発支援装置にあっては、案内画面表示手段にて表示される案内画面においては、選択された領域のラダープログラム中に含まれる各命令のオペランドと既知の情報とに基づく自動判定処理を介して求められた変数種別情報により、各変数の変数種別があらかじめ定義済みとされている。   As means for solving the above-mentioned problems, the following configuration can be adopted. That is, this program development support apparatus is a PLC program development support apparatus having a function of executing a ladder program including an FB program. In this program development support apparatus, an area selection means for arbitrarily selecting an area to be converted into an FB program in an existing ladder program, and a ladder program in an area arbitrarily selected by the area selection means are converted into an FB program. An FB program is generated on the basis of the contents of each variable defined through a guide screen display means for displaying a guide screen for defining variables necessary for the operation and an operation according to the guide screen displayed by the guide screen display means. FB program generation means is provided. In addition, in this program development support device, the guidance screen displayed by the guidance screen display means is automatically based on the operands of each instruction included in the ladder program of the selected area and the known information. The variable type of each variable is defined in advance based on the variable type information obtained through the determination process.

このような構成によれば、FBプログラムの生成に必要な変数定義において、各変数の種別(例えば、内部変数、入力変数、出力変数、入出力変数、外部変数等々)については適切な内容に自動設定されるため、変数種別定義のための煩雑な操作からオペレータを解放することができる。しかも、各変数の変数種別定義のために使用される変数種別情報は、選択された領域のラダープログラム中に含まれる各命令のオペランドと既知の情報とに基づく自動判定処理を介して求められたものであるから、非常に信頼性が高いという利点もある。   According to such a configuration, in the variable definition necessary for generating the FB program, the type of each variable (for example, internal variable, input variable, output variable, input / output variable, external variable, etc.) is automatically set to an appropriate content. Thus, the operator can be freed from complicated operations for defining variable types. Moreover, the variable type information used for defining the variable type of each variable was obtained through an automatic determination process based on the operands of each instruction included in the ladder program of the selected area and known information. Therefore, there is an advantage that it is very reliable.

このとき、選択された領域のラダープログラム中に含まれる各命令のオペランドと既知の情報とに基づく自動判定処理によれば、変数種別情報のみならず各変数のデータ型情報についても求めることができるから、各変数のデータ型についても定義済みとすれば、オペレータの労力を一層軽減することができる。   At this time, according to the automatic determination process based on the operand of each instruction included in the ladder program of the selected area and the known information, not only the variable type information but also the data type information of each variable can be obtained. Therefore, if the data type of each variable is already defined, the labor of the operator can be further reduced.

また、このような変数種別情報自動定義処理に際しては、変数名の付されていないオペランドアドレスについては、自動生成された変数名を付与してもよく、このような構成によれば、ラダープログラム上に変数名が存在しない場合においても、自動生成された変数名を前提として、変数種別や変数のデータ型についても自動的に定義することができる。ここで、オペランドアドレスとは、命令のオペランドに使用されているアドレスのことである。FBプログラムに変換したい領域を含む既存のプログラム中に含まれる各命令のオペランドには、変数名または、アドレスが使用される。   In such variable type information automatic definition processing, an automatically generated variable name may be assigned to an operand address not assigned a variable name. According to such a configuration, the ladder program Even if there is no variable name in the field, the variable type and the data type of the variable can be automatically defined on the assumption of the automatically generated variable name. Here, the operand address is an address used for the operand of the instruction. A variable name or address is used as an operand of each instruction included in an existing program including an area to be converted into an FB program.

以上の構成において、自動判定処理に利用される「既知の情報」としては、各命令のオペランドとその用途との関係を示す情報を利用することができ、一般にこの種のプログラム開発支援装置においては、このような情報がクロスリファレンスリストとして用意されているのが通例である。   In the above configuration, as the “known information” used for the automatic determination process, information indicating the relationship between the operand of each instruction and its use can be used. Generally, in this type of program development support apparatus, Such information is usually prepared as a cross-reference list.

本発明のプログラム開発支援装置によれば、既存のラダープログラムの一部を利用してFBプログラムを生成するための操作を著しく簡単なものとすることができる。   According to the program development support apparatus of the present invention, an operation for generating an FB program using a part of an existing ladder program can be remarkably simplified.

以下に、この発明に係るプログラム開発支援装置の好適な実施の一形態を添付図面を参照しながら詳細に説明する。   Hereinafter, a preferred embodiment of a program development support apparatus according to the present invention will be described in detail with reference to the accompanying drawings.

本発明に係るプログラム開発支援装置を含むPLCシステムの一例を示す外観構成図が図1に示されている。同図に示されるように、このPLCシステムは、PLC1とプログラム開発支援装置2とを通信ケーブル5を介して接続して構成されている。PLC1はこの例ではバックプレーン3を有するビルディングブロックタイプに構成されている。より具体的には、このPLC1は、電源ユニット10と、CPUユニット12と、I/Oユニット13と、特殊機能ユニット14とを含んでいる。PLC1を構成するCPUユニット12は、この例にあっては、FBプログラムを含むラダープログラムを実行する機能を有している。   FIG. 1 is an external configuration diagram showing an example of a PLC system including a program development support apparatus according to the present invention. As shown in the figure, the PLC system is configured by connecting a PLC 1 and a program development support apparatus 2 via a communication cable 5. In this example, the PLC 1 is configured as a building block type having a backplane 3. More specifically, the PLC 1 includes a power supply unit 10, a CPU unit 12, an I / O unit 13, and a special function unit 14. In this example, the CPU unit 12 constituting the PLC 1 has a function of executing a ladder program including an FB program.

一方、プログラム開発支援装置2は、パソコン等の汎用コンピュータに、プログラム開発支援装置としてのアプリケーションプログラムをインストールすることによって構成されている。   On the other hand, the program development support apparatus 2 is configured by installing an application program as a program development support apparatus in a general-purpose computer such as a personal computer.

後に詳細に説明するように、このアプリケーションプログラムには、既存のラダープログラム中のFBプログラムに置換したい領域を任意に選択するための領域選択手段と、領域選択手段により任意に選択された領域のラダープログラムをFBプログラムに置換するに必要な変数定義用の案内画面を表示する案内画面表示手段と、案内画面表示手段により表示された案内画面にしたがう操作を介して定義された各変数名の内容に基づいてFBプログラムを生成するFBプログラム生成手段としてのプログラムが含まれている。   As will be described in detail later, this application program includes an area selection means for arbitrarily selecting an area to be replaced with an FB program in an existing ladder program, and a ladder of an area arbitrarily selected by the area selection means. The guide screen display means for displaying a guide screen for defining variables necessary for replacing the program with the FB program, and the contents of each variable name defined through the operation according to the guide screen displayed by the guide screen display means A program as FB program generation means for generating an FB program based on the program is included.

加えて、案内画面表示手段にて表示される案内画面においては、選択された領域のラダープログラム中に含まれる各命令のオペランドと既知の情報とに基づく自動判定処理を介して求められた変数種別情報により、各変数の変数種別があらかじめ定義済みとされるようにプログラム構成されている。   In addition, in the guidance screen displayed by the guidance screen display means, the variable type obtained through the automatic determination process based on the operand of each instruction and the known information included in the ladder program of the selected area The program is configured so that the variable type of each variable is defined in advance by the information.

次に、本発明に係るプログラム開発支援装置において、既存のラダープログラムの一部をFBプログラムに変換するための操作について説明する。   Next, an operation for converting a part of an existing ladder program into an FB program in the program development support apparatus according to the present invention will be described.

プログラム開発支援装置2を構成するパソコンの画面上において、FBプログラムに変換したいラダープログラム部分を選択した後(図10及び図11参照)、図4(b)に示されるように、FBプログラム生成支援のための案内画面上において所定領域に選択されたラダープログラム部分をペーストすると、同図(a)に示されるように、選択された領域内に含まれる変数名は、変数定義表へ格納され、また、画面上に表示される。   After selecting a ladder program portion to be converted into an FB program on the screen of a personal computer constituting the program development support apparatus 2 (see FIG. 10 and FIG. 11), as shown in FIG. 4B, FB program generation support When the selected ladder program part is pasted on the predetermined area on the guidance screen for the variable name included in the selected area is stored in the variable definition table, as shown in FIG. Also displayed on the screen.

ここで、図4(a)に示される変数定義表と図12(a)に示される変数定義表とを比較して明らかなように、本発明の場合には、選択されたプログラム領域に含まれる各命令に使用される変数名は、それぞれ適切な変数種別に割り振られた後、変数定義表へ格納され、また、画面上に表示される。   Here, as is clear from comparison between the variable definition table shown in FIG. 4A and the variable definition table shown in FIG. 12A, in the present invention, the variable definition table is included in the selected program area. The variable name used for each instruction is assigned to an appropriate variable type, stored in the variable definition table, and displayed on the screen.

なお、図4(a)の例にあっては、タブTB1に対応する内部変数を定義するページが開かれた状態にあるため、他のページについては記述内容が見えないが、図5(a)〜(c)に示されるように、入力変数を定義するページ、出力変数を定義するページ、入出力変数を定義するページのそれぞれにも、該当する変数名が適切に割り振られて格納され、また、画面上に表示される。   In the example of FIG. 4A, since the page defining the internal variable corresponding to the tab TB1 is in an open state, the description content cannot be seen for the other pages, but FIG. ) To (c), the variable name is appropriately allocated and stored in each of the page defining the input variable, the page defining the output variable, and the page defining the input / output variable, Also displayed on the screen.

このように、本発明のプログラム開発支援装置によれば、既存のラダープログラムが表示された状態において、マウスを用いて領域選択のためのドラッグ操作を行い、これをFBプログラム生成支援のための案内画面上において所定位置にペーストすれば、直ちに変数種別の自動割り振り作業が実行されて、それらの変数名は該当する種別の変数定義表へ格納され、また、画面上に表示される。   Thus, according to the program development support apparatus of the present invention, in the state where the existing ladder program is displayed, a drag operation for selecting an area is performed using the mouse, and this is used as a guide for supporting the FB program generation. When pasting at a predetermined position on the screen, the variable type automatic allocation work is immediately executed, and the variable names are stored in the variable definition table of the corresponding type and displayed on the screen.

しかも、各変数種別を定義するページについて見ると、各変数種別の属性として、データ型(Data Type)、現在値(AT)、初期値(Initial Val...)、保持の有無(Retain...)の中で、データ型と初期値については、同様に定義済みとされている。   Moreover, looking at the page that defines each variable type, the attributes of each variable type include data type (Data Type), current value (AT), initial value (Initial Val ...), presence / absence of retention (Retain ...). .)), The data type and initial value are defined in the same way.

そのため、本発明のプログラム開発支援装置によれば、既存のラダープログラムの一部をFBプログラムに変換するための操作としては、ドラッグ操作の他には、僅かな属性項目について必要な値を記述するだけで済み、特に、変数種別の割り振りが既に定義済みであることから、従前のように、変数種別を確認するために、プログラム全体を調べ上げるといった煩雑な作業が不要となって、この種の操作を著しく簡素化することができる。変数種別の割り振りの概念が図3に示されている。   Therefore, according to the program development support apparatus of the present invention, as an operation for converting a part of an existing ladder program into an FB program, in addition to a drag operation, necessary values for a few attribute items are described. In particular, since the allocation of variable types has already been defined, it is no longer necessary to check the entire program to check the variable types as before. The operation can be greatly simplified. The concept of variable type allocation is shown in FIG.

次に、以上の操作を実現するために、パソコンにインストールされるアプリケーションプログラムの構成を、図6及び図7のフローチャートを中心として説明する。   Next, in order to realize the above operation, the configuration of the application program installed in the personal computer will be described with reference to the flowcharts of FIGS.

オペランドの変数割付処理を示すフローチャートが図6に示されている。同図において処理が開始されると、まず、ステップ601では、マウスのドラッグ操作を介して、FB化する回路を選択する。続くステップ602では、FB化する機能開始のための所定の前処理(フラグやレジスタの初期設定など)を実行する。続くステップ603では、新規FBの作成のための処理を行う。この処理によって、メモリ内のFBプログラム作成領域が定義され、ここにFB変数(FBプログラム内で使用される変数)を登録するための変数定義表が作成され、以後登録されていく。   A flowchart showing the variable allocation process of the operand is shown in FIG. When the process is started in the figure, first, in step 601, a circuit to be converted into an FB is selected through a mouse drag operation. In the subsequent step 602, predetermined preprocessing (such as initial setting of flags and registers) for starting the function to be converted to FB is executed. In the subsequent step 603, processing for creating a new FB is performed. By this processing, an FB program creation area in the memory is defined, and a variable definition table for registering FB variables (variables used in the FB program) is created here, and is subsequently registered.

続くステップ604では、ラダープログラム中より選択回路内1命令の取得が行われる(ステップ604)。続くステップ605においては、取得された1命令に対応する命令データが命令仕様データベース(DB)から取得され、その1命令の構造が解析される。続くステップ606では、命令仕様DB内のオペランドデータからオペランドのデータ型が取得される。このようにステップ604〜606を通じて、ラダープログラム内の選択された領域から取得された1命令について、その内容が解析される。   In subsequent step 604, one instruction in the selection circuit is acquired from the ladder program (step 604). In the subsequent step 605, instruction data corresponding to the acquired one instruction is acquired from the instruction specification database (DB), and the structure of the one instruction is analyzed. In the subsequent step 606, the data type of the operand is acquired from the operand data in the instruction specification DB. In this way, through steps 604 to 606, the contents of one instruction acquired from the selected area in the ladder program are analyzed.

しかる後、その取得された1命令についてその命令のオペランドとして変数名の有無がチェックされる(ステップ607)。ここで変数名なしと判定されれば(この場合は、オペランドとして変数名ではなくアドレスが使用されている)、ステップ608へと進んで、変数名の自動生成処理が行われる。この変数名の自動生成処理においては、図2に示されるように、「名称なしの変数」から「“AutoGen_”+アドレス」のように、自動生成された変数名称がそのアドレスに付されることとなる。なお、ステップ607で変数名ありの場合には、ステップ608はスキップされる。   Thereafter, it is checked whether or not there is a variable name as an operand of the acquired instruction (step 607). If it is determined that there is no variable name (in this case, an address is used instead of a variable name as an operand), the process proceeds to step 608, and automatic variable name generation processing is performed. In this variable name automatic generation processing, as shown in FIG. 2, an automatically generated variable name such as “AutoGen _” + address ”is attached to the address from“ unnamed variable ”to“ address ”. It becomes. If there is a variable name in step 607, step 608 is skipped.

続くステップ609では、ラダープログラムからオペランドの取得が行われる。続くステップ610では、取得されたオペランドに基づいて、そのオペランドの用途の確認処理が行われる。これにより、取得されたオペランドの用途(入力、出力、入出力など)が確認される結果、これに基づいて、変数種別情報が生成される。なお、このオペランドの用途確認処理(ステップ610)の詳細については、後に、図7を参照して詳細に説明する。   In the subsequent step 609, an operand is acquired from the ladder program. In the subsequent step 610, based on the acquired operand, the usage of the operand is confirmed. As a result, the usage (input, output, input / output, etc.) of the acquired operand is confirmed, and based on this, variable type information is generated. The details of the operand use confirmation process (step 610) will be described later in detail with reference to FIG.

続くステップ611では、以上の処理で得られた情報に基づいて、FB内変数の生成が行われ、メモリ内の該当する記憶領域(変数定義表が格納される領域)へと格納される。   In the subsequent step 611, based on the information obtained by the above processing, the FB variable is generated and stored in the corresponding storage area in the memory (area in which the variable definition table is stored).

以上説明したステップ604〜611の処理が、選択されたラダー回路内の最後の命令に至るまで繰り返し実行される(ステップ612)。   The processes in steps 604 to 611 described above are repeatedly executed until the last instruction in the selected ladder circuit is reached (step 612).

次に、オペランドの用途確認処理を示すフローチャートが図7に示されている。同図において処理が開始されると、まずステップ701においては、ラダープログラムから全体プログラム内1命令の取得が行われる。続くステップ702においては、同様にラダープログラムから、命令のオペランドの取得が行われる。以後、こうして取得されたオペランドと図6のステップ609で取得されたオペランドとの一致が確認されるまで、以上の1命令取得及びオペランド取得処理が繰り返し実行される(ステップ701,702)。   Next, FIG. 7 shows a flowchart showing the usage confirmation process of the operand. When the processing is started in the figure, first, in step 701, one instruction in the entire program is acquired from the ladder program. In the subsequent step 702, similarly, the operand of the instruction is acquired from the ladder program. Thereafter, the above-described one instruction acquisition and operand acquisition process is repeatedly executed until a match between the operand acquired in this way and the operand acquired in step 609 in FIG. 6 is confirmed (steps 701 and 702).

その間に、全体プログラム内1命令のオペランドと選択回路内命令のオペランドとの一致が確認されると(ステップ703YES)、続いてステップ704が実行されて、命令のオペランドの用途(入力/出力/入出力)の取得が命令データに基づき行われる。この命令データは、命令仕様データベースDBから取得される。続くステップ705では、ステップ701で取得された1命令が、選択範囲の命令であるか否かの判定が行われる。ここで、選択範囲の命令である場合にはステップ706へと進むのに対し、選択範囲の命令ではない場合にはステップ707へと進む。   In the meantime, if a match between the operand of one instruction in the entire program and the operand of the instruction in the selection circuit is confirmed (YES in step 703), then step 704 is executed, and the usage of the instruction operand (input / output / input) Output) is obtained based on the instruction data. This instruction data is acquired from the instruction specification database DB. In the subsequent step 705, it is determined whether or not one instruction acquired in step 701 is an instruction in the selected range. If the command is a selection range command, the process proceeds to step 706. If the command is not a selection range command, the process proceeds to step 707.

ステップ706においては、用途が入力とされる場合には、選択範囲内入力フラグはONとされる。また、用途が出力とされる場合には、選択範囲内出力フラグはONとされる。さらに用途が入出力とされる場合、選択範囲内入力フラグはONとされ且つ選択範囲内出力フラグについてもONとされる。   In step 706, when the usage is input, the in-selection range input flag is turned ON. When the usage is output, the output flag within the selection range is set to ON. Further, when the application is input / output, the input flag within the selection range is turned ON and the output flag within the selection range is also turned ON.

一方、ステップ707においては、用途が入力の場合、選択範囲外入力フラグはONとされる。用途が出力の場合、選択範囲外出力フラグはONとされる。用途が入出力の場合、選択範囲外入力フラグはONとされ且つ選択範囲外出力フラグについてもONとされる。   On the other hand, in step 707, when the usage is input, the out-of-selection range input flag is turned ON. When the usage is output, the output flag outside the selection range is set to ON. When the usage is input / output, the out-of-selection-area input flag is turned on and the out-of-selection-area output flag is also turned on.

以上の処理ステップ701〜707が、全体プログラムの最後の命令に至るまで繰り返され、全体プログラムの最後の命令が到来するのを待って、図8のテーブルに基づき用途の決定処理が実行される(ステップ709)。   The above processing steps 701 to 707 are repeated until the last instruction of the entire program is reached, and the use determination process is executed based on the table of FIG. 8 after waiting for the last instruction of the entire program to arrive ( Step 709).

この用途決定処理(ステップ709)においては、図8に示される参照テーブルに従って、選択回路外または選択回路内別に、内部変数、入力変数、出力変数、入出力変数の別の割り振りが行われる。   In this use determination process (step 709), internal variables, input variables, output variables, and input / output variables are separately allocated outside or outside the selection circuit according to the reference table shown in FIG.

次に、図6のステップ611に相当するFB内変数の生成処理を示すフローチャートが図9に示されている。同図に示されるように、処理が開始されると、新規FB内変数の生成処理(ステップ901)、取得したオペランドデータ型をFB変数に登録する処理(ステップ902)、変数名をFB変数に登録する処理(ステップ903)及び決定した用途をFB変数に登録する処理(ステップ904)が実行され、その結果新規FB変数が生成ないし定義されることになるのである。ここでFB変数に登録するとは変数定義表に登録することを意味している。   Next, FIG. 9 shows a flowchart showing a process for generating a variable in the FB corresponding to step 611 in FIG. As shown in the figure, when the process is started, a new FB variable generation process (step 901), the acquired operand data type is registered in the FB variable (step 902), and the variable name is converted into the FB variable. A process of registering (step 903) and a process of registering the determined use in the FB variable (step 904) are executed, and as a result, a new FB variable is generated or defined. Here, registering in the FB variable means registering in the variable definition table.

以上説明したように、図6に示されるオペランド変数割付処理、図7に示されるオペランドの用途確認処理、図9に示されるFB内変数の生成処理が実行されることによって、オペレータは、ラダープログラム全体の中から任意のプログラム領域を選択し、これをFBプログラム生成のための案内画面上にペーストするだけで、その選択領域に含まれた各命令に対応する変数を自動的に定義させることができ、これにより従前の人手に頼った命令種別確認操作に比べ、この種のFB化操作を著しく簡便なものとすることができる。   As described above, the operator can execute a ladder program by executing the operand variable assignment process shown in FIG. 6, the operand use confirmation process shown in FIG. 7, and the FB variable generation process shown in FIG. By selecting an arbitrary program area from the whole and pasting it on the guidance screen for generating the FB program, variables corresponding to each command included in the selected area can be automatically defined. This makes it possible to remarkably simplify this type of FB conversion operation as compared with a command type confirmation operation that relies on a conventional manual operation.

本発明によれば、既存のラダープログラムの一部を利用してFBプログラムを生成するための操作を著しく簡単なものとすることができる。   According to the present invention, an operation for generating an FB program using a part of an existing ladder program can be remarkably simplified.

本発明に係る開発支援装置を含むPLCシステムの一例を示す外観構成図である。It is an external appearance block diagram which shows an example of the PLC system containing the development assistance apparatus which concerns on this invention. 本発明装置の作用説明図である。It is operation | movement explanatory drawing of this invention apparatus. 変数種別の割り振りの概念を示す図である。It is a figure which shows the concept of allocation of a variable classification. FBプログラム生成支援のための案内画面の説明図(その1)である。It is explanatory drawing (the 1) of the guidance screen for FB program generation assistance. FBプログラム生成支援のための案内画面の説明図(その2)である。It is explanatory drawing (the 2) of the guidance screen for FB program generation assistance. オペランドの変数割付処理を示すフローチャートである。It is a flowchart which shows the variable allocation process of an operand. オペランドの用途確認処理を示すフローチャートである。It is a flowchart which shows the usage confirmation process of an operand. 用途決定のための参照テーブルの説明図である。It is explanatory drawing of the reference table for a use determination. FB内変数の生成処理を示すフローチャートである。It is a flowchart which shows the production | generation process of the variable in FB. ラダー言語で作成されたユーザプログラムの画面表示例を示す図である。It is a figure which shows the example of a screen display of the user program produced with the ladder language. 選択されたプログラム領域を含むユーザプログラムの画面表示例を示す図である。It is a figure which shows the example of a screen display of the user program containing the selected program area | region. FBプログラム生成のための従来の案内画面の説明図である。It is explanatory drawing of the conventional guidance screen for FB program production | generation.

符号の説明Explanation of symbols

1 PLC
2 プログラム開発支援装置
a 選択領域
TB1〜TB5 タブ
1 PLC
2 Program development support device a Selection area TB1-TB5 Tab

Claims (4)

FBプログラムを含むラダープログラムを実行する機能を有するPLCのプログラム開発支援装置であって、
既存のラダープログラム中のFBプログラムに変換したい領域を任意に選択するための領域選択手段と、
領域選択手段により任意に選択された領域のラダープログラムをFBプログラムに変換するに必要な変数定義用の案内画面を表示する案内画面表示手段と、
案内画面表示手段により表示された案内画面にしたがう操作を介して定義された各変数の内容に基づいてFBプログラムを生成するFBプログラム生成手段とを有し、かつ
案内画面表示手段にて表示される案内画面においては、選択された領域のラダープログラム中に含まれる各命令のオペランドと既知の情報とに基づく自動判定処理を介して求められた変数種別情報により、各変数の変数種別が予め定義済みとされている、
ことを特徴とするPLCのプログラム開発支援装置。
A PLC program development support apparatus having a function of executing a ladder program including an FB program,
An area selection means for arbitrarily selecting an area to be converted into an FB program in an existing ladder program;
Guidance screen display means for displaying a guidance screen for variable definition necessary for converting a ladder program of an area arbitrarily selected by the area selection means into an FB program;
FB program generating means for generating an FB program based on the contents of each variable defined through an operation according to the guide screen displayed by the guide screen display means, and displayed on the guide screen display means In the guidance screen, the variable type of each variable has been defined in advance based on the variable type information obtained through the automatic determination process based on the operand of each instruction included in the ladder program of the selected area and the known information. It is said that
A program development support apparatus for PLC.
各変数の変数種別に加えて、各変数のデータ型についても定義済みとされている、ことを特徴とする請求項1に記載のPLCのプログラム開発支援装置。   2. The PLC program development support apparatus according to claim 1, wherein the data type of each variable is already defined in addition to the variable type of each variable. 変数名の付されていないオペランドアドレスについては、自動生成された変数名が付与される、ことを特徴とする請求項1又は2に記載のPLCのプログラム開発支援装置。   3. The PLC program development support apparatus according to claim 1, wherein an automatically generated variable name is assigned to an operand address not assigned a variable name. 既知の情報が、各命令のオペランドとその用途との関係を示す情報である、ことを特徴とする請求項1〜3のいずれかに記載のPLCのプログラム開発支援装置。   4. The PLC program development support apparatus according to claim 1, wherein the known information is information indicating a relationship between an operand of each instruction and its use.
JP2007168054A 2006-06-26 2007-06-26 PLC program development support device Active JP4735854B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007168054A JP4735854B2 (en) 2006-06-26 2007-06-26 PLC program development support device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2006175334 2006-06-26
JP2006175334 2006-06-26
JP2007168054A JP4735854B2 (en) 2006-06-26 2007-06-26 PLC program development support device

Publications (2)

Publication Number Publication Date
JP2008033913A true JP2008033913A (en) 2008-02-14
JP4735854B2 JP4735854B2 (en) 2011-07-27

Family

ID=39123205

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007168054A Active JP4735854B2 (en) 2006-06-26 2007-06-26 PLC program development support device

Country Status (1)

Country Link
JP (1) JP4735854B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016062126A (en) * 2014-09-12 2016-04-25 富士電機株式会社 Program convert device
JP2016200872A (en) * 2015-04-07 2016-12-01 株式会社東芝 Control program creation device, control program debug method
JPWO2014136185A1 (en) * 2013-03-04 2017-02-09 三菱電機株式会社 Program development support apparatus and method
WO2020184195A1 (en) 2019-03-12 2020-09-17 オムロン株式会社 Ladder diagram program creation assistance device, ladder diagram program creation assistance method, and ladder diagram program creation assistance program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044108A (en) * 2001-07-31 2003-02-14 Digital Electronics Corp Registering device for editor, registering program, and recording medium where the same is recorded
JP2004341824A (en) * 2003-05-15 2004-12-02 Fuji Electric Fa Components & Systems Co Ltd Programming device of programmable controller

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044108A (en) * 2001-07-31 2003-02-14 Digital Electronics Corp Registering device for editor, registering program, and recording medium where the same is recorded
JP2004341824A (en) * 2003-05-15 2004-12-02 Fuji Electric Fa Components & Systems Co Ltd Programming device of programmable controller

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2014136185A1 (en) * 2013-03-04 2017-02-09 三菱電機株式会社 Program development support apparatus and method
JP2016062126A (en) * 2014-09-12 2016-04-25 富士電機株式会社 Program convert device
JP2016200872A (en) * 2015-04-07 2016-12-01 株式会社東芝 Control program creation device, control program debug method
WO2020184195A1 (en) 2019-03-12 2020-09-17 オムロン株式会社 Ladder diagram program creation assistance device, ladder diagram program creation assistance method, and ladder diagram program creation assistance program
US11853025B2 (en) 2019-03-12 2023-12-26 Omron Corporation Ladder diagram program creation assistance device, ladder diagram program creation assistance method, and non-transitory computer readable recording medium

Also Published As

Publication number Publication date
JP4735854B2 (en) 2011-07-27

Similar Documents

Publication Publication Date Title
CN108351764B (en) Data processing method and system
US9619211B2 (en) Code suggestion in a software development tool
US10033835B2 (en) System, method, and device for remotely operating a server
US8407661B2 (en) Method and system for creating HMI applications for an automation process
US20090055757A1 (en) Solution for automatically generating software user interface code for multiple run-time environments from a single description document
JP5798552B2 (en) Method, system and computer program for screen capture
CN104317589A (en) Automatic code generating method and automatic code generating device for loading dynamic link library
RU2639667C2 (en) Context invitation in trial version of application
JP2006119884A (en) Editing apparatus of sequence program
JP4735854B2 (en) PLC program development support device
US8701086B2 (en) Simplifying analysis of software code used in software systems
CN115220709A (en) VUE page editing method, system and computer readable storage medium
CN115469849B (en) Service processing system, method, electronic equipment and storage medium
CN106547528B (en) Interface layout method and device
WO2022180704A1 (en) Display control device, display control method, and display control program
JP4767309B2 (en) Information processing apparatus, information processing method, and computer program
CN104216706A (en) Browsing method of Modelica model
CN109656556B (en) Method and device for generating self-adaptive page
JP5657183B2 (en) Method and apparatus for enabling a first computer program to execute application logic of a second computer program, for interfacing the first computer program and the second computer program And apparatus for generating computer program code for the same, a computer program, and a software interface for enabling a first computer program to execute application logic of a second computer program For providing information (computer program interface)
JP7208441B1 (en) FA control test support program, FA control test support device, FA control test support method and FA control test support system
JP5983397B2 (en) Analytical instrument control device and program for analytical instrument control device
CN109976765B (en) Application group deployment method, device, equipment and storage medium
JP2018156214A (en) SFC program creation support apparatus, SFC program creation support program, and SFC program creation method
JP2010250826A (en) Device and method for setting workflow
US20170316447A1 (en) Method and System for Supporting Intelligent Export and Integration of Analytic System Data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110114

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110412

R150 Certificate of patent or registration of utility model

Ref document number: 4735854

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140513

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250