JP2010176377A - Tool for converting plc program - Google Patents

Tool for converting plc program Download PDF

Info

Publication number
JP2010176377A
JP2010176377A JP2009018137A JP2009018137A JP2010176377A JP 2010176377 A JP2010176377 A JP 2010176377A JP 2009018137 A JP2009018137 A JP 2009018137A JP 2009018137 A JP2009018137 A JP 2009018137A JP 2010176377 A JP2010176377 A JP 2010176377A
Authority
JP
Japan
Prior art keywords
program
plc
conversion
old
instruction
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
JP2009018137A
Other languages
Japanese (ja)
Other versions
JP5262765B2 (en
Inventor
Masato Fujii
正人 藤井
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co 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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP2009018137A priority Critical patent/JP5262765B2/en
Publication of JP2010176377A publication Critical patent/JP2010176377A/en
Application granted granted Critical
Publication of JP5262765B2 publication Critical patent/JP5262765B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Programmable Controllers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To facilitate automatic conversion of an application program for a PLC developed in unique language specifications into a program compliant with the JIS B3503 (IEC 61131-3) language. <P>SOLUTION: An application program for an old PLC is XML-converted into a program in the IEC 61131-3 language by means of XML interoperability of PLCs compliant with the IEC 61131-3. The conversion uses means for program division, address translation, program conversion, data type conversion and special instruction conversion. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、IEC61131−3言語に準拠しないプログラマブルコントローラのアプリケーションプログラムをIEC61131−3言語に準拠するプログラムに変換するプログラム変換ツールに関する。   The present invention relates to a program conversion tool that converts an application program of a programmable controller that does not conform to the IEC 61131-3 language into a program that conforms to the IEC 61131-3 language.

一般に、プログラマブルコントローラ(PC、PLC)は、シーケンス処理用の特別なアプリケーションプログラム(制御プログラム)の記述にしたがって動作する。アプリケーションプログラムは、パーソナルコンピュータ等の汎用コンピュータやプログラムローダで開発され、プログラマブルコントローラには通信インターフェースを介して転送される。   Generally, a programmable controller (PC, PLC) operates according to a description of a special application program (control program) for sequence processing. The application program is developed by a general-purpose computer such as a personal computer or a program loader, and transferred to the programmable controller via a communication interface.

他方、汎用マイクロプロセッサを搭載したPLCにおいて、シーケンス処理を実行させるために、アプリケーションプログラム開発を汎用マイクロプロセッサにおいて直接実行可能な実行コードを生成するものもある(例えば、特許文献1参照)。   On the other hand, some PLCs equipped with a general-purpose microprocessor generate an execution code that can directly execute application program development in the general-purpose microprocessor in order to execute sequence processing (see, for example, Patent Document 1).

ここで、シーケンス処理用のプログラムを記述する言語のうち代表的なものとして、ラダーダイヤグラム方式、ファンクション・ブロック・ダイアグラム方式、構造化言語(Structured Text)方式およびSFC(Sequential Function Chart)方式などが知られている。   Here, as a typical language for describing a program for sequence processing, a ladder diagram method, a function block diagram method, a structured language method, a SFC (Sequential Function Chart) method, and the like are known. It has been.

J1SB3503(IEC61131−3)は、国際電気標準会議が1993年12月に発行した標準規格であり、これにはPLC用のプログラム言語として、ラダー・ロジック言語(LD言語)、シーケンシャル・ファンクション・チャート(SFC言語)、ファンクション・ブロック・ダイアグラム(FBD言語)、ストラクチャード・テキスト(ST言語)、インストラクション・リスト(IL言語)を定義している。   J1SB3503 (IEC61131-3) is a standard issued by the International Electrotechnical Commission in December 1993. This includes a ladder logic language (LD language), a sequential function chart (PLC) as programming languages for PLC. SFC language), function block diagram (FBD language), structured text (ST language), and instruction list (IL language).

特開2002−99312号公報JP 2002-99312 A

上記のJ1SB3503(IEC61131−3)言語に準拠したPLCのアプリケーションプログラムは、プログラミングツールのXMLインポート/エクスポート機能により、他メーカ間で相互にアプリケーションプログラムの交換ができるようにXMLスキーマの標準化が進んでいる。この機能はIEC61131−3準拠のPLC間でのみ実現できる。   The standardization of the XML schema of the PLC application program conforming to the above J1SB3503 (IEC61131-3) language is progressing so that the application program can be exchanged between other manufacturers by the XML import / export function of the programming tool. . This function can be realized only between IEC61131-3 compliant PLCs.

一方、各社PLCメーカは、長年各社独自の言語仕様で動作するPLCを発売しており、多くのユーザに販売し、現実に多くのシステムとして稼動している。それらのPLCが寿命などによりリプレースする場合がある。この場合、これらのPLCをIEC61131−3準拠のプログラムで動作するPLCに置き換える場合、言語仕様が全く異なるため、置き換え作業は非常に困難になる。具体的には、元のアプリケーションプログラムについて十分に調査して、動作を完全に理解した上で、人がIEC61131−3言語に変換することになる。これでは、非常に手間がかかり、変換する時の勘違いによるミスが発生する可能性がある。   On the other hand, PLC manufacturers of various companies have been selling PLCs that operate with their own language specifications for many years, sold to many users, and are actually operating as many systems. Those PLCs may be replaced due to their lifetime. In this case, when these PLCs are replaced with PLCs that operate with a program conforming to IEC61131-3, the language specifications are completely different, so that the replacement work becomes very difficult. Specifically, the original application program is thoroughly investigated and the operation is completely understood, and then a person converts it into the IEC 61131-3 language. This is very time consuming and may cause errors due to misunderstandings when converting.

本発明の目的は、独自の言語仕様で開発されたPLCのアプリケーションプログラムを、J1SB3503(IEC61131−3)言語に準拠したプログラムへの自動変換が容易になるPLCのプログラム変換ツールを提供することにある。   An object of the present invention is to provide a PLC program conversion tool that facilitates automatic conversion of a PLC application program developed with a unique language specification into a program conforming to the J1SB3503 (IEC61131-3) language. .

本発明は、前記の課題を解決するため、IEC61131−3準拠のPLC間で行われているXMLによる相互運用を利用して、旧PLCのアプリケーションプログラムをXML変換し、IEC61131−3言語のプログラムに変換するものであり、この変換にプログラムの分割と、アドレスの変換と、プログラムの変換と、データの型変換および特殊命令の変換の各手段を用意しておくもので、以下の構成を特徴とする。   In order to solve the above-mentioned problems, the present invention uses an XML interoperation between IEC61131-3 compliant PLCs to convert an old PLC application program into an XML program and convert it to an IEC61131-3 language program. This conversion is prepared by means of program division, address conversion, program conversion, data type conversion, and special instruction conversion for this conversion. To do.

(1)IEC61131−3言語に準拠しない旧PLCのアプリケーションプログラムをIEC61131−3言語に準拠するプログラムに変換するプログラム変換ツールであって、
旧PLCプログラムの実行プログラムAを取り込み、これを旧PLCソースプログラムBに変換する手段と、
前記旧PLCソースプログラムBを複数の旧PLCソースプログラムB1〜BNへの分割とアドレス変換を行う手段と、
前記旧PLCソースプログラムB1〜BNをそれぞれIEC61131−3命令のソースプログラムC1〜CNに変換する手段と、
前記IEC61131−3命令のソースプログラムC1〜CNをXMLファイルD1〜DNに変換してエクスポートする手段と、
を備えたことを特徴とする。
(1) A program conversion tool for converting an application program of an old PLC that does not conform to the IEC61131-3 language into a program that conforms to the IEC61131-3 language,
Means for taking an execution program A of an old PLC program and converting it into an old PLC source program B;
Means for dividing the old PLC source program B into a plurality of old PLC source programs B 1 to B N and address conversion;
Means for converting the old PLC source programs B 1 to B N into IEC 61131-3 instruction source programs C 1 to C N , respectively;
Means for converting source programs C 1 to C N of the IEC61131-3 instructions into XML files D 1 to D N and exporting them;
It is provided with.

(2)前記プログラムの分割は、
使用者の指定入力により分割する手段と、
固定のラング単位に自動分割、1つのラングで使用された変数が次ラングでも使用されている場合には連続したプログラムとする分割、最低でも指定したラング数は連続するプログラムと見なす分割、同一データを検索する範囲を次ラングだけでなく指定したラング数とする分割の少なくとも1つの分割手段と、
を組み合わせたことを特徴とする。
(2) The program is divided as follows:
Means for dividing by user-specified input;
Automatic division into fixed rung units, division to make a continuous program when a variable used in one rung is also used in the next rung, division to consider at least the specified rung number as a continuous program, the same data At least one dividing means for dividing the search range into the specified rung number as well as the next rung;
It is characterized by combining.

(3)前記アドレスの変換は、
旧PLCの実アドレスとIEC61131−3対応PLCの実アドレスを直接表現変数として1対1に変換させる直接表現変数に変換する手段と、
分割した旧PLCのプログラム内で使用しているメモリアドレスが他の分割したプログラム内で使用していない場合にはローカル変数とするローカル変数に変換する手段と、
データメモリの各アドレスに付けられたコメントを変数名として変換する手段と、
の少なくとも1つを備えたことを特徴とする。
(3) The address conversion is as follows:
Means for converting the real address of the old PLC and the real address of the IEC61131-3 compliant PLC into a direct expression variable for direct conversion as a direct expression variable;
Means for converting a memory address used in a divided old PLC program into a local variable that is used as a local variable when not used in another divided program;
Means for converting a comment attached to each address of the data memory as a variable name;
It is characterized by having at least one of.

(4)前記プログラムの変換は、
旧PLCの命令がIEC61131−3言語の基本命令に存在しない場合、旧PLCの命令をユーザ定義ファンクションやユーザ定義ファンクションブロックとして定義しておき、それらの命令が現れた場合には、それらのユーザ定義ファンクションやユーザ定義ファンクションブロックに自動変換する手段を備えたことを特徴とする。
(4) Conversion of the program
If the old PLC instruction does not exist in the basic instruction of IEC61131-3 language, the old PLC instruction is defined as a user-defined function or user-defined function block, and when those instructions appear, those user-defined A means for automatically converting into a function or a user-defined function block is provided.

(5)旧PLCで扱うデータの型変換は、
旧PLCで使用している命令によりデータの型を認識し、次命令の間にデータ型変換命令を自動挿入する手段を備えたことを特徴とする。
(5) Data type conversion handled by the old PLC is
The present invention is characterized by comprising means for recognizing the data type by an instruction used in the old PLC and automatically inserting a data type conversion instruction between the next instructions.

(6)旧PLCのみで使用する特殊命令の変換は、
前記特殊命令をIEC61131−3の基本命令に追加する手段を備えたことを特徴とする。
(6) The conversion of special instructions used only in the old PLC is
A means for adding the special instruction to the basic instruction of IEC61131-3 is provided.

以上のとおり、本発明によれば、IEC61131−3準拠のPLC間で行われているXMLによる相互運用を利用して、旧PLCのアプリケーションプログラムをXML変換し、IEC61131−3言語のプログラムに変換するものであり、この変換にプログラムの分割と、アドレスの変換と、プログラムの変換と、データの型変換および特殊命令の変換の各手段を用意しておくため、独自の言語仕様で開発されたPLCのアプリケーションプログラムを、J1SB3503(IEC61131−3)言語に準拠したプログラムへの自動変換が容易になる。   As described above, according to the present invention, the application program of the old PLC is converted into an XML and converted into the program of the IEC 61131-3 language using the XML interoperation performed between the IEC 61131-3 compliant PLCs. PLCs developed with original language specifications to prepare each means of program division, address conversion, program conversion, data type conversion and special instruction conversion for this conversion. Can be automatically converted into a program conforming to the J1SB3503 (IEC61131-3) language.

本発明の実施形態を示すプログラム変換フロー。The program conversion flow which shows embodiment of this invention. プログラムの分割の例。An example of program division. アドレス変換の例。An example of address translation. ユーザ定義ファンクションに変換する例。Example of conversion to a user-defined function. データの型変換の例。An example of data type conversion. 特殊命令への変換例。Example of conversion to special instructions.

図1は、旧PLCプログラムをIEC61131−3言語のプログラムに変換するためのプログラム変換フローであり、IEC61131−3準拠のPLC間で行われているXMLによる相互運用を利用して、旧PLCのアプリケーションプログラムをXML変換し、IEC61131−3言語に変換することにより、プログラム変換処理の自動化を図るものである。   FIG. 1 is a program conversion flow for converting an old PLC program into an IEC61131-3 language program. An application of an old PLC is used by using XML interoperation between IEC61131-3 compliant PLCs. By converting the program into XML and converting it into IEC61131-3 language, the program conversion process is automated.

図1において、プログラム変換ツール100は、まず、旧PLCプログラムの実行プログラムAを取り込み、これを旧PLCソースプログラムBに変換する。次いで、旧PLCソースプログラムBを複数の旧PLCソースプログラムB1〜BNへの分割とアドレス変換を行い、これら旧PLCソースプログラムB1〜BNをそれぞれIEC61131−3命令のソースプログラムC1〜CNに変換する。さらに、IEC61131−3命令のソースプログラムC1〜CNをXMLファイルD1〜DNに変換してエクスポートする。 In FIG. 1, the program conversion tool 100 first takes in an execution program A of an old PLC program and converts it into an old PLC source program B. Next, the old PLC source program B is divided into a plurality of old PLC source programs B 1 to B N and address conversion is performed, and these old PLC source programs B 1 to B N are respectively converted into source programs C 1 to C of IEC61131-3 instructions. Convert to C N. Further, the source programs C 1 to C N of the IEC61131-3 instruction are converted into XML files D 1 to D N and exported.

IEC61131−3プログラミングツール200は、XMLファイルD1〜DNを最小単位のプログラムPOU1〜POUNとしてインポートする。 The IEC 61131-3 programming tool 200 imports the XML files D 1 to D N as the minimum unit programs POU 1 to POU N.

以上までのプログラム変換フローの詳細を以下に説明する。   Details of the program conversion flow described above will be described below.

(1)プログラムBからB1〜BNへの分割
旧PLCのアプリケーションプログラムはタスク単位などで作成され、1つのプログラムが非常に大きいものがある。一方、IEC61131−3ではPOUという単位でプログラムを作成し、機能的に意味がある単位でプログラムをモジュール化して、それぞれをPOUとして定義する。したがって、旧PLCプログラムをIEC61131−3準拠のプログラムに変換する場合には大きなプログラムをある程度、小さなプログラムに分割する必要がある。
(1) Division from Program B to B 1 to B N Application programs of the old PLC are created in units of tasks, and one program is very large. On the other hand, in IEC61131-3, a program is created in a unit called POU, the program is modularized in a functionally meaningful unit, and each is defined as a POU. Therefore, when converting an old PLC program into a program conforming to IEC61131-3, it is necessary to divide a large program into small programs to some extent.

分割方法としては、単純にプログラム単位で分割する方法がある。例えば、ラダープログラムの場合、プログラムはラングと呼ばれる単位で作成されるので、10ラング単位にPOUを作成する方法が考えられる。但し、この方法では本来の機能単位に分割すべきPOUとしての機能が果たせない。そこで、使用者に分割すべきプログラムを指定してもらうことが考えられる。但し、この方法では、使用者がプログラムの内容を理解しなければならず、分割処理に多くの時間を要する。   As a dividing method, there is a method of simply dividing the program unit. For example, in the case of a ladder program, since the program is created in units called rungs, a method of creating a POU in 10 rung units can be considered. However, this method cannot perform the function as a POU that should be divided into original functional units. Therefore, it can be considered that the user specifies a program to be divided. However, in this method, the user must understand the contents of the program, and a lot of time is required for the division processing.

上記の使用者の判断による指定入力によらず、自動的に元プログラムを分割する方法を提供する。具体的には、1つのラングに使用されているデータが次ラングでも使用されている場合には、連続したプログラムであると判断する。図2の場合、ラング1と2で「C」が同じデータであるので、連続したプログラムと判断する。   Provided is a method for automatically dividing an original program regardless of the designation input by the user's judgment. Specifically, if data used for one rung is also used for the next rung, it is determined that the program is a continuous program. In the case of FIG. 2, since “C” is the same data in the rungs 1 and 2, it is determined that the programs are continuous.

この方法では分割数が多すぎる場合もある。そのような場合には、以下の手段で自動分割を最適化する。   This method may have too many divisions. In such a case, the automatic division is optimized by the following means.

(手段1)最低でも指定したラング数(例えば、10ラング)は連続するプログラムと見なす。   (Means 1) At least the specified number of rungs (for example, 10 rungs) is regarded as a continuous program.

(手段2)同一データを検索する範囲を次ラングだけでなく、指定したラング数(例えば、5ラング)とする。   (Means 2) The search range of the same data is set not only to the next rung but also to the designated rung number (for example, 5 rungs).

(2)アドレス変換
(a)直接表現変数への変換
旧PLCはデータメモリの実アドレスに対する演算を行っている。データメモリを入力領域(I)、出力領域(O)、メモリ領域(M)に分けて、そのアドレスを使った演算をしている。IEC61131−3でも直接表現変数という変数表現があり、データメモリの実アドレスを扱うことができる。
(2) Address conversion (a) Conversion to direct expression variable The old PLC performs an operation on the real address of the data memory. The data memory is divided into an input area (I), an output area (O), and a memory area (M), and an operation using the addresses is performed. IEC61131-3 also has a variable expression called a direct expression variable, and can handle the real address of the data memory.

そこで、旧PLCのアドレス変換を行う場合、図3の(a)に示すように、基本的には、旧PLCの実アドレスとIEC61131−3対応PLCの実アドレスを1対1に対応させたアドレス変換を行う。   Therefore, when the address conversion of the old PLC is performed, as shown in FIG. 3A, basically, the real address of the old PLC and the real address of the IEC 61131-3 compatible PLC are in one-to-one correspondence. Perform conversion.

(b)ローカル変数への変換
旧PLCの場合、メモリ(M)というデータはプログラム相互で何度も参照される場合と、特定のプログラムのみで使用する場合がある。
(B) Conversion to a local variable In the case of an old PLC, data called memory (M) may be referred to many times between programs, or may be used only by a specific program.

そこで、分割したプログラム内で使用しているメモリ(M)を調べ、他の分割したプログラムで使用しているかを調べる。他のプログラムでも使用している場合にはそのまま直接表現変数とするが、他のプログラムで使用していない場合にはローカル変数とすることができるので、直接表現変数でなく、その分割プログラムで独自なローカル変数とする。例えば、図3の(b)に示すように、var1,var2、…のようなローカル変数名にする。   Therefore, the memory (M) used in the divided program is checked to determine whether it is used by another divided program. If it is used in other programs, it will be used as a direct expression variable, but if it is not used in another program, it can be used as a local variable. Local variables. For example, as shown in FIG. 3B, local variable names such as var1, var2,.

(c)コメントとの連動による変数
一般的に、データメモリの各アドレスには用途の意味を持ったコメント(デバイス名と呼ぶこともある)を付けることができるようになっている。このコメントを変数名としてしまうことを行えば、わかりやすいプログラムになる。
(C) Variables in conjunction with comments Generally, each address of the data memory can be attached with a comment (sometimes called a device name) having a meaning of use. If this comment is used as a variable name, the program becomes easy to understand.

そこで、上記(a)の直接表現変数や(b)のローカル変数を、図3の(c)に示すように、データに付けられたコメントをそのまま変数名とする。なお、コメントの文字数が変数名の文字数を超えているような場合には、変数名が重複しないように先頭文字からの一致チェックにより、異なる変数名に自動的に変換する必要がある。   Therefore, as shown in FIG. 3C, the direct expression variables in (a) and the local variables in (b) are directly used as variable names as shown in FIG. If the number of characters in the comment exceeds the number of characters in the variable name, it is necessary to automatically convert the variable name to a different variable name by performing a match check from the first character so that the variable name does not overlap.

(3)プログラム変換
旧PLCの命令がすべてIEC61131−3言語の基本命令に含まれる場合は問題ないが、通常はIEC61131−3言語に存在しない命令が多くある。このような命令をIEC61131−3言語に変換する場合には、ユーザ定義ファンクションやユーザ定義ファンクションブロックを使用する。例えば、データの内容をビット列として、ビット0から調べて、最初に1になっているビット位置を調べるような命令があったとする。例として、16進数で120Hでは、最下位ビットを0とすると、最初に1のビット位置は5になる。このような変換命令はIEC61131−3の基本命令には存在しない。
(3) Program conversion There is no problem when all the instructions of the old PLC are included in the basic instructions of the IEC61131-3 language, but there are usually many instructions that do not exist in the IEC61131-3 language. When converting such an instruction into the IEC61131-3 language, a user-defined function or a user-defined function block is used. For example, it is assumed that there is an instruction that checks the contents of data as a bit string from bit 0 and checks the bit position that is first set to 1. As an example, in hexadecimal 120H, if the least significant bit is 0, the bit position of 1 is 5 at first. Such a conversion instruction does not exist in the basic instruction of IEC61131-3.

そこで、旧PLCにあるIEC61131−3非互換命令を予め、ユーザ定義ファンクションやユーザ定義ファンクションブロックとして定義しておき、それらの命令が現れた場合には、それらのユーザ定義ファンクションやユーザ定義ファンクションブロックに自動変換する。図4にはビット位置を調べる命令[BIT]をユーザ定義ファンクションに変換する例を示す。   Therefore, IEC61131-3 incompatible instructions in the old PLC are defined in advance as user-defined functions and user-defined function blocks, and when those instructions appear, these user-defined functions and user-defined function blocks Automatic conversion. FIG. 4 shows an example of converting an instruction [BIT] for checking a bit position into a user-defined function.

(4)データの型変換
IEC61131−3言語では演算で扱うデータの型を厳密に規定している。例えば、16ビットデータではWORD,INT,UINTの3種類がある。AND/OR/XORなどの論理演算では演算対象データ型はWORDであるが、ADD/SUB/MUL/DIVなどの数値演算の演算対象データはINTまたはUINTである。旧PLCの演算ではデータ型を厳密に意識していないものが多い。
(4) Data type conversion In the IEC61131-3 language, the type of data to be handled by calculation is strictly defined. For example, there are three types of WORD, INT, and UINT for 16-bit data. In the logical operation such as AND / OR / XOR, the operation target data type is WORD, but the operation target data of the numerical operation such as ADD / SUB / MUL / DIV is INT or UINT. Many old PLC operations are not strictly aware of the data type.

例えば、16ビットデータの下位12ビットを取り出し、それに1を加算するようなプログラムは図5の(a)に示すようなプログラムであった。同図中、[RD]XはXというデータを読み込む命令、(WT)YはYに演算結果を書き込む命令である。ここで、[AND]命令ではデータをWORD型データとしているが、[ADD]ではINTまたはUINTとして演算していることになる。   For example, a program that takes out the lower 12 bits of 16-bit data and adds 1 to it is a program as shown in FIG. In the figure, [RD] X is an instruction for reading data X, and (WT) Y is an instruction for writing an operation result to Y. Here, in the [AND] instruction, the data is WORD type data, but in [ADD], it is calculated as INT or UINT.

しかし、IEC61131−3では、図5の(b)に示すように記述しなければならない。同図中、[WORD_TO_UINT]はWORD型データをUINT型に変換する命令である。   However, in IEC61131-3, it must be described as shown in FIG. In the figure, [WORD_TO_UINT] is an instruction for converting WORD type data to UINT type.

そこで、データ型の自動変換には、旧PLCで使用している命令により、扱うデータ型を認識して、次命令の間にデータ型変換命令を自動挿入する。   Therefore, in the automatic data type conversion, the data type to be handled is recognized by the instruction used in the old PLC, and the data type conversion instruction is automatically inserted between the next instructions.

(5)特殊命令への変換
以上までの(1)〜(4)による変換処理によって、殆どの旧PLC命令はIEC61131−3言語に自動変換可能であるが、旧PLCのアーキテクチャの都合により、IEC61131−3の命令やユーザ定義ファンクション、ユーザ定義ファンクションブロックでは表現できない命令が存在する。例えば、各社PLCで多く採用するマスターコントロール関連命令(MCS/MCR)である。
(5) Conversion to special instructions Most of the old PLC instructions can be automatically converted to the IEC61131-3 language by the conversion processes according to the above (1) to (4). However, due to the convenience of the architecture of the old PLC, IEC61131 -3 instructions, user-defined functions, and instructions that cannot be expressed by user-defined function blocks. For example, it is a master control related command (MCS / MCR) that is often used in PLCs of various companies.

このような命令は変換できないので、変換エラーとしてしまうことも可能であるが、IEC61131−3の基本命令にこのような命令を追加することで対応することにする。図6にMCS/MCR命令を変換する例を示す。   Since such an instruction cannot be converted, it may be a conversion error. However, such an instruction is added to the basic instruction of IEC 61131-3. FIG. 6 shows an example of converting the MCS / MCR instruction.

このような命令を使用する場合、PLCopenが規定するXMLスキーマではXML変換できない。したがって、PLCopen−XMLスキーマを標準として、命令追加したXMLスキーマをベンダー固有XMLスキーマとして提供する。このベンダー固有XMLスキーマでは、メーカ間のプログラムの相互変換はできない。   When such an instruction is used, XML conversion cannot be performed using the XML schema defined by PLCopen. Therefore, the XML schema with the instruction added is provided as the vendor-specific XML schema with the PLCen-XML schema as a standard. This vendor-specific XML schema does not allow mutual conversion of programs between manufacturers.

100 プログラム変換ツール
200 IEC61131−3プログラミングツール
100 Program conversion tool 200 IEC61131-3 programming tool

Claims (6)

IEC61131−3言語に準拠しない旧PLCのアプリケーションプログラムをIEC61131−3言語に準拠するプログラムに変換するプログラム変換ツールであって、
旧PLCプログラムの実行プログラムAを取り込み、これを旧PLCソースプログラムBに変換する手段と、
前記旧PLCソースプログラムBを複数の旧PLCソースプログラムB1〜BNへの分割とアドレス変換を行う手段と、
前記旧PLCソースプログラムB1〜BNをそれぞれIEC61131−3命令のソースプログラムC1〜CNに変換する手段と、
前記IEC61131−3命令のソースプログラムC1〜CNをXMLファイルD1〜DNに変換してエクスポートする手段と、
を備えたことを特徴とするPLCのプログラム変換ツール。
A program conversion tool for converting an application program of an old PLC that does not conform to the IEC61131-3 language into a program that conforms to the IEC61131-3 language,
Means for taking an execution program A of an old PLC program and converting it into an old PLC source program B;
Means for dividing the old PLC source program B into a plurality of old PLC source programs B 1 to B N and address conversion;
Means for converting the old PLC source programs B 1 to B N into IEC 61131-3 instruction source programs C 1 to C N , respectively;
Means for converting source programs C 1 to C N of the IEC61131-3 instructions into XML files D 1 to D N and exporting them;
A PLC program conversion tool characterized by comprising:
前記プログラムの分割は、
使用者の指定入力により分割する手段と、
固定のラング単位に自動分割、1つのラングで使用された変数が次ラングでも使用されている場合には連続したプログラムとする分割、最低でも指定したラング数は連続するプログラムと見なす分割、同一データを検索する範囲を次ラングだけでなく指定したラング数とする分割の少なくとも1つの分割手段と、
を組み合わせたことを特徴とする請求項1に記載のPLCのプログラム変換ツール。
The program division is as follows:
Means for dividing by user-specified input;
Automatic division into fixed rung units, division to make a continuous program when a variable used in one rung is also used in the next rung, division to consider at least the specified rung number as a continuous program, the same data At least one dividing means for dividing the search range into the specified rung number as well as the next rung;
The PLC program conversion tool according to claim 1, wherein:
前記アドレスの変換は、
旧PLCの実アドレスとIEC61131−3対応PLCの実アドレスを直接表現変数として1対1に変換させる直接表現変数に変換する手段と、
分割した旧PLCのプログラム内で使用しているメモリアドレスが他の分割したプログラム内で使用していない場合にはローカル変数とするローカル変数に変換する手段と、
データメモリの各アドレスに付けられたコメントを変数名として変換する手段と、
の少なくとも1つを備えたことを特徴とする請求項1に記載のPLCのプログラム変換ツール。
The address conversion is as follows:
Means for converting the real address of the old PLC and the real address of the IEC61131-3 compliant PLC into a direct expression variable for direct conversion as a direct expression variable;
Means for converting the memory address used in the program of the divided old PLC into a local variable to be a local variable when not used in another divided program;
Means for converting a comment attached to each address of the data memory as a variable name;
The PLC program conversion tool according to claim 1, comprising at least one of the following.
前記プログラムの変換は、
旧PLCの命令がIEC61131−3言語の基本命令に存在しない場合、旧PLCの命令をユーザ定義ファンクションやユーザ定義ファンクションブロックとして定義しておき、それらの命令が現れた場合には、それらのユーザ定義ファンクションやユーザ定義ファンクションブロックに自動変換する手段を備えたことを特徴とする請求項1に記載のPLCのプログラム変換ツール。
The conversion of the program is
If the old PLC instruction does not exist in the basic instruction of IEC61131-3 language, the old PLC instruction is defined as a user-defined function or user-defined function block, and when those instructions appear, those user-defined The PLC program conversion tool according to claim 1, further comprising means for automatically converting into a function or a user-defined function block.
旧PLCで扱うデータの型変換は、
旧PLCで使用している命令によりデータの型を認識し、次命令の間にデータ型変換命令を自動挿入する手段を備えたことを特徴とする請求項1に記載のPLCのプログラム変換ツール。
The type conversion of data handled by the old PLC is
2. The PLC program conversion tool according to claim 1, further comprising means for recognizing a data type by an instruction used in the old PLC and automatically inserting a data type conversion instruction between the next instructions.
旧PLCのみで使用する特殊命令の変換は、
前記特殊命令をIEC61131−3の基本命令に追加する手段を備えたことを特徴とする請求項1に記載のPLCのプログラム変換ツール。
Conversion of special instructions used only with the old PLC is
The PLC program conversion tool according to claim 1, further comprising means for adding the special instruction to a basic instruction of IEC61131-3.
JP2009018137A 2009-01-29 2009-01-29 PLC program conversion tool Active JP5262765B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009018137A JP5262765B2 (en) 2009-01-29 2009-01-29 PLC program conversion tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009018137A JP5262765B2 (en) 2009-01-29 2009-01-29 PLC program conversion tool

Publications (2)

Publication Number Publication Date
JP2010176377A true JP2010176377A (en) 2010-08-12
JP5262765B2 JP5262765B2 (en) 2013-08-14

Family

ID=42707292

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009018137A Active JP5262765B2 (en) 2009-01-29 2009-01-29 PLC program conversion tool

Country Status (1)

Country Link
JP (1) JP5262765B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101243437B1 (en) * 2011-02-21 2013-03-13 성균관대학교산학협력단 Method and framework system for converting plc based control code to a general program code using xml interface
JP2016062126A (en) * 2014-09-12 2016-04-25 富士電機株式会社 Program convert device
CN107092206A (en) * 2016-02-17 2017-08-25 霍尼韦尔国际公司 With automatic International Electrotechnical Commission(IEC)The input/output of address generation(I/O)Binding
WO2019230321A1 (en) 2018-05-31 2019-12-05 オムロン株式会社 Support device and support program
CN115291853A (en) * 2022-10-09 2022-11-04 浙江中控研究院有限公司 Method and device for exporting and importing LD (laser diode) language in PLC (programmable logic controller) programming software
WO2023195282A1 (en) * 2022-04-06 2023-10-12 オムロン株式会社 Program conversion device, program inspection device, method, and program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06187015A (en) * 1992-12-15 1994-07-08 Kawasaki Steel Corp Program converter for sequencer
JP2002099312A (en) * 2000-09-22 2002-04-05 Mitsubishi Electric Corp Programmable controller and control program development supporting device
JP2004038876A (en) * 2002-07-08 2004-02-05 Hitachi Ltd Data format conversion method and device for program and the like, and controller management system using the data format conversion device
JP2006119884A (en) * 2004-10-21 2006-05-11 Fanuc Ltd Editing apparatus of sequence program
WO2008102426A1 (en) * 2007-02-19 2008-08-28 Mitsubishi Electric Corporation Peripheral device for programmable controller, replacement method, and program
JP2008276526A (en) * 2007-04-27 2008-11-13 Omron Corp Program development support device for industrial apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06187015A (en) * 1992-12-15 1994-07-08 Kawasaki Steel Corp Program converter for sequencer
JP2002099312A (en) * 2000-09-22 2002-04-05 Mitsubishi Electric Corp Programmable controller and control program development supporting device
JP2004038876A (en) * 2002-07-08 2004-02-05 Hitachi Ltd Data format conversion method and device for program and the like, and controller management system using the data format conversion device
JP2006119884A (en) * 2004-10-21 2006-05-11 Fanuc Ltd Editing apparatus of sequence program
WO2008102426A1 (en) * 2007-02-19 2008-08-28 Mitsubishi Electric Corporation Peripheral device for programmable controller, replacement method, and program
JP2008276526A (en) * 2007-04-27 2008-11-13 Omron Corp Program development support device for industrial apparatus

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101243437B1 (en) * 2011-02-21 2013-03-13 성균관대학교산학협력단 Method and framework system for converting plc based control code to a general program code using xml interface
JP2016062126A (en) * 2014-09-12 2016-04-25 富士電機株式会社 Program convert device
CN107092206A (en) * 2016-02-17 2017-08-25 霍尼韦尔国际公司 With automatic International Electrotechnical Commission(IEC)The input/output of address generation(I/O)Binding
WO2019230321A1 (en) 2018-05-31 2019-12-05 オムロン株式会社 Support device and support program
JP2019211823A (en) * 2018-05-31 2019-12-12 オムロン株式会社 Support device and support program
JP7003842B2 (en) 2018-05-31 2022-01-21 オムロン株式会社 Support equipment and support programs
WO2023195282A1 (en) * 2022-04-06 2023-10-12 オムロン株式会社 Program conversion device, program inspection device, method, and program
CN115291853A (en) * 2022-10-09 2022-11-04 浙江中控研究院有限公司 Method and device for exporting and importing LD (laser diode) language in PLC (programmable logic controller) programming software

Also Published As

Publication number Publication date
JP5262765B2 (en) 2013-08-14

Similar Documents

Publication Publication Date Title
JP5262765B2 (en) PLC program conversion tool
CN107710086B (en) Translation module, processing module and control system
Estévez et al. Automatic generation of PLC automation projects from component-based models
Tiegelkamp et al. IEC 61131-3: Programming industrial automation systems
EP2169547B1 (en) Compilation model for programmable logic controllers (PLC).
US9235381B2 (en) Method and device for the programming and configuration of a programmable logic controller
US6826432B2 (en) Process for programming an automation application
CN104239115A (en) Programming language compiling method of PLC (Programmable Logic Controller)
CN102073538B (en) Real-time run-time system and functional module for such a run-time system
CN109918081B (en) Compiling method and compiler
US20120079157A1 (en) Development of functional modules using a module bus
CN101763072A (en) Conversion method and device of numerical control machining code
CN112558541B (en) PLC programming extension system and method and electronic equipment
CN106933568B (en) Configuration software system and industrial control method
US20190012168A1 (en) Program generating apparatus
Hopsu et al. On portability of IEC 61499 compliant structures and systems
CN104238438A (en) PLC universal platform and design method thereof
CN112783736B (en) Method and device for monitoring running body time of software component and electronic equipment
WO2013005350A1 (en) Symbol table generation method, method for communication with peripheral apparatus and programmable logic controller
Marcos et al. Model-driven design of industrial control systems
US20100094438A1 (en) Method for exchanging structural components for an automation system
Wei et al. Research and implementation of plc editor system
JP6566151B2 (en) System design support apparatus and system design support method
Scott Learning RSLogix 5000 Programming: Build robust PLC solutions with ControlLogix, CompactLogix, and Studio 5000/RSLogix 5000
Kajihara et al. Development and products of the object-oriented engineering tool for the integrated controller based on IEC 61131-3

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121024

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121214

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20121214

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130415

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5262765

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150