JP2010049484A - Program edit device of programmable logic controller - Google Patents

Program edit device of programmable logic controller Download PDF

Info

Publication number
JP2010049484A
JP2010049484A JP2008213066A JP2008213066A JP2010049484A JP 2010049484 A JP2010049484 A JP 2010049484A JP 2008213066 A JP2008213066 A JP 2008213066A JP 2008213066 A JP2008213066 A JP 2008213066A JP 2010049484 A JP2010049484 A JP 2010049484A
Authority
JP
Japan
Prior art keywords
program
worksheet
variable
local
global
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.)
Pending
Application number
JP2008213066A
Other languages
Japanese (ja)
Inventor
Eizo Nakano
栄造 中野
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.)
Okuma Corp
Original Assignee
Okuma Corp
Okuma Machinery Works Ltd
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 Okuma Corp, Okuma Machinery Works Ltd filed Critical Okuma Corp
Priority to JP2008213066A priority Critical patent/JP2010049484A/en
Publication of JP2010049484A publication Critical patent/JP2010049484A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce edit errors by automatically changing, registering and deleting variables in dividing/combining program organization units (POUs), in a device for editing a sequence program of a programmable logic controller for each POU. <P>SOLUTION: In dividing POUs, a POU division/combination control part 160 adds a local variable shared by divided POUs to a global variable worksheet as a global variable and registers the added global variable in a divided local variable worksheet as an external reference variable. In combining POUs, the POU division/combination control part 160 converts the global variable shared as the external reference variable only by POUs before combination into a local variable, registers the converted local variable in a combined local variable worksheet and deletes the global variable from the global variable worksheet. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、プログラマブル・ロジック・コントローラのシーケンスプログラムをプログラム構成要素単位で編集する装置に関し、特に、プログラム構成要素の分割/結合を行うプログラム編集装置に関する。   The present invention relates to an apparatus for editing a sequence program of a programmable logic controller in units of program components, and more particularly to a program editing device for dividing / combining program components.

従来、プログラマブル・ロジック・コントローラ(以下PLCと略す)が実行するシーケンスプログラムをプログラム構成要素(Program Organization Unit:以下POUと略す)を単位として作成し、編集する技術が知られている。ここで、POUは、ロジックを定義するプログラムワークシートと、プログラムワークシートで使用されている変数をローカル変数として登録するローカル変数ワークシートとで構成される。複数のPOUが参照する変数は、グローバル変数としてグローバル変数ワークシートに登録され、それぞれのPOUのローカル変数ワークシートに外部参照変数として登録される。   2. Description of the Related Art Conventionally, a technique for creating and editing a sequence program executed by a programmable logic controller (hereinafter abbreviated as PLC) in units of program components (Program Organization Unit: hereinafter abbreviated as POU) is known. Here, the POU is composed of a program worksheet for defining logic and a local variable worksheet for registering variables used in the program worksheet as local variables. Variables referred to by a plurality of POUs are registered as global variables in the global variable worksheet, and are registered as external reference variables in the local variable worksheet of each POU.

POUは機能のまとまり毎に作成することが望ましいため、従来、プログラムを育成するにあたり、一つのPOUを複数に分割したり、逆に複数のPOUを一つに結合したりする編集装置が提案されている。例えば、特許文献1には、一つのPOUを複数に分割し、分割後のPOUを複数のPLCに割り当てるプログラミングツールが記載されている。特許文献2には、複数のPOUを一つに結合し、結合後のPOUに対するメモリの参照情報であるクロスリファレンスを自動生成するプログラム作成装置が記載されている。
特開平10−333721号公報 特開平11−85232号公報
Since it is desirable to create a POU for each function group, conventionally, when developing a program, an editing apparatus that divides one POU into a plurality of parts or conversely combines a plurality of POUs into one has been proposed. ing. For example, Patent Document 1 describes a programming tool that divides one POU into a plurality of parts and assigns the divided POUs to a plurality of PLCs. Patent Document 2 describes a program creation apparatus that combines a plurality of POUs into one and automatically generates a cross reference, which is memory reference information for the combined POUs.
Japanese Patent Laid-Open No. 10-333721 JP-A-11-85232

図12は、従来のプログラム編集装置の全体的な構成を示す。この編集装置100では、バス110にCPU120、ワークメモリ130、キーボードやマウス等の入力装置140、表示装置等の出力装置150、POU編集制御部170、PLCプログラムメモリ180が接続されている。PLCプログラムメモリ180には、POU181のプログラムワークシート182およびローカル変数ワークシート183と、グローバル変数ワークシート184とが格納されている。   FIG. 12 shows the overall configuration of a conventional program editing apparatus. In the editing apparatus 100, a CPU 120, a work memory 130, an input device 140 such as a keyboard and a mouse, an output device 150 such as a display device, a POU editing control unit 170, and a PLC program memory 180 are connected to a bus 110. The PLC program memory 180 stores a program worksheet 182 and local variable worksheet 183 of the POU 181 and a global variable worksheet 184.

POU編集制御部170は、プログラムワークシート182、ローカル変数ワークシート183、グローバル変数ワークシート184をプログラムメモリ180から読み出し、出力装置150の表示部に表示し、入力装置140からの編集操作を受け付ける。そして、プログラム編集者が入力装置140を操作し、プログラムワークシート182とローカル変数ワークシート183のコピー/カット/ペーストをワークシート単位またはシンボル単位で繰り返し、POU181の分割/結合を行うようになっている。   The POU editing control unit 170 reads the program worksheet 182, the local variable worksheet 183, and the global variable worksheet 184 from the program memory 180, displays them on the display unit of the output device 150, and accepts editing operations from the input device 140. Then, the program editor operates the input device 140 and repeats copy / cut / paste of the program worksheet 182 and the local variable worksheet 183 in units of worksheets or symbols, thereby dividing / combining the POU 181. Yes.

ところで、POU181の分割にあたり、ローカル変数ワークシート183をコピーすると、分割後のプログラムワークシートで使用しないローカル変数もコピーされてしまうため、不用な変数を取り除く必要がある。また、分割後に複数のPOUで共用されるグローバル変数はグローバル変数ワークシートに追加し、外部参照変数に変更して分割後の複数のローカル変数ワークシートに登録する必要がある。POUの結合にあたっては、結合後のPOUで使用するローカル変数をプログラムワークシートから抽出してローカル変数ワークシートを作成し、結合前のPOUでのみ共用されていたグローバル変数をローカル変数に変更してローカル変数ワークシート登録し、かつグローバル変数ワークシートから削除する必要もある。   By the way, when the local variable worksheet 183 is copied when dividing the POU 181, local variables that are not used in the divided program worksheet are also copied, so it is necessary to remove unnecessary variables. Further, a global variable shared by a plurality of POUs after division must be added to the global variable worksheet, changed to an external reference variable, and registered in a plurality of divided local variable worksheets. When combining POUs, create local variable worksheets by extracting the local variables used in the combined POUs from the program worksheet, and change the global variables that were shared only in the POUs prior to combining to local variables. It is also necessary to register the local variable worksheet and delete it from the global variable worksheet.

しかし、従来のプログラム編集装置100によると、こうした変数の変更、登録、削除を編集者の手作業で行っていた。このため、POUを分割/結合する前に、多くのワークシートを照合し、変数の使われ方を判断し、ワークシートのコピー/カット/ペーストを行い、変数を変更、登録、削除した後に、ワークシートを再度照合し、変数の適否を判断し、不適当な場合に一連の作業を繰り返す必要があった。したがって、プログラムの編集作業に手間と時間がかかるうえ、編集ミスが起きやすいという問題があった。特に、変数の登録を変更するときには、ローカル変数とグローバル変数の区別を間違えやすいため、PLCの誤動作を招く可能性が高くなるという問題もあった。   However, according to the conventional program editing apparatus 100, such change, registration, and deletion of variables are performed manually by the editor. For this reason, before dividing / combining POUs, many worksheets are collated, how variables are used, copy / cut / paste worksheets, variables are changed, registered, and deleted, It was necessary to collate the worksheets again, determine whether the variables are appropriate, and repeat a series of operations if they are not appropriate. Therefore, there are problems that it takes time and effort to edit the program, and that editing mistakes are likely to occur. In particular, when changing the registration of a variable, it is easy to make a mistake between a local variable and a global variable.

本発明は、上記課題を解決するためになされたものであり、その目的は、POUの分割/結合にあたり、変数の変更、登録、削除を自動化し、編集ミスを少なくすることができるプログラマブル・ロジック・コントローラの編集装置を提供することにある。   The present invention has been made to solve the above-described problems, and an object thereof is programmable logic that can automate variable change, registration, and deletion and reduce editing mistakes when dividing / joining POUs. -To provide a controller editing device.

上記の課題を解決するために、本発明のプログラム編集装置は、PLCが実行するシーケンスプログラムをPOU単位で編集するプログラム編集手段と、POUのロジックを定義するプログラムワークシートと、プログラムワークシートで使用されているローカル変数を登録するローカル変数ワークシートと、複数のPOUのプログラムワークシートで共用されているグローバル変数を登録するグローバル変数ワークシートとを格納するプログラムメモリと、一つのPOUを複数に分割し、分割後のPOUに対応するプログラムワークシートとローカル変数ワークシートを作成するプログラム分割手段とを備え、
(1)プログラム分割手段が、分割後のPOUで共用されているローカル変数をグローバル変数ワークシートにグローバル変数として追加するとともに、分割後のローカル変数ワークシートに外部参照変数として登録することを特徴とする。
(2)プログラム分割手段が、グローバル変数をグローバル変数ワークシートに追加するときに、該変数の重複登録を検出し、プログラム編集者に通知することを特徴とする。
In order to solve the above problems, the program editing apparatus of the present invention uses a program editing means for editing a sequence program executed by a PLC in units of POUs, a program worksheet for defining POU logic, and a program worksheet. Program memory that stores a local variable worksheet that registers registered local variables, a global variable worksheet that registers global variables shared by multiple POU program worksheets, and a single POU A program worksheet corresponding to the divided POU and a program dividing means for creating a local variable worksheet,
(1) The program dividing means adds a local variable shared by the divided POU as a global variable to the global variable worksheet and registers it as an external reference variable in the divided local variable worksheet. To do.
(2) When the program dividing means adds a global variable to the global variable worksheet, it detects duplicate registration of the variable and notifies the program editor.

また、本発明はPOUの結合に適したプログラム編集装置を提供する。この編集装置は、上記編集手段およびプログラムメモリに加え、複数のPOUを一つに結合し、結合後のPOUに対応するプログラムワークシートとローカル変数ワークシートを作成するプログラム結合手段を備え、
(3)プログラム結合手段が、結合前のPOUでのみ外部参照変数として共用されていたグローバル変数をローカル変数に変えて結合後のローカル変数ワークシートに登録するとともに、グローバル変数ワークシートから削除することを特徴とする。
(4)プログラム結合手段が、ローカル変数ワークシートの作成にあたり、ローカル変数の重複をプログラム編集者に通知し、重複登録を回避することを特徴とする。
The present invention also provides a program editing apparatus suitable for POU combination. In addition to the editing means and the program memory, the editing apparatus includes a program combining unit that combines a plurality of POUs into one and creates a program worksheet and a local variable worksheet corresponding to the combined POUs,
(3) The program combining means changes a global variable shared as an external reference variable only in the POU before combining into a local variable, registers it in the combined local variable worksheet, and deletes it from the global variable worksheet. It is characterized by.
(4) The program combining means notifies the program editor of local variable duplication when creating a local variable worksheet, thereby avoiding duplication registration.

上記(1)のプログラム編集装置によれば、POUの分割にあたり、新たに派生したグローバル変数をグローバル変数ワークシートに自動的に追加でき、ローカル変数ワークシートに外部参照変数として正しく登録できる効果がある。
上記(2)のプログラム編集装置によれば、分割に伴うグローバル変数の重複登録を未然に回避できる効果がある。
According to the program editing apparatus of (1) above, when a POU is divided, a newly derived global variable can be automatically added to the global variable worksheet, and can be correctly registered as an external reference variable in the local variable worksheet. .
According to the program editing apparatus of the above (2), there is an effect that it is possible to avoid overlapping registration of global variables due to division.

上記(3)のプログラム編集装置によれば、POUの結合にあたり、結合前のグローバル変数をローカル変数に変えてローカル変数ワークシートに正しく登録でき、グローバル変数ワークシートから自動的に削除できる効果がある。
上記(4)のプログラム編集装置によれば、結合に伴うローカル変数の重複登録を未然に回避できる効果がある。
According to the program editing apparatus of (3) above, when combining POUs, the global variable before the combination can be changed to a local variable and correctly registered in the local variable worksheet, and can be automatically deleted from the global variable worksheet. .
According to the program editing apparatus of (4) above, there is an effect that it is possible to avoid overlapping registration of local variables accompanying the combination.

以下、本発明の実施形態を図面に基づいて説明する。図1は、PLCのシーケンスプログラムを編集するプログラム編集装置1の全体的な構成を示す。この編集装置1は、従来装置(図12参照)と同様に機能する入力装置140、出力装置150、POU編集制御部170、PLCプログラムメモリ180等に加え、POU181の分割/結合時に変数の変更、登録、削除を制御するPOU分割・結合制御部160を備えている。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows an overall configuration of a program editing apparatus 1 for editing a PLC sequence program. The editing apparatus 1 includes an input device 140, an output device 150, a POU editing control unit 170, a PLC program memory 180, and the like that function in the same manner as a conventional device (see FIG. 12). A POU division / combination control unit 160 that controls registration and deletion is provided.

図2は、PLCプログラムメモリ180に格納されたPOU1のプログラムワークシートを例示する。ここでは、POU1に含まれるロジックがワークシート1W201、ワークシート2W202、ワークシート3W203、ワークシート4W204の4枚のプログラムワークシートに定義されている。   FIG. 2 illustrates a POU 1 program worksheet stored in the PLC program memory 180. Here, the logic included in POU1 is defined in four program worksheets, worksheet 1W201, worksheet 2W202, worksheet 3W203, and worksheet 4W204.

図3は、POU1のローカル変数ワークシートを例示する。このローカル変数ワークシートには、4枚のプログラムワークシートW201〜W204で使用されている変数がその変数名、データ型、種別を示す一覧表の形態で登録されている。種別の項目には、変数のうちPOU1のみで使用されているローカル変数が「VAR」と表示され、その他のPOUでも使用されている外部参照変数が「VAR_EXTERNAL」と表示されている。   FIG. 3 illustrates a local variable worksheet for POU1. In this local variable worksheet, variables used in the four program worksheets W201 to W204 are registered in the form of a list showing the variable names, data types, and types. In the type item, a local variable used only in POU 1 among the variables is displayed as “VAR”, and an external reference variable used in other POUs is displayed as “VAR_EXTERNAL”.

図4は、分割前のグローバル変数ワークシートを例示する。このグローバル変数ワークシートには、POU1とその他のPOUで共用されているグローバル変数がその変数名、データ型、種別を示す一覧表の形態で登録されている。種別の項目には、グローバル変数が「VAR_GLOBAL」と表示されている。なお、図2〜図4に示す各ワークシートは、単独または所要の組み合わせで出力装置150に表示される。   FIG. 4 illustrates the global variable worksheet before division. In this global variable worksheet, global variables shared by POU1 and other POUs are registered in the form of a list showing the variable names, data types, and types. In the type item, the global variable is displayed as “VAR_GLOBAL”. 2 to 4 are displayed on the output device 150 alone or in a required combination.

次に、プログラム分割手段であるPOU分割・結合制御部160によるPOUの分割処理について説明する。以下では、図2に鎖線で示すように、POU1を二つに分割し、ワークシート1W201、ワークシート3W203の2枚のプログラムワークシートを含むPOU2と、ワークシート2W202、ワークシート4W204の2枚のプログラムワークシートを含むPOU3とを生成する場合の処理について説明する。   Next, POU division processing by the POU division / combination control unit 160 as program division means will be described. In the following, as shown by a chain line in FIG. 2, POU1 is divided into two, POU2 including two program worksheets, worksheet 1W201 and worksheet 3W203, and two sheets of worksheet 2W202 and worksheet 4W204. Processing for generating POU3 including a program worksheet will be described.

図9のフローチャートに示すように、POU1の分割にあたり、POU分割・結合制御部160は、まず、POU1のプログラムワークシートを分割し、ワークシート1W201とワークシート3W203をPLCプログラムメモリ180の指定領域に指定順序でコピーし、POU2に対応するプログラムワークシートを作成するとともに、ワークシート2W202とワークシート4W204を同様にコピーし、POU3に対応するプログラムワークシートを作成する(S301)。この時点で、POU2およびPOU3のローカル変数ワークシートは空白である。   As shown in the flowchart of FIG. 9, when dividing POU1, the POU division / combination control unit 160 first divides the POU1 program worksheet and places the worksheet 1W201 and the worksheet 3W203 in the designated area of the PLC program memory 180. The program worksheet corresponding to POU2 is created by copying in the designated order, and the worksheet 2W202 and worksheet 4W204 are similarly copied to create a program worksheet corresponding to POU3 (S301). At this point, the local variable worksheets for POU2 and POU3 are blank.

次に、POU1のローカル変数ワークシートから変数を一つずつ取り出し(S302)、その変数がPOU2とPOU3のプログラムワークシートで共用されているか否かを判定する(S303)。そして、共用されていない場合は、その変数をPOU2またはPOU3固有のローカル変数として、それぞれのローカル変数ワークシートに登録する(S304)。共用されている場合は、その変数をグローバル変数として、グローバル変数ワークシートに追加する。   Next, variables are extracted one by one from the local variable worksheet of POU1 (S302), and it is determined whether or not the variables are shared by the POU2 and POU3 program worksheets (S303). If not shared, the variable is registered as a local variable unique to POU2 or POU3 in the respective local variable worksheet (S304). If it is shared, add it to the global variable worksheet as a global variable.

ここで、グローバル変数の重複登録を回避するために、追加しようとする変数の変数名と登録済み変数の変数名とを照合し、グローバル変数の重複をチェックする(S305)。重複していない場合は、その変数をグローバル変数ワークシートに追加し(S306)、POU2とPOU3のローカル変数ワークシートに外部参照変数として登録する(S307)。重複している場合は、所定のメッセージで変数の重複をプログラム編集者に通知し(S309)、エラー処理とする。そして、POU1のすべての変数を処理し(S308)、POU2とPOU3のローカル変数ワークシートを完成し、グローバル変数ワークシートを更新して、分割作業を終了する。   Here, in order to avoid duplicate registration of global variables, the variable name of the variable to be added is compared with the variable name of the registered variable to check for duplicate global variables (S305). If not overlapped, the variable is added to the global variable worksheet (S306) and registered as an external reference variable in the local variable worksheet of POU2 and POU3 (S307). If they overlap, the program editor is notified of the duplication of variables with a predetermined message (S309), and error processing is performed. Then, all the variables of POU1 are processed (S308), the local variable worksheets of POU2 and POU3 are completed, the global variable worksheet is updated, and the division work is finished.

図5、図6はそれぞれ分割後のPOU2、POU3のローカル変数ワークシートを例示し、図7は分割後のグローバル変数ワークシートを例示する。図5、図6に示す変数mMDSLASと変数mRMCKは共に、POU2とPOU3の両方で使用されているため、図7に示すグローバル変数ワークシートにグローバル変数(VAR_GLOBAL)として登録され、図5、図6に示すローカル変数ワークシートには外部参照変数(VAR_EXTERNAL)として登録されている。   5 and 6 illustrate the POU2 and POU3 local variable worksheets after the division, respectively, and FIG. 7 illustrates the global variable worksheet after the division. Since both the variable mMDSLAS and the variable mRMCK shown in FIGS. 5 and 6 are used in both POU2 and POU3, they are registered as global variables (VAR_GLLOBAL) in the global variable worksheet shown in FIG. Are registered as external reference variables (VAR_EXTERNAL) in the local variable worksheet shown in FIG.

次に、プログラム結合手段であるPOU分割・結合制御部160によるPOUの結合処理について説明する。以下では、POU2とPOU3を一つに結合し、POU2のワークシート1W201、ワークシート3W203とPOU3のワークシート2W202、ワークシート4W204との合計4枚のプログラムワークシートを含むPOU4を生成する場合の処理について説明する。   Next, POU combination processing by the POU division / combination control unit 160 as program combination means will be described. In the following, processing when POU2 and POU3 are combined into one to generate POU4 including a total of four program worksheets including POU2 worksheet 1W201, worksheet 3W203, POU3 worksheet 2W202, and worksheet 4W204. Will be described.

図10のフローチャートに示すように、POU2とPOU3の結合にあたり、POU分割・結合制御部160は、まず、PLCプログラムメモリ180の指定領域にPOU2のワークシート1W201、ワークシート3W203と、POU3のワークシート2W202、ワークシート4W204とを指定順序でコピーし、POU4に対応する一組のプログラムワークシートを作成する(S401)。この時点でPOU4のローカル変数ワークシートは空白である。   As shown in the flowchart of FIG. 10, when combining POU2 and POU3, the POU division / combination control unit 160 first sets the POU2 worksheet 1W201, worksheet 3W203, and POU3 worksheet in the designated area of the PLC program memory 180. 2W202 and worksheet 4W204 are copied in a specified order to create a set of program worksheets corresponding to POU4 (S401). At this point, the POU4 local variable worksheet is blank.

次に、POU2のローカル変数ワークシートからすべてのローカル変数を取り出し、POU4のローカル変数ワークシートに登録する(S402)。続いて、POU3のローカル変数ワークシートからローカル変数を一つずつ取り出し(S403)、その変数名と登録済み変数の変数名とを照合し、ローカル変数の重複をチェックする(S404)。重複していない場合は、そのローカル変数をPOU4のローカル変数ワークシートに登録する(S405)。重複している場合は、所定のメッセージで変数の重複をプログラム編集者に通知し(S406)、重複登録を回避する。そして、POU3のすべてのローカル変数を処理し(S407)、POU4のローカル変数ワークシートを作成する。   Next, all local variables are extracted from the POU2 local variable worksheet and registered in the POU4 local variable worksheet (S402). Subsequently, local variables are taken out one by one from the local variable worksheet of POU 3 (S403), the variable names are compared with the variable names of registered variables, and duplicates of local variables are checked (S404). If not, the local variable is registered in the local variable worksheet of POU 4 (S405). If there is a duplication, the program editor is notified of the duplication of the variable with a predetermined message (S406) to avoid duplication registration. Then, all local variables in POU3 are processed (S407), and a local variable worksheet for POU4 is created.

続いて、図11のフローチャートに示すように、POU2のローカル変数ワークシートからすべての外部参照変数を取り出し、POU4のローカル変数ワークシートに登録する(S501)。次に、POU3のローカル変数ワークシートから外部参照変数を一つずつ取り出し(S502)、POU4のローカル変数ワークシートに登録済みであるか否かを判定する(S503)。登録済でない場合は、その外部参照変数をPOU4のローカル変数ワークシートに登録する(S507)。登録済みの場合は、この外部参照変数を他のPOUが参照しているか否かを判断する(S504)。   Subsequently, as shown in the flowchart of FIG. 11, all external reference variables are extracted from the local variable worksheet of POU2 and registered in the local variable worksheet of POU4 (S501). Next, external reference variables are extracted one by one from the local variable worksheet in POU 3 (S502), and it is determined whether or not they are already registered in the local variable worksheet in POU 4 (S503). If not registered, the external reference variable is registered in the local variable worksheet of POU4 (S507). If already registered, it is determined whether or not another POU is referring to this external reference variable (S504).

そして、他のPOUが参照している場合は、その変数が依然グローバル変数のままであると判断し、ステップS502に戻り、次の外部参照変数を取り出す。他のPOUが参照していない場合は、その変数がグローバル変数からローカル変数に変わったと判断し、所定のメッセージで変数の登録変更をプログラム編集者に通知する(S505)。その後、このグローバル変数をローカル変数に変更してPOU4のローカル変数ワークシートに登録するとともに、グローバル変数ワークシートから削除する(S506)。こうして、すべての外部参照変数を処理し(S508)、POU4のローカル変数ワークシートを完成し、グローバル変数ワークシートを更新して、結合作業を終了する。   If another POU is referencing, it is determined that the variable is still a global variable, and the process returns to step S502 to extract the next external reference variable. If no other POU refers to it, it is determined that the variable has changed from a global variable to a local variable, and a registration change of the variable is notified to the program editor by a predetermined message (S505). Thereafter, the global variable is changed to a local variable, registered in the local variable worksheet of POU4, and deleted from the global variable worksheet (S506). In this way, all external reference variables are processed (S508), the local variable worksheet of POU4 is completed, the global variable worksheet is updated, and the joining operation is completed.

図8は結合後のグローバル変数ワークシートを例示する。この実施例では、POU1から分割されたPOU2とPOU3を結合してPOU4を生成している。このため、結合前のグローバル変数ワークシート(図7参照)に登録されていた変数mMDSLASと変数mRMCKは、結合に伴ってグローバル変数からPOU4固有のローカル変数に変わり、図8に示す結合後のグローバル変数ワークシートから自動的に削除される。   FIG. 8 illustrates the combined global variable worksheet. In this embodiment, POU4 is generated by combining POU2 and POU3 divided from POU1. For this reason, the variable mMDSLAS and the variable mRMCK registered in the global variable worksheet before joining (see FIG. 7) change from the global variable to the local variable specific to POU4 with the joining, and the joined global shown in FIG. It is automatically deleted from the variable worksheet.

本発明の一実施形態を示すプログラム編集装置のブロック図である。1 is a block diagram of a program editing apparatus showing an embodiment of the present invention. POU1のプログラムワークシートを示す模式図である。It is a schematic diagram which shows the program worksheet of POU1. POU1のローカル変数ワークシートを示す模式図である。It is a schematic diagram which shows the local variable worksheet of POU1. グローバル変数ワークシートを示す模式図である。It is a schematic diagram which shows a global variable worksheet. POU2のローカル変数ワークシートを示す模式図である。It is a schematic diagram which shows the local variable worksheet of POU2. POU3のローカル変数ワークシートを示す模式図である。It is a schematic diagram which shows the local variable worksheet of POU3. 分割後のグローバル変数ワークシートを示す模式図である。It is a schematic diagram which shows the global variable worksheet after a division | segmentation. 結合後のグローバル変数ワークシートを示す模式図である。It is a schematic diagram which shows the global variable worksheet after a coupling | bonding. POUの分割処理を示すフローチャートである。It is a flowchart which shows the division | segmentation process of POU. POUの結合処理を示すフローチャートである。It is a flowchart which shows the coupling | bonding process of POU. 図10に続く結合処理を示すフローチャートである。It is a flowchart which shows the joint process following FIG. 従来のプログラム編集装置を示すブロック図である。It is a block diagram which shows the conventional program editing apparatus.

符号の説明Explanation of symbols

1 プログラム編集装置
140 入力装置
150 出力装置
160 POU分割・結合制御部
170 POU編集制御部
180 PLCプログラムメモリ
181 POU
182 プログラムワークシート
183 ローカル変数ワークシート
184 グローバル変数ワークシート
1 Program Editing Device 140 Input Device 150 Output Device 160 POU Division / Combination Control Unit 170 POU Edit Control Unit 180 PLC Program Memory 181 POU
182 Program Worksheet 183 Local Variable Worksheet 184 Global Variable Worksheet

Claims (4)

プログラマブル・ロジック・コントローラのシーケンスプログラムをプログラム構成要素単位で編集するプログラム編集手段と、
前記プログラム構成要素のロジックを定義するプログラムワークシートと、プログラムワークシートで使用されているローカル変数を登録するローカル変数ワークシートと、複数のプログラム構成要素のプログラムワークシートで共用されているグローバル変数を登録するグローバル変数ワークシートとを格納するプログラムメモリと、
一つのプログラム構成要素を複数に分割し、分割後のプログラム構成要素に対応する前記プログラムワークシートと前記ローカル変数ワークシートとを作成するプログラム分割手段とを備え、
前記プログラム分割手段が、分割後のプログラム構成要素で共用されているローカル変数をグローバル変数に変えて前記グローバル変数ワークシートに追加するとともに、分割後のローカル変数ワークシートに外部参照変数として登録することを特徴とするプログラマブル・ロジック・コントローラのプログラム編集装置。
Program editing means for editing a programmable logic controller sequence program in units of program components;
A program worksheet for defining the logic of the program component, a local variable worksheet for registering a local variable used in the program worksheet, and a global variable shared by a plurality of program component program worksheets. A program memory for storing the global variable worksheet to be registered;
Program dividing means for dividing one program component into a plurality of parts and creating the program worksheet corresponding to the divided program component and the local variable worksheet,
The program dividing means changes a local variable shared by divided program components into a global variable and adds it to the global variable worksheet, and registers it as an external reference variable in the divided local variable worksheet. Program editing device of programmable logic controller characterized by the above.
前記プログラム分割手段が、グローバル変数の追加にあたり、該変数の重複をプログラム編集者に通知し、重複登録を回避することを特徴とする請求項1記載のプログラマブル・ロジック・コントローラのプログラム編集装置。   2. The program editing apparatus for a programmable logic controller according to claim 1, wherein the program dividing means notifies the program editor of duplication of the variable when adding the global variable to avoid duplication registration. プログラマブル・ロジック・コントローラのシーケンスプログラムをプログラム構成要素単位で編集するプログラム編集手段と、
前記プログラム構成要素のロジックを定義するプログラムワークシートと、プログラムワークシートで使用されているローカル変数を登録するローカル変数ワークシートと、複数のプログラム構成要素のプログラムワークシートで共用されているグローバル変数を登録するグローバル変数ワークシートとを格納するプログラムメモリと、
複数のプログラム構成要素を一つに結合し、結合後のプログラム構成要素に対応する前記プログラムワークシートと前記ローカル変数ワークシートを作成するプログラム結合手段とを備え、
前記プログラム結合手段が、結合前のプログラム構成要素でのみ外部参照変数として共用されていたグローバル変数をローカル変数に変えて結合後のローカル変数ワークシートに登録するとともに、前記グローバル変数ワークシートから削除することを特徴とするプログラマブル・ロジック・コントローラのプログラム編集装置。
Program editing means for editing a programmable logic controller sequence program in units of program components;
A program worksheet for defining the logic of the program component, a local variable worksheet for registering a local variable used in the program worksheet, and a global variable shared by a plurality of program component program worksheets. A program memory for storing the global variable worksheet to be registered;
A plurality of program components are combined into one, and the program worksheet corresponding to the combined program components and the program combining means for creating the local variable worksheet are provided,
The program combining means changes a global variable shared as an external reference variable only in the program component before combining into a local variable, registers it in the combined local variable worksheet, and deletes it from the global variable worksheet A program editing device for a programmable logic controller.
前記プログラム結合手段が、ローカル変数ワークシートの作成にあたり、ローカル変数の重複をプログラム編集者に通知し、重複登録を回避することを特徴とする請求項3記載のプログラマブル・ロジック・コントローラのプログラム編集装置。   4. The program editing apparatus for a programmable logic controller according to claim 3, wherein said program combination means notifies a program editor of duplication of local variables to avoid duplication registration when creating a local variable worksheet. .
JP2008213066A 2008-08-21 2008-08-21 Program edit device of programmable logic controller Pending JP2010049484A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008213066A JP2010049484A (en) 2008-08-21 2008-08-21 Program edit device of programmable logic controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008213066A JP2010049484A (en) 2008-08-21 2008-08-21 Program edit device of programmable logic controller

Publications (1)

Publication Number Publication Date
JP2010049484A true JP2010049484A (en) 2010-03-04

Family

ID=42066521

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008213066A Pending JP2010049484A (en) 2008-08-21 2008-08-21 Program edit device of programmable logic controller

Country Status (1)

Country Link
JP (1) JP2010049484A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110022785A1 (en) * 2009-07-21 2011-01-27 Riedmann Stefan Method for programming a memory-programmable controller with resistant storage of data in memory
JP2011233113A (en) * 2010-04-30 2011-11-17 Toshiba Corp Plant control system and program relocation method
WO2021044650A1 (en) * 2019-09-04 2021-03-11 オムロン株式会社 Program development device, project creation method, and program for implementing program development device
WO2022185670A1 (en) * 2021-03-04 2022-09-09 オムロン株式会社 Development support device, method for controlling development support device, information processing program, and recording medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110022785A1 (en) * 2009-07-21 2011-01-27 Riedmann Stefan Method for programming a memory-programmable controller with resistant storage of data in memory
US8612962B2 (en) * 2009-07-21 2013-12-17 Robert Bosch Gmbh Method for programming a memory-programmable controller with resistant storage of data in memory
JP2011233113A (en) * 2010-04-30 2011-11-17 Toshiba Corp Plant control system and program relocation method
WO2021044650A1 (en) * 2019-09-04 2021-03-11 オムロン株式会社 Program development device, project creation method, and program for implementing program development device
US11704113B2 (en) 2019-09-04 2023-07-18 Omron Corporation Program development device, project creation method, and storage medium
JP7322604B2 (en) 2019-09-04 2023-08-08 オムロン株式会社 Program development device, project creation method, and program for realizing program development device
WO2022185670A1 (en) * 2021-03-04 2022-09-09 オムロン株式会社 Development support device, method for controlling development support device, information processing program, and recording medium

Similar Documents

Publication Publication Date Title
US20190236233A1 (en) Ladder program editing support apparatus and ladder program editing method
JP4513806B2 (en) Peripheral device of programmable logic controller and method for creating program
JPWO2008102426A1 (en) Programmable controller peripheral device, replacement method and program
US20060136497A1 (en) System and method for reusing project engineering data
JPH103374A (en) Method for reutilizing parts of configuration tool for controlling design
JP2007265252A (en) Program preparation support device and method
JPWO2004025463A1 (en) Requirement definition method, software development method, requirement word change method and new specification method
US20060117043A1 (en) Engineering system with automatic generation of entity templates
JP2010049484A (en) Program edit device of programmable logic controller
JP5747698B2 (en) Requirements management support device
US10078638B2 (en) Secure hyper transfer of large files
JP4707946B2 (en) Process simulation system
JP2005309593A (en) Program preparation device and program preparation method
CN110989999A (en) Code generation method and device, electronic equipment and medium
JP2020166414A (en) Development aid device, method of controlling the same, information processing program, and recording medium
JP5205988B2 (en) PLC global variable definition method
JP2008158691A (en) Parts list generation method and parts list generation program
JP2013105435A (en) Data shift method and program
KR101726120B1 (en) Program editing device, program editing method and computer readable recoding medium for recording program editing program
CN110447028B (en) System design support device and system design support method
JP2010134725A (en) Automatic creation device for control model
JP3598594B2 (en) Document processing apparatus and document processing method
JP7408993B2 (en) Work procedure support system and work procedure support method
US10394943B2 (en) Numerical controller
JP2007047971A (en) Individual program generation device and method