JP4725747B2 - PLC control program development support device - Google Patents

PLC control program development support device Download PDF

Info

Publication number
JP4725747B2
JP4725747B2 JP2007119547A JP2007119547A JP4725747B2 JP 4725747 B2 JP4725747 B2 JP 4725747B2 JP 2007119547 A JP2007119547 A JP 2007119547A JP 2007119547 A JP2007119547 A JP 2007119547A JP 4725747 B2 JP4725747 B2 JP 4725747B2
Authority
JP
Japan
Prior art keywords
program
plc
development support
control program
source code
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.)
Active
Application number
JP2007119547A
Other languages
Japanese (ja)
Other versions
JP2008276525A (en
Inventor
智功 野原
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
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 filed Critical Omron Corp
Priority to JP2007119547A priority Critical patent/JP4725747B2/en
Publication of JP2008276525A publication Critical patent/JP2008276525A/en
Application granted granted Critical
Publication of JP4725747B2 publication Critical patent/JP4725747B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

この発明は、プログラマブル・コントローラ(以下、「PLC」と言う)の制御プログラム開発支援装置に係り、特に、当該開発支援装置上の制御プログラムとPLC側からアップロードされた制御プログラムとの照合機能を備えたPLCの制御プログラム開発支援装置に関する。   The present invention relates to a control program development support apparatus for a programmable controller (hereinafter referred to as “PLC”), and in particular, has a function of comparing a control program on the development support apparatus with a control program uploaded from the PLC side. The present invention relates to a PLC control program development support device.

周知のように、PLCの制御プログラムは、制御命令(オペコード)とオペランドとの組合わせによって記述される。オペランドは、命令実行の対象(データ)が格納されたメモリアドレスを指定するものである。   As is well known, a PLC control program is described by a combination of control instructions (opcodes) and operands. The operand designates a memory address in which an instruction execution target (data) is stored.

オペランドとしては、PLCの物理的なメモリアドレスをそのまま使用するのではなくて、図11に示されるように、「IOメモリ」、「データメモリ」等のようにその役割に応じたラベルを付けたラベル付きメモリアドレスを使用するのが一般的である。   As an operand, the physical memory address of the PLC is not used as it is, but as shown in FIG. 11, labels according to the roles such as “IO memory” and “data memory” are attached. It is common to use labeled memory addresses.

なお、図において、表記「0.0」とはIOメモリの第0行第0ビットを指定するラベル付きメモリアドレス、表記「1.0」とはIOメモリの第1行第0ビットを指定するラベル付きメモリアドレスである。また、表記「D0」とはデータメモリの第0行第0〜15ビットを指定するラベル付きメモリアドレス、表記「D1」とはデータメモリの第1行第0〜15ビットを指定するラベル付きメモリアドレスである。図示のラダー図で表記された制御プログラムの意味するところは、入力「0.0」がオンすると、リレー「1.0」がオンして、そのリレー出力「1.0」がオンし、データメモリのアドレス「D0」のデータがデータメモリのアドレス「D1」へと転送されるものである。   In the figure, the notation “0.0” designates a labeled memory address that designates the 0th row and 0th bit of the IO memory, and the notation “1.0” designates the 0th bit of the 1st row of the IO memory. Labeled memory address. The notation “D0” is a labeled memory address that specifies the 0th to 15th bits of the 0th row of the data memory, and the notation “D1” is a labeled memory that specifies the 0th to 15th bits of the first row of the data memory. Address. The meaning of the control program shown in the illustrated ladder diagram is that when the input “0.0” is turned on, the relay “1.0” is turned on, and the relay output “1.0” is turned on. Data at memory address “D0” is transferred to data memory address “D1”.

近年のプログラム開発支援装置では、特定のメモリアドレスに対してユーザが自由に名称(変数)をつけ、オペランドとしてこの名称を使用することで、命令実行対象が格納されたメモリアドレスを間接的に指定することができるような仕組みも提供されている(特許文献1参照)。   In recent program development support devices, a user can freely assign a name (variable) to a specific memory address and use this name as an operand to indirectly specify the memory address where the instruction execution target is stored A mechanism that can do this is also provided (see Patent Document 1).

このような仕組みを前提とした場合における制御プログラムのプログラミング(変数プログラミング)の一例が図12に示されている。ここで、「変数定義」とは、アドレスと名称との対応付けを意味するものである。図示のラダー図で表記された制御プログラムの意味するところは、名称「aaa」で指定される入力がオンすると、名称「bbb」で指定されるリレーがオンして、その名称「bbb」で指定されるリレー出力がオンし、データメモリの名称「xxx」で指定されるメモリエリアのデータがデータメモリの名称「yyy」で指定されるメモリエリアへと転送されるものである。   An example of control program programming (variable programming) when such a mechanism is assumed is shown in FIG. Here, “variable definition” means an association between an address and a name. The meaning of the control program shown in the illustrated ladder diagram is that when the input designated by the name “aaa” is turned on, the relay designated by the name “bbb” is turned on and designated by the name “bbb”. The relay output is turned on, and the data in the memory area designated by the data memory name “xxx” is transferred to the memory area designated by the data memory name “yyy”.

変数を使用した制御プログラムのプログラミングは、近年多用される「ファンクションブロック」を使用した制御プログラムのプログラミングとの併用において、より重要な意義を有する。   The programming of a control program using variables has a more important significance in combination with the programming of control programs using “function blocks” that are frequently used in recent years.

ファンクションブロックを使用したプログラミングの一例を示す説明図が図13に示されている。同図に示されるように、「ファンクションブロック」とは、所定のファンクションの実現に必要なプログラムをあらかじめファンクションブロックとして記述して別途記憶させておき、このファンクションブロックを制御プログラム中の必要な箇所から呼出して使う仕組みである(特許文献2参照)。この仕組みを利用すれば、プログラムの再利用性を向上させることができる。たとえば、同じ動作をさせたい装置が複数並んでいるような場合に、プログラムを各装置毎に別々に記述するのではなく、制御プログラム中の複数箇所から共通のファンクションブックを呼び出すように記述することで、それらの装置の制御を制御プログラム全体を長大化することなく実現することができる。また、このようなファンクションブロックを使用した制御プログラムの記述によれば、上述の装置部分のプログラムに間違いがあるようなときにでも、修正の必要箇所は1箇所で済み、変更に強い構造のプログラムを作成できる利点がある。   An explanatory diagram showing an example of programming using function blocks is shown in FIG. As shown in the figure, a “function block” is a program that is described in advance as a function block and stored separately as a function block, and this function block is stored from the required location in the control program. This is a mechanism to call and use (see Patent Document 2). If this mechanism is used, the reusability of the program can be improved. For example, when multiple devices that you want to perform the same operation are arranged side-by-side, do not write the program separately for each device, but write it so that a common function book is called from multiple locations in the control program. Thus, control of these devices can be realized without lengthening the entire control program. In addition, according to the description of the control program using such function blocks, even if there is an error in the program of the above-mentioned device part, only one place needs to be corrected, and the program has a structure resistant to changes. There is an advantage that can be created.

ファンクションブロックに相当するプログラムは再利用されることを想定するため、オペランドとして特定のメモリアドレスをそのまま使用することは稀であり、通常は、オペランドとしては変数(入出力名称等)が使用される。   Since it is assumed that a program corresponding to a function block is reused, it is rare to use a specific memory address as an operand as is, and a variable (input / output name, etc.) is usually used as an operand. .

それらの変数の中で、当該ファンクションブロックに対する外部からの入力又は当該ファンクションブロックからの外部への出力に係る変数については、特定のメモリアドレスに割り付ける必要があるが、その他のファンクションブロック内部でのみ使用される変数については、特定のメモリアドレスに割り付ける必要はない。そのため、従来のプログラム開発支援装置にあっては、ファンクションブロックに相当するプログラム中にオペランドとして使用される変数の中で、ファンクションブロック内部でのみ使用される変数については、ユーザの指定を待つことなく、自動的に適当なメモリアドレスを割り付ける機能(以下、「変数自動割付機能」と言う)が組み込まれている。   Among these variables, variables related to external input to the function block or output from the function block need to be assigned to specific memory addresses, but are used only inside other function blocks. There is no need to assign a specific memory address to a variable to be executed. Therefore, in the conventional program development support device, among variables used as operands in the program corresponding to the function block, variables used only within the function block do not wait for the user's specification. A function for automatically allocating appropriate memory addresses (hereinafter referred to as “variable automatic allocation function”) is incorporated.

すなわち、図13の例においては、外部からの入力である変数(aaa)については、特定のアドレスに割り付けることが必要であるが、ファンクションブロック内部のみで使用される変数(bbb,xxx,yyy)については、特定のアドレスに割り付ける必要はなく、そのため、任意のアドレスに自動割り付けされる。   That is, in the example of FIG. 13, it is necessary to assign a variable (aaa) that is an input from the outside to a specific address, but variables (bbb, xxx, yyy) that are used only inside the function block. Is not necessarily assigned to a specific address, and therefore is automatically assigned to an arbitrary address.

アドレスプログラミング(オペランドとしてメモリアドレスを使用するプログラミング手法)に対する変数プログラミング(オペランドとしてあらかじめ登録した変数を使用するプログラミング手法)のメリットとしては、主に次の2点を挙げることができる。   Advantages of variable programming (programming method using a variable registered in advance as an operand) over address programming (programming method using a memory address as an operand) can mainly include the following two points.

1)オペランドとして、単なる数字列(メモリアドレス)ではなく意味を持った文字列(名称)を指定できるため、制御プログラムの編集時に間違いを減らせる。また、他人が作成したプログラムの可読性が高まる。   1) Since a meaningful character string (name) can be specified as an operand, not just a numeric string (memory address), mistakes can be reduced when editing a control program. In addition, the readability of programs created by others increases.

2)変数とアドレスの対応付けがプログラムとは別に管理されるので、IO割付けの変更が容易になる。また、演算の途中結果を格納するような、特定のIOメモリである必要がないオペランドに対して、アドレスを自動的に割付けることによって、プログラミングの効率を向上させることができる。   2) Since the association between variables and addresses is managed separately from the program, the IO allocation can be easily changed. Also, programming efficiency can be improved by automatically assigning addresses to operands that do not need to be a specific IO memory, such as storing intermediate results of operations.

ユーザは、プログラム開発支援装置上でソースプログラム(ソースコード列、変数定義)の編集を行い、コンパイルによってPLCが実行できる形式のオブジェクトプログラム(オブジェクトコード列)に変換し、こうして得られたオブジェクトプログラム(オブジェクトコード列)をPLCに転送する。PLCは、開発支援装置から転送されたオブジェクトプログラム(オブジェクトコード列)をオブジェクトコードメモリに格納すると共に、これを実行することによって制御動作を実現する。なお、昨今のPLCにおいては、PLCからアップロードされた制御プログラムの可読性を向上するために、オブジェクトプログラム生成の元とされたソースプログラム(ソースコード列、変数定義)それ自体についても、PLC側へと転送して、オブジェクトプログラム(オブジェクトコード列)と一緒にPLC側に格納するように構成されている。   The user edits the source program (source code string, variable definition) on the program development support device, converts it into an object program (object code string) in a format that can be executed by the PLC by compilation, and obtains the object program ( The object code string is transferred to the PLC. The PLC stores the object program (object code string) transferred from the development support apparatus in the object code memory, and implements the control operation by executing it. In recent PLCs, in order to improve the readability of control programs uploaded from the PLC, the source program (source code string, variable definition) itself that is the source of the object program generation itself is also sent to the PLC side. The data is transferred and stored together with the object program (object code string) on the PLC side.

ところで、開発支援装置上の制御プログラムとPLCに格納された制御プログラムとは、必ずしも同一とはならない。特に、次のような場合には、両プログラムが一致しないという状況が発生しやすい。   By the way, the control program on the development support apparatus and the control program stored in the PLC are not necessarily the same. In particular, in the following cases, a situation in which both programs do not match is likely to occur.

1)プログラム開発時に、作成が終了したプログラム部分のみをPLCに転送してデバッグを実施した後で、それに対して更にプログラムの追加や修正を行った場合。   1) At the time of program development, after only the part of the program that has been created is transferred to the PLC and debugged, the program is further added or modified.

2)プログラム開発を複数人で行っている場合に、ある開発者がプログラムをPLCへ転送したあとで別の開発者がプログラムの変更を行った場合。   2) When multiple programs are being developed by one developer, and another developer changes the program after transferring the program to the PLC.

そのため、この種のプログラム開発支援装置には、開発支援装置上の制御プログラムとPLCに格納された制御プログラムとの照合を行うプログラム照合機能が組み込まれている。例えば、プログラムの編集を行う場合等には、このプログラム照合機能を利用することで、編集対象となる制御プログラムとPLCに格納された制御プログラムとの整合性を確認可能とされている。   Therefore, this type of program development support apparatus incorporates a program verification function for verifying a control program on the development support apparatus and a control program stored in the PLC. For example, when editing a program, etc., it is possible to check the consistency between the control program to be edited and the control program stored in the PLC by using this program collation function.

従来、プログラム開発支援装置に組み込まれていたプログラム照合機能は、開発支援装置上の制御プログラムを構成するオブジェクトコード列とPLCに格納された制御プログラムを構成するオブジェクトコード列とを照合すると共に、照合結果が不一致の場合には、所定の表示フォーマットにて両者を並べて表示すると共に、この並列表示に対して不一致箇所を示す表示を付加すると言った構成を採用するものであった。   Conventionally, the program collation function incorporated in the program development support apparatus collates the object code string constituting the control program on the development support apparatus with the object code string constituting the control program stored in the PLC. When the results do not match, a configuration is adopted in which both are displayed side by side in a predetermined display format, and a display indicating a mismatched portion is added to the parallel display.

このような構成を採用したのは、開発支援装置上の制御プログラムを構成するオブジェクトコード列とPLCに格納された制御プログラムを構成するオブジェクトコード列との照合結果が一致しなければ、両制御プログラムの実行結果として得られる制御内容は必ず相違するものとなるから、開発支援装置のユーザに対しては、オブジェクトコード列同士において、どこが相違するかの情報を提供しさえすれば、その後の編集作業等には十分であるとの意図に基づくものである。
特開2005−352612号公報 特開2004−303217号公報
Such a configuration is adopted because if the collation result between the object code sequence constituting the control program on the development support apparatus and the object code sequence constituting the control program stored in the PLC does not match, both control programs Since the control contents obtained as a result of the execution will always be different, if the development support device user is provided with information on where the object code strings differ, the subsequent editing work Is based on the intention of being sufficient.
JP 2005-352612 A JP 2004-303217 A

ところで、プログラミング手法としてアドレスプログラミングを採用する場合には、オペランドにはメモリアドレスそのものが記述されるため、開発支援装置上のソースプログラム(ソースコード列)をコンパイルして得られたオブジェクトプログラム(オブジェクトコード列)は、編集や改竄がされない限りにおいては、同様にして得られたのち、PLCに格納されたオブジェクトプログラム(オブジェクトコード列)と必ず一致する。しかも、オブジェクトプログラム(オブジェクトコード列)同士が相違すれば、それらをPLCで実行させた場合に実現される制御動作についても必ず相違する。したがって、上述のオブジェクトコード列同士を照合するプログラム照合機能があれば、両プログラム間における編集や改竄の有無を確実に判定して、両プログラムの実行結果としての制御動作が互いに相違する旨、及び、編集や改竄内容をユーザに通知することができる。   By the way, when address programming is adopted as a programming technique, since the memory address itself is described in the operand, the object program (object code) obtained by compiling the source program (source code string) on the development support apparatus. As long as no editing or falsification is made, the column) is obtained in the same manner, and always matches the object program (object code sequence) stored in the PLC. Moreover, if the object programs (object code strings) are different from each other, the control operation realized when they are executed by the PLC is also necessarily different. Therefore, if there is a program collation function for collating the object code strings described above, the presence or absence of editing or falsification between both programs is reliably determined, and the control operations as the execution results of both programs are different from each other, and The user can be notified of the contents of editing or falsification.

これに対して、プログラミング手法として変数プログラミングを採用する場合には、オペランドにはメモリアドレスではなくてメモリアドレスを間接的に指定する変数が記述されることに加えて、コンパイラには前述の変数自動割付機能が組み込まれているため、開発支援装置上のソースプログラム(ソースコード列、変数定義)をコンパイルして得られたオブジェクトプログラム(オブジェクトコード列)は、編集や改竄がされていないとしても、同様にして得られたのち、PLCに格納されたオブジェクトプログラム(オブジェクトコード列)とは必ずしも一致しない。しかも、変数自動割付機能を介して生成されたオブジェクトプログラム(オブジェクトコード列)同士が相違したとしても、それらをPLCで実行させた場合に実現される制御動作については必ずしも相違しない。したがって、上述のオブジェクトコード列同士を照合するプログラム照合機能があったとしても、両プログラム間における編集や改竄の有無を必ずしも正確に判定することができず、また両プログラムの実行結果としての制御動作が互いに相違するか否かも判定することができないと言う問題点がある。   On the other hand, when variable programming is adopted as a programming technique, a variable that indirectly specifies a memory address, not a memory address, is described in the operand, and in addition, the above-described variable automatic processing is included in the compiler. Since the allocation function is built in, the object program (object code string) obtained by compiling the source program (source code string, variable definition) on the development support device is not edited or falsified. After being obtained in the same manner, it does not necessarily match the object program (object code string) stored in the PLC. Moreover, even if the object programs (object code strings) generated through the automatic variable assignment function are different, the control operation realized when they are executed by the PLC is not necessarily different. Therefore, even if there is a program collation function for collating the above object code strings, it is not always possible to accurately determine whether editing or falsification has occurred between the two programs, and the control operation as the execution result of both programs There is a problem that it cannot be determined whether or not they are different from each other.

すなわち、変数プログラミングにあっては、ソースプログラム上の変数定義さえ変更すれば、変数名称とメモリアドレスとの関係は自在に変更可能である。したがって、2つのプログラム間において、可読性向上のために、変数名称は変更したものの、それに対応するメモリアドレスについては元のままとしたような場合には、従前の単にオブジェクトコード列同士を照合するプログラム照合機能では、このようなプログラム間の相違は判定することができない。   That is, in variable programming, the relationship between variable names and memory addresses can be freely changed as long as the variable definition on the source program is changed. Therefore, if the variable name is changed between two programs to improve readability, but the memory address corresponding to the variable name is left as it is, the program that simply collates the object code strings. The collation function cannot determine such differences between programs.

また、コンパイルの際の変数自動割付機能の作用によって、2つのプログラム間において、変数名称は変わらないものの、メモリアドレスについては相違する言った場合にも、従前のオブジェクトコード列同士が不一致であれば、制御動作も必ず不一致となると認識する従来のプログラム照合機能では、このようなプログラム間の相違は判定することができない。   In addition, although the variable name does not change between the two programs due to the action of the automatic variable allocation function at the time of compilation, even if the memory address is different, if the previous object code strings do not match, Such a difference between programs cannot be determined by the conventional program verification function that recognizes that the control operation also always does not match.

この発明は、上述の問題点に着目してなされたものであり、その目的とするところは、変数プログラミングが採用される場合にあっても、当該開発支援装置上の制御プログラムとPLCに格納された制御プログラムとの間における関係をより詳細に分析して、その結果をユーザに対して判りやすく通知することが可能なPLCの制御プログラム開発支援装置を提供することにある。   The present invention has been made paying attention to the above-mentioned problems, and the object thereof is to be stored in the control program and PLC on the development support apparatus even when variable programming is adopted. It is an object of the present invention to provide a PLC control program development support device capable of analyzing the relationship between the control program and the control program in more detail and notifying the user of the result in an easily understandable manner.

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

上述の技術的な課題は、以下の構成を有するPLCの制御プログラム開発支援装置により解決することができる。このPLCの制御プログラム開発支援装置は、制御プログラムとして、実行形式のオブジェクトプログラムとそのオブジェクトプログラム生成の元とされたソースプロクラムとの双方が格納されるPLCを対象とするものであり、以下の構成要件を有する。   The above technical problem can be solved by a PLC control program development support apparatus having the following configuration. This PLC control program development support apparatus targets a PLC that stores both an executable object program and a source program from which the object program is generated, as a control program. Have requirements.

すなわち、このPLCの制御プログラム開発支援装置は、対象となるPLCからオブジェクトプログラムに相当するオブジェクトコード列とソースプログラムに相当するソースコード列及び変数定義をアップロードする手段と、対象となるPLCのものとして、当該開発支援装置側が保有する制御プログラムから、オブジェクトプログラムに相当するオブジェクトコード列とソースプログラムに相当するソースコード列及び変数定義を読み出す読み出し手段と、PLC側のオブジェクトコード列と開発支援装置側のオブジェクトコード列とを照合する第1の照合手段と、PLC側のソースコード列と開発支援装置側のソースコード列とを照合する第2の照合手段と、第1の照合手段の照合結果と第2の照合手段の照合結果との組合せにより定義される4つの場合分けのそれぞれ毎に、所定の表示形態による案内表示を行う表示制御手段と、を具備するものである。   That is, this PLC control program development support device includes means for uploading an object code sequence corresponding to an object program, a source code sequence corresponding to a source program, and a variable definition from the target PLC, and a target PLC. Reading means for reading out an object code sequence corresponding to the object program, a source code sequence corresponding to the source program, and a variable definition from a control program held by the development support device side, and an object code sequence on the PLC side and the development support device side First collation means for collating the object code string, second collation means for collating the source code string on the PLC side and the source code string on the development support apparatus side, the collation result of the first collation means, Determined by the combination with the verification result of 2 verification means For each of the four cases divided to be one in which comprises display control means for performing guidance display by a predetermined display form, a.

このような構成によれば、変数プログラミングが採用される場合にあっても、当該開発支援装置上の制御プログラムとPLCに格納された制御プログラムとの間における関係をより詳細に分析して、その結果をユーザに対して判りやすく通知することが可能なPLCの制御プログラム開発支援装置を提供することができる。   According to such a configuration, even when variable programming is adopted, the relationship between the control program on the development support apparatus and the control program stored in the PLC is analyzed in more detail, It is possible to provide a PLC control program development support apparatus capable of notifying the user of the result in an easily understandable manner.

好ましい実施の形態においては、オブジェクトコード列同士が不一致でかつソースコード列同士も不一致の場合には、両制御プログラムは異なるものである旨を示す所定の表示形態による案内表示を行うように仕組まれる。このとき、所定の表示形態としては、両ソースコード列に対応するプログラムリストをプログラム行同士を整合させて並列表示すると共に、両者が相違するプログラム行に関しては、色彩、輝度等々を異ならせた行識別表示を行うものであってもよい。   In a preferred embodiment, when the object code strings do not match and the source code strings also do not match, the control program is configured to perform guidance display in a predetermined display form indicating that the two control programs are different. . At this time, as a predetermined display form, program lists corresponding to both source code strings are displayed in parallel by aligning program lines with each other, and for program lines in which the two are different, lines having different colors, brightness, etc. An identification display may be performed.

好ましい実施の形態においては、オブジェクトコード列同士が不一致でかつソースコード列同士が一致の場合には、メモリアドレスが自動割付けれされたか否かを確認可能な所定の表示形態による案内表示を行うように仕組まれる。このとき、所定の表示形態が、両変数定義に対応するプログラムリストをプログラム行同士を整合させて並列表示すると共に、両者が相違するプログラム行に関しては、色彩、輝度等々を異ならせた行識別表示を行うものであってもよい。   In a preferred embodiment, when the object code strings do not match and the source code strings match, the guidance display is performed in a predetermined display form that can confirm whether or not the memory address is automatically assigned. It is structured. At this time, the predetermined display form displays the program list corresponding to both variable definitions in parallel by aligning the program lines, and for the program lines different from each other, the line identification display with different colors, brightness, etc. It may be what performs.

好ましい実施の形態においては、オブジェクトコード列同士が一致でかつソースコード列同士が不一致の場合には、メモリアドレスは変更することなく変数名のみが変更されたことを確認可能な所定の表示形態による案内表示を行うように仕組まれる。このとき、所定の表示形態が、両ソースコード列に対応するプログラムリストをプログラム行同士を整合させて並列表示すると共に、両者が相違するプログラム行に関しては、色彩、輝度等々を異ならせた行識別表示を行ない、さらに、行識別表示には、オブジェクトコード列は同一である旨を示す文字や記号等のキャラクタ表示を付するものでってもよい。   In a preferred embodiment, when the object code strings match and the source code strings do not match, the memory address is not changed, and only a variable name can be confirmed to be changed. It is designed to display guidance. At this time, the predetermined display form displays the program lists corresponding to both source code strings in parallel by aligning the program lines, and for the program lines that differ from each other, the line identification with different colors, brightness, etc. The display may be performed, and the line identification display may be displayed with a character display such as a character or a symbol indicating that the object code strings are the same.

好ましい実施の形態においては、オブジェクトコード列同士が一致でかつソースコード列同士も一致の場合には、両制御プログラムは同一のものである旨を示す所定の表示形態による案内表示を行うように仕組まれる。   In a preferred embodiment, when the object code strings are identical and the source code strings are identical, the control program is configured to perform guidance display in a predetermined display form indicating that the two control programs are the same. It is.

本発明によれば、変数プログラミングが採用される場合にあっても、当該開発支援装置上の制御プログラムとPLCに格納された制御プログラムとの間における関係をより詳細に分析して、その結果をユーザに対して判りやすく通知することが可能なPLCの制御プログラム開発支援装置を提供することができる。   According to the present invention, even when variable programming is adopted, the relationship between the control program on the development support apparatus and the control program stored in the PLC is analyzed in more detail, and the result is obtained. It is possible to provide a PLC control program development support device capable of easily informing a user.

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

本発明が適用される制御プログラム開発支援装置の電気的ハードウェア構成図が図1に示されている。同図に示されるように、開発支援装置1は、編集中のプログラムの表示、照合結果の表示などを行う表示部101と、ユーザからの入力(プログラムの編集内容、照合開始の指示)を受ける入力部102と、CPUが使用するメモリとして機能するRAM103と、ユーザデータを格納するためのHDDと、プログラム編集の入出力制御、通信処理の制御、照合の実行などを行うCPUとを有する。   An electrical hardware configuration diagram of a control program development support apparatus to which the present invention is applied is shown in FIG. As shown in the figure, the development support apparatus 1 receives a display unit 101 for displaying a program being edited, a collation result, and the like, and input from the user (program editing contents, collation start instruction). It has an input unit 102, a RAM 103 that functions as a memory used by the CPU, an HDD for storing user data, and a CPU that performs input / output control of program editing, control of communication processing, execution of collation, and the like.

本発明に係る制御プログラム開発支援装置の対象となるPLCのハードウェア構成図が図2に示されている。同図に示されるように、PLC2は、PLCに対する入出力状態や演算結果を格納するIOメモリ201と、制御プログラムの実行、通信処理の制御などを行うCPU202と、PLCとのデータ通信を行う通信I/F203と、PLCが実行する制御プログラムを格納するオブジェクトコードメモリ204と、ソースコードを格納するソースコードメモリ205と、変数定義を格納する変数定義メモリ206とを有する。   FIG. 2 shows a hardware configuration diagram of a PLC that is a target of the control program development support apparatus according to the present invention. As shown in the figure, the PLC 2 is a communication that performs data communication with the PLC, an IO memory 201 that stores an input / output state and calculation results for the PLC, a CPU 202 that executes a control program, controls communication processing, and the like. It has an I / F 203, an object code memory 204 that stores a control program executed by the PLC, a source code memory 205 that stores source code, and a variable definition memory 206 that stores variable definitions.

本発明に関連して取り扱われるソースコード、変数定義、オブジェクトコードの相互関係を示す説明図が図3に示されている。同図に示されるように、ユーザは、プログラム開発支援装置1上でソースプログラム(ソースコード列11、変数定義12)の編集を行い、コンパイラ13によってPLCが実行できる形式のオブジェクトプログラム(オブジェクトコード列14)に変換し、こうして得られたオブジェクトプログラム(オブジェクトコード列14)をPLC2に転送する。PLC2は、開発支援装置1から転送されたオブジェクトプログラム(オブジェクトコード列14)をオブジェクトコードメモリ22に格納すると共に、これを実行することによって制御動作を実現する。なお、昨今のPLCにおいては、PLCからアップロードされた制御プログラムの可読性を向上するために、オブジェクトプログラム生成の元とされたソースプログラム(ソースコード列11、変数定義12)それ自体についても、PLC側へと転送して、オブジェクトプログラム(オブジェクトコード列)と一緒にPLC側のソースコードメモリ21、変数定義メモリ23に格納するように構成されている。   FIG. 3 is an explanatory diagram showing the interrelationship between source code, variable definition, and object code handled in connection with the present invention. As shown in the figure, the user edits a source program (source code sequence 11, variable definition 12) on the program development support apparatus 1, and an object program (object code sequence) that can be executed by the compiler 13 using a PLC. 14), and the object program (object code string 14) thus obtained is transferred to the PLC 2. The PLC 2 stores the object program (object code string 14) transferred from the development support apparatus 1 in the object code memory 22 and implements the control operation by executing it. In the recent PLC, in order to improve the readability of the control program uploaded from the PLC, the source program (source code sequence 11, variable definition 12) itself that is the source of the object program generation is also the PLC side. And stored in the source code memory 21 and variable definition memory 23 on the PLC side together with the object program (object code string).

次に、変数プログラミングが適用される場合において、PLC側に格納される制御プログラムと開発支援装置側に保持れされる制御プログラムとの間に、どのような異同関係が生ずるかについて説明する。   Next, when variable programming is applied, a description will be given of the difference between the control program stored on the PLC side and the control program held on the development support apparatus side.

PLC側に格納される制御プログラムと開発支援装置側に保持れされる制御プログラムとの間には、図5に示されるように、オブジェクトコード列の照合結果とソースコード列の照合結果との組合せにより規定される4つの場合分けが想定される。

[1]オブジェクトコードが不一致で、かつソースコードも不一致の場合

これは、意図的な変更が行われている場合である。ユーザは、不一致箇所の確認、必要であれば修正を行わねばならない。

[2]オブジェクトコードが不一致でかつソースコードが一致の場合

これは、変数の名称に対応するメモリアドレスが変更されている場合である。この変更は、ユーザが意図的に行う場合もあれば、コンパイルのタイミングで自動的に行われる場合(変数自動割付機能)もある。変更のあったメモリアドレスが入出力として使われるものか内部的に使われるものかで、PLCの制御動作に関する判断が異なる。

a)入出力として使われる場合:PLCの制御動作は不一致
b)内部的に使われる場合 :PLCの制御動作は一致

[3]オブジェクトコードが一致でかつソースコードが不一致の場合

変数の名称だけが変更されている場合である。この場合、PLCの制御動作は一致する。

[4]オブジェクトコードが一致でかつソースコードも一致の場合

両制御プログラムが同一の場合である。

そして、従来のオブジェクトコードだけを照合する手法では、[2]の場合の判断ができなかった。しかし、ソースコードだけを照合する手法でも、[3]の場合で間違った判断をすることになる。したがって、変数プログラミングでは、オブジェクトコードとソースコードの両方を照合する必要があることが判る。

本発明に係る制御プログラム開発支援装置のソフトウェア構成を示すフローチャートが図4に示されている。同図において、処理が開始されると、例えばキーボードやマウスからの信号に基づき、ユーザの照合開始指示を待機し、これが到来するのを待って、本発明に係る一連の処理を開始する。
Between the control program stored on the PLC side and the control program held on the development support apparatus side, as shown in FIG. 5, a combination of the collation result of the object code string and the collation result of the source code string The four cases defined by are assumed.

[1] When the object code does not match and the source code also does not match

This is the case when an intentional change has been made. The user must check for inconsistencies and correct if necessary.

[2] When the object code does not match and the source code matches

This is a case where the memory address corresponding to the variable name has been changed. This change may be intentionally performed by the user or may be automatically performed at the time of compilation (automatic variable assignment function). The judgment regarding the control operation of the PLC differs depending on whether the changed memory address is used as an input / output or used internally.

a) When used as input / output: PLC control operations do not match b) When used internally: PLC control operations match

[3] When the object code matches and the source code does not match

This is the case when only the variable name is changed. In this case, the control operations of the PLC match.

[4] When the object code matches and the source code also matches

This is the case when both control programs are the same.

In the conventional method of collating only the object code, the determination in the case of [2] cannot be made. However, even the method of collating only the source code makes an incorrect determination in the case of [3]. Therefore, it can be seen that in variable programming, it is necessary to collate both object code and source code.

A flow chart showing the software configuration of the control program development support apparatus according to the present invention is shown in FIG. In the figure, when the process is started, for example, based on a signal from a keyboard or a mouse, the user waits for a collation start instruction, waits for the arrival of the instruction, and starts a series of processes according to the present invention.

先に図3を参照して説明したように、開発支援装置1の側には、ソースコード11と、変数定義12と、それらをコンパイラ13にかけることによって生成されたオブジェクトコード14とが保存されている。この保存は、開発支援装置1を構成するパソコンのハードディスク(HDD)104に格納されていたり、あるいは別途適当なリムーバブルメモリに格納されていてもよい。   As described above with reference to FIG. 3, the source code 11, the variable definition 12, and the object code 14 generated by applying them to the compiler 13 are stored on the development support apparatus 1 side. ing. This storage may be stored in a hard disk (HDD) 104 of a personal computer constituting the development support apparatus 1 or may be stored in a separate removable memory.

続くステップ402では、PLCのオブジェクトコードメモリ22に格納されているオブジェクトコードをアップロードする。続くステップ403では、PLCのソースコードメモリ21及び変数定義メモリ23にそれぞれ格納されているソースコード・変数定義をアップロードする。以上のアップロード処理については、通信を介して所定の手順で行われ、その詳細については各種の文献において公知であるから説明は省略する。   In the subsequent step 402, the object code stored in the object code memory 22 of the PLC is uploaded. In the subsequent step 403, the source code and variable definitions stored in the PLC source code memory 21 and variable definition memory 23 are uploaded. The upload process described above is performed in a predetermined procedure via communication, and details thereof are well known in various documents, and thus the description thereof is omitted.

このようにして、オブジェクトコード、ソースコード、変数定義がそれぞれアップロード完了されたならば、本発明の要部であるところのプログラム照合処理及び案内表示処理が開始される。   In this way, when the object code, the source code, and the variable definition are respectively uploaded, the program collation process and the guidance display process, which are the main parts of the present invention, are started.

プログラム照合処理においては、まず、PLC側のオブジェクトコード列と開発支援装置側のオブジェクトコード列とを照合する第1の照合処理(ステップ404)を実行する。プログラムの照合方法としては、a)照合対象の全データ、b)照合対象データのサム値、c)照合対象データ作成日時等の付随する情報、のいずれかのデータを用いて行うことができる。   In the program collation process, first, a first collation process (step 404) for collating the object code string on the PLC side with the object code string on the development support apparatus side is executed. As a program collation method, the data can be any one of a) all the data to be collated, b) the sum value of the collation target data, and c) accompanying information such as the collation target data creation date and time.

第1の照合処理(ステップ404)の実行が完了すると、その照合結果が「一致」又は「不一致」のいずれかに拘わらず、PLC側のソースコード列と開発支援装置側のソースコード列とを照合する第2の照合処理(ステップ405又は408)が実行される。   When the execution of the first collation processing (step 404) is completed, the source code string on the PLC side and the source code string on the development support apparatus side are obtained regardless of whether the collation result is “match” or “mismatch”. A second collation process (step 405 or 408) for collation is executed.

すなわち、第1の照合処理(ステップ404)において、照合結果が「不一致」と判定されると、続いて、ステップ405へと進んで、PLC側のソースコード列と開発支援装置側のソースコード列との照合処理が実行される(ステップ405)。ここで、照合結果が「不一致」の場合には、続いて、ステップ406へ進んで、ソースコードの不一致箇所を詳細表示する処理が実行される(ステップ406)。   That is, in the first collation process (step 404), when it is determined that the collation result is “mismatch”, the process proceeds to step 405, where the source code string on the PLC side and the source code string on the development support apparatus side (Step 405). Here, when the collation result is “mismatch”, the process proceeds to step 406 to execute a process of displaying the mismatched portion of the source code in detail (step 406).

ここで、オブジェクトコードが不一致で(ステップ404「不一致」)かつソースコードも不一致(ステップ405「不一致」)となる場合とは、プログラム作成者又は他の作成者が意図的に制御プログラムを変更した場合などを挙げることができる。このとき、ステップ406においては、両制御プログラムは異なるものである旨を示す所定の表示形態による案内表示が行われる。所定の表示形態としては、両ソースコード列に対応するプログラムリストをプログラム行同士を整合させて並列表示すると共に、両者が相違するプログラム行に関しては、色彩、輝度等々を異ならせた行識別表示を行うものなどを採用することができる(例えば図10参照)。   Here, when the object code does not match (step 404 “mismatch”) and the source code also does not match (step 405 “mismatch”), the program creator or another creator has intentionally changed the control program. Cases can be mentioned. At this time, in step 406, guidance display is performed in a predetermined display form indicating that the two control programs are different. As a predetermined display form, program lists corresponding to both source code strings are displayed in parallel by aligning program lines, and for program lines that are different from each other, line identification display with different colors, brightness, etc. is performed. What to do etc. can be employ | adopted (for example, refer FIG. 10).

図10の例においては、符号1001が付された、両者が相違するプログラム行に関しては、色彩、輝度等を異ならせた(この例では、例えば黄色に着色)行識別表示が行われるのに対し、符号1002が付された、両者が相違しないプログラム行に関しては、白色とされている。なお、符号1003は相違する箇所の色見本、1004は相違しない箇所の色見本である。   In the example of FIG. 10, the program lines denoted by reference numeral 1001 are different in color, luminance, etc. (in this example, colored yellow, for example), while the line identification display is performed. The program lines denoted by reference numeral 1002 and not different from each other are white. Reference numeral 1003 is a color sample at a different location, and 1004 is a color sample at a different location.

一方、オブジェクトコードが不一致で(ステップ404「不一致」)かつソースコードが一致(ステップ405「一致」)の場合には、ステップ407へ進んで、変数定義の不一致箇所を詳細表示する処理が実行される。ここで、オブジェクトコードが不一致(ステップ404「不一致」)でかつソースコードが一致(ステップ405「一致」)する場合とは、次のような場合を想定することができる。   On the other hand, if the object code does not match (step 404 “mismatch”) and the source code matches (step 405 “match”), the process proceeds to step 407 to execute a process of displaying in detail the mismatched portion of the variable definition. The Here, the case where the object code does not match (step 404 “disagree”) and the source code matches (step 405 “match”) can be assumed as follows.

すなわち、照合の結果、オブジェクトコードが不一致でソースコードが一致となる場合がある。これは、変数の名称には変更がないが、変数に割り当てられたメモリアドレスが変更されている場合に発生する。この変数が、演算の途中結果を格納するなどPLCの入出力に影響しないものであれば、オブジェクトコードが不一致であってもPLCの制御動作は変わらない。   That is, as a result of collation, the object code may not match and the source code may match. This occurs when the name of the variable is not changed, but the memory address assigned to the variable is changed. If this variable does not affect the input / output of the PLC, such as storing an intermediate result of the operation, even if the object codes do not match, the control operation of the PLC does not change.

このような状態が起こる場合としては、ファンクションブロックを使用するものとアドレスの自動割付機能を使用するものを挙げることができる。   Cases where such a situation occurs include those using a function block and those using an automatic address assignment function.

図6に示されるように、ファンクションブロックは制御のロジック(ファンクション)を定義するが、その中で使用される命令語のオペランドには変数を指定する変数プログラミング方式が一般的である。プログラムが動作するときに使用するメモリアドレスはユーザには意識させず、コンパイルのタイミングで開発支援装置が自動的に割当を行う。この仕組みによって、以前作成したファンクションブロックを別のところで再利用することが可能となる。   As shown in FIG. 6, the function block defines control logic (function), but a variable programming method is generally used in which a variable is specified for the operand of an instruction word used therein. The memory address used when the program operates is not conscious of the user, and the development support apparatus automatically assigns it at the timing of compilation. This mechanism makes it possible to reuse previously created function blocks elsewhere.

しかし、再利用によって割り付けられるメモリアドレスが変わるため、プログラムを変更していないにも拘わらず、オブジェクトコードによる照合結果は不一致となってしまう。このため、ファンクションブロックの場合には、ソースコードによる照合結果を元に判断する必要がある。   However, since the memory address allocated by the reuse changes, the collation result by the object code becomes inconsistent even though the program is not changed. For this reason, in the case of a function block, it is necessary to make a determination based on the collation result by the source code.

一方、開発支援装置がアドレス自動割付機能を持っている場合にも、ファンクションブロックと同様にオブジェクトコード不一致でソースコード一致という状況が起こり得る。アドレス自動割付機能とは、通常であればユーザが逐一設定しなければならない変数に対するメモリアドレスの割当を、開発支援装置が自動的に行うものである。制御プログラムの中で、演算の途中結果を格納するためのメモリは、特に決まったメモリアドレスである必要はない。このような場合に、変数を自動割付の変数として登録しておけば、プログラムの動作で使うメモリアドレスは開発支援装置が空いているメモリアドレスを自動的に割り当てる。   On the other hand, even when the development support apparatus has an automatic address assignment function, a situation can occur in which source code matches due to object code mismatch as in the case of function blocks. In the automatic address assignment function, the development support apparatus automatically assigns memory addresses to variables that the user must normally set one by one. In the control program, the memory for storing the intermediate result of the operation does not need to have a specific memory address. In such a case, if a variable is registered as a variable for automatic allocation, a memory address that is free in the development support apparatus is automatically allocated as a memory address used in the operation of the program.

アドレスの自動割付機能によって、オブジェクトコードが不一致でソースコードが一致する場合の説明図が図7に示されている。同図において、符号71aと符号71b、符号72aと符号72b、符号73aと符号73b、符号74aと符号74b、符号75aと符号75bがそれぞれ付された箇所を比較して明らかなように、ソースコード列は両者間で一致していても、変数定義ないしオブジェクトコード列は部分的に(特に、内部アドレスについては)相違する。   FIG. 7 shows an explanatory diagram when the object code does not match and the source code matches by the automatic address assignment function. In the same figure, it is clear that the reference numerals 71a and 71b, 72a and 72b, 73a and 73b, 74a and 74b, and 75a and 75b are compared. Even if the columns match, the variable definition or object code sequence is partially different (particularly for internal addresses).

このような場合には、ユーザの意図としては、PLCの制御動作に変更を加えていないことになる。従って、照合結果としてプログラムは一致と判定する。但し、ソースプログラムに変更がなくても変数定義が変更されているということが分かるように、図8に示されるように、変数定義の不一致箇所を詳細表示する。   In such a case, as a user's intention, the PLC control operation is not changed. Therefore, the program determines that the results match as the verification result. However, in order to understand that the variable definition has been changed even if there is no change in the source program, as shown in FIG.

図8に示されるように、この表示形態は、両変数定義に対応するプログラムリストをプログラム行同士を整合させて整列表示すると共に、両者が相違するプログラム行(符号81参照)に関しては、色彩、輝度等々を異ならせた行識別表示を行うものである。なお、この例にあっては、符号81が付された不一致プログラム行については黄色の着色が行われ、符号82が付された一致プログラム行については白色とされている。なお、83は不一致箇所の着色を示す色見本、84は一致箇所の着色を示す色見本である。   As shown in FIG. 8, this display form displays a program list corresponding to both variable definitions by aligning program lines with each other and arranging program lines (see reference numeral 81) that are different from each other in color, Line identification display with different brightness and the like is performed. In this example, the non-matching program line denoted by reference numeral 81 is colored yellow, and the matching program line denoted by reference numeral 82 is white. Note that reference numeral 83 denotes a color sample indicating coloring of the mismatched portion, and reference numeral 84 denotes a color sample indicating coloring of the matching portion.

図4に戻って、オブジェクトコードが一致(ステップ404「一致」)で、かつソースコードが不一致(ステップ408「不一致」)とされる場合には、ステップ409へと進んで、[バイナリ一致]の文字列付きで不一致箇所を詳細表示する。この表示形態としては、例えば、両ソースコード列に対応するプログラムリストをプログラム行同士を整合させて並列表示すると共に、両者が相違するプログラム行に関しては、色彩、輝度等々を異ならせた行識別表示を行い、さらに、行識別表示には、オブジェクトコード列は同一である旨を示す文字や記号等のキャラクタ表示(例えば、[バイナリ一致])を付するものである。   Returning to FIG. 4, if the object code matches (step 404 “match”) and the source code does not match (step 408 “mismatch”), the process proceeds to step 409 and [binary match] is set. Detailed display of non-matching parts with character strings. As this display form, for example, program lists corresponding to both source code strings are displayed in parallel by aligning program lines, and line identification display in which colors, brightness, etc. are different for program lines different from each other. In addition, the line identification display is provided with a character display (for example, [binary match]) such as characters and symbols indicating that the object code strings are the same.

ここで、オブジェクトコードが一致(ステップ404「一致」)で、かつソースコードが不一致(ステップ408「不一致」)とは、次のような場合を想定することができる。   Here, the case where the object code matches (step 404 “match”) and the source code does not match (step 408 “match”) can be assumed as follows.

すなわち、ユーザがプログラムをより分かりやすくするなどの理由により、変数の名称を変更する場合がある。ユーザの各種変更などによって、オブジェクトコードが一致でソースコードが不一致となる場合の説明図が図9に示されている。   That is, the name of the variable may be changed for the purpose of making the program easier to understand. FIG. 9 shows an explanatory diagram in the case where the object code matches and the source code does not match due to various changes of the user.

同図に示されるように、変数の名称が変更されたことにより(符号91aと符号91bとがそれぞれ付された部分参照)、ソースコードは不一致となる。しかし、変数に対するメモリアドレスの割当は変更されていないため(符号92aと符号92bとが付されている部分参照)、オブジェクトコードは一致する。従って、照合結果としてもソースコードは不一致であるがオブジェクトコードが一致しているということが分かるようにしなければならない。   As shown in the figure, when the names of the variables are changed (refer to the portions denoted by reference numerals 91a and 91b, respectively), the source codes do not match. However, since the allocation of the memory address to the variable has not been changed (refer to the portions denoted by reference numerals 92a and 92b), the object codes match. Therefore, it should be understood that the source code does not match but the object code matches as the collation result.

オブジェクトコードが一致でソースコードが不一致となる場合の案内表示例を示す説明図が図10に示されている。同図に示されるように、この例にあっては、両ソースコード列に対応するプログラムリストをプログラム行同士を整合させて並列表示すると共に、両者が相違するプログラム行に関しては、符号1001に示されるように、色彩、輝度等々を異ならせ(この例では黄色に着色)た行識別表示を行い、さらに、行識別表示には、符号1005,1006に示されるように、オブジェクトコード列は同一である旨を示す文字や記号等のキャラクタ表示(この例では[バイナリ一致]の文字列)を付するものである。なお、図において、符号1002が付された一致行については白色に着色され、また1003は相違部分の色見本、1004は一致部分の色見本である。   FIG. 10 is an explanatory diagram showing an example of guidance display when the object code matches and the source code does not match. As shown in the figure, in this example, program lists corresponding to both source code strings are displayed in parallel by matching program lines, and program lines different from each other are indicated by reference numeral 1001. As shown in the figure, line identification display with different colors, brightness, etc. (colored yellow in this example) is performed. Further, as shown by reference numerals 1005 and 1006, the object code string is the same for the line identification display. Characters such as characters and symbols indicating that there is a character (in this example, a character string of [binary match]) is attached. In the figure, the matching line denoted by reference numeral 1002 is colored white, 1003 is a color sample of a different portion, and 1004 is a color sample of a matching portion.

このような表示形態によれば、オペレータにとって可読性の高いソースプログラム上において、どのプログラム行が相違し、かつオブジェクトプログラム上においては一致していることを一目瞭然に把握させることができる。   According to such a display form, it is possible to clearly recognize which program lines are different on the source program that is highly readable for the operator and that they match on the object program.

図4に戻って、オブジェクトコードが一致(ステップ404「一致」)で、かつソースコードも一致(ステップ408「一致」)の場合には、ステップ410へ進んで、両制御プログラムは同一のものである旨を示す所定の表示形態による案内表示(例えば、「一致」の文字)を行う。   Returning to FIG. 4, if the object code matches (step 404 “match”) and the source code also matches (step 408 “match”), the process proceeds to step 410 where both control programs are the same. Guidance display (for example, “match” characters) in a predetermined display form indicating that there is a certain is performed.

以上説明した実施形態によれば、対象となるPLCからオブジェクトプログラムに相当するオブジェクトコード列とソースプログラムに相当するソースコード列及び変数定義をアップロードする手段(ステップ402,403)と、対象となるPLCのものとして、当該開発支援装置側が保有する制御プログラム(例えば、HDD104に格納)から、オブジェクトプログラムに相当するオブジェクトコード列とソースプログラムに相当するソースコード列及び変数定義を読み出す読出手段と、PLC側のオブジェクトコード列と開発支援装置側のオブジェクトコード列とを照合する第1の照合手段(ステップ404)と、PLC側のソースコード列と開発支援装置側のソースコード列とを照合する第2の照合手段(ステップ405又は408)と、第1の照合手段の照合結果と第2の照合手段の照合結果との組み合わせにより定義される4つの場合分けのそれぞれ毎に、所定の表示形態による案内表示を行う表示制御手段(ステップ406,407,409,410)とを具備するものであるから、変数プログラミングが採用される場合にあっても、当該開発支援装置上の制御プログラムとPLCに格納された制御プログラムとの間における関係をより詳細に分析して、その結果をユーザに対して分かり易く通知することができ、ことに、PLC制御プログラムの照合を行う場合において、ソースコードとオブジェクトコードとを同時に照合することによって、単なるデータの比較だけでは判別が困難であるPLC制御動作の一致・不一致を確実に把握することが可能となる。   According to the embodiment described above, the means for uploading the object code sequence corresponding to the object program, the source code sequence corresponding to the source program and the variable definition from the target PLC (steps 402 and 403), and the target PLC Reading means for reading out an object code string corresponding to an object program, a source code string corresponding to a source program, and a variable definition from a control program (for example, stored in the HDD 104) possessed by the development support apparatus, and a PLC side First collating means (step 404) for collating the object code string of the development support apparatus and the object code string of the development support apparatus, and a second collation of the PLC source code string and the development support apparatus side source code string Verification means (step 405 or 40 ) And a display control means for displaying guidance in a predetermined display form for each of the four cases defined by the combination of the collation result of the first collation means and the collation result of the second collation means (step 406, 407, 409, 410), even when variable programming is adopted, the relationship between the control program on the development support apparatus and the control program stored in the PLC The results can be notified to the user in an easy-to-understand manner. In particular, when collating the PLC control program, by comparing the source code and the object code at the same time, It becomes possible to reliably grasp the coincidence / non-coincidence of PLC control operations that are difficult to discriminate only by comparing data.

本発明によれば、変数プログラミングが採用される場合にあっても、当該開発支援装置上の制御プログラムとPLCに格納された制御プログラムとの間における関係をより詳細に分析して、その結果をユーザに対して判りやすく通知することが可能なPLCの制御プログラム開発支援装置を提供することができる。   According to the present invention, even when variable programming is adopted, the relationship between the control program on the development support apparatus and the control program stored in the PLC is analyzed in more detail, and the result is obtained. It is possible to provide a PLC control program development support device capable of easily informing a user.

本発明が適用される制御プログラム開発支援装置の電気的ハードウェア構成図である。It is an electrical hardware block diagram of the control program development assistance apparatus with which this invention is applied. 本発明に係る制御プログラム開発支援装置の対象となるPLCのハードウェア構成図である。It is a hardware block diagram of PLC used as the object of the control program development support device concerning the present invention. 本発明に関して取り扱われるソースコード、変数定義、オブジェクトコードの相互関係を示す説明図である。It is explanatory drawing which shows the mutual relationship of the source code handled regarding this invention, a variable definition, and an object code. 本発明に係る制御プログラム開発支援装置のソフトウェア構成を示すフローチャートである。It is a flowchart which shows the software structure of the control program development assistance apparatus which concerns on this invention. 支援装置側とPLC装置側とでソースコードとオブジェクトコードとを照合した結果の場合分けを表にして示す説明図である。It is explanatory drawing which shows the case classification of the result of collating the source code and the object code on the support apparatus side and the PLC apparatus side as a table. ファンクションブロックに相当するソースプログラムとこれに対応する表示シンボルとの関係を示す説明図である。It is explanatory drawing which shows the relationship between the source program corresponded to a function block, and the display symbol corresponding to this. アドレスの自動割付機能によってオブジェクトコードが不一致でソースコードが一致する場合の説明図である。It is explanatory drawing in case an object code is inconsistent and a source code is in agreement by the automatic address assignment function. オブジェクトコードが不一致でソースコードが一致する場合の案内表示例を示す説明図である。It is explanatory drawing which shows the example of a guidance display in case an object code is inconsistent and a source code is in agreement. ユーザの各種変更等によってオブジェクトコードが一致でソースコードが不一致となる場合の説明図である。It is explanatory drawing in case an object code is in agreement and a source code is inconsistency by various user changes etc. オブジェクトコードが一致でソースコードが不一致となる場合の案内表示例を示す説明図である。It is explanatory drawing which shows the example of a guidance display in case an object code is in agreement and a source code is inconsistency. アドレスプログラミングの一例を示す説明図である。It is explanatory drawing which shows an example of address programming. 変数プログラミングの一例を示す説明図である。It is explanatory drawing which shows an example of variable programming. ファンクションブロックを使用したプログラミングの一例を示す説明図である。It is explanatory drawing which shows an example of the programming using a function block.

符号の説明Explanation of symbols

1 制御プログラム開発支援装置
2 PLC
11 ソースコード
12 変数定義
13 コンパイラ
14 オブジェクトコード
21 ソースコードメモリ
22 オブジェクトコードメモリ
23 変数定義メモリ
71a,71b 不一致箇所
72a,72b 不一致箇所
73a,73b 不一致箇所
75a,75b 不一致箇所
81 行識別表示
91a,91b 不一致箇所
92a,92b 一致箇所
101 表示部
102 入力部
103 RAM
104 HDD
105 CPU
106 通信I/F
201 I/Oメモリ
202 CPU
203 通信I/F
204 オブジェクトコードメモリ
205 ソースコードメモリ
206 変数定義メモリ
1001 行識別表示
1003 相違部分の色見本
1004 一致部分の色見本
1005,1006 同一である旨を示すキャラクタ表示
1 Control program development support device 2 PLC
DESCRIPTION OF SYMBOLS 11 Source code 12 Variable definition 13 Compiler 14 Object code 21 Source code memory 22 Object code memory 23 Variable definition memory 71a, 71b Mismatch place 72a, 72b Mismatch place 73a, 73b Mismatch place 75a, 75b Mismatch place 81 Line identification display 91a, 91b Unmatched location 92a, 92b Matched location 101 Display unit 102 Input unit 103 RAM
104 HDD
105 CPU
106 Communication I / F
201 I / O memory 202 CPU
203 Communication I / F
204 Object code memory 205 Source code memory 206 Variable definition memory 1001 Line identification display 1003 Color sample of different part 1004 Color sample of matching part 1005, 1006 Character display indicating the same

Claims (8)

制御プログラムとして、実行形式のオブジェクトプログラムとそのオブジェクトプログラム生成の元とされたソースプロクラムとの双方が格納されるPLCを対象とするPLCの制御プログラム開発支援装置であって、
対象となるPLCからオブジェクトプログラムに相当するオブジェクトコード列とソースプログラムに相当するソースコード列及び変数定義をアップロードする手段と、
対象となるPLCのものとして、当該開発支援装置側が保有する制御プログラムから、オブジェクトプログラムに相当するオブジェクトコード列とソースプログラムに相当するソースコード列及び変数定義を読み出す読み出し手段と、
PLC側のオブジェクトコード列と開発支援装置側のオブジェクトコード列とを照合する第1の照合手段と、
PLC側のソースコード列と開発支援装置側のソースコード列とを照合する第2の照合手段と、
第1の照合手段の照合結果と第2の照合手段の照合結果との組合せにより定義される4つの場合分けのそれぞれ毎に、所定の表示形態による案内表示を行う表示制御手段と、
を具備する、ことを特徴とするPLCの制御プログラム開発支援装置。
A control program development support device for a PLC that targets a PLC in which both an executable object program and a source program from which the object program is generated are stored as a control program,
Means for uploading an object code sequence corresponding to an object program, a source code sequence corresponding to a source program, and a variable definition from a target PLC;
Reading means for reading out the object code string corresponding to the object program, the source code string corresponding to the source program, and the variable definition from the control program held by the development support apparatus as the target PLC,
First collating means for collating the object code string on the PLC side with the object code string on the development support apparatus side;
A second collating means for collating the source code string on the PLC side with the source code string on the development support apparatus side;
Display control means for performing guidance display in a predetermined display form for each of the four case classifications defined by the combination of the matching result of the first matching means and the matching result of the second matching means;
A control program development support apparatus for PLC, comprising:
オブジェクトコード列同士が不一致でかつソースコード列同士も不一致の場合には、両制御プログラムは異なるものである旨を示す所定の表示形態による案内表示を行うように仕組まれている、ことを特徴とする請求項1に記載のPLCの制御プログラム開発支援装置。   When the object code strings do not match and the source code strings do not match, both control programs are structured to perform guidance display in a predetermined display form indicating that they are different. The PLC control program development support apparatus according to claim 1. 所定の表示形態が、両ソースコード列に対応するプログラムリストをプログラム行同士を整合させて並列表示すると共に、両者が相違するプログラム行に関しては、色彩、輝度等々を異ならせた行識別表示を行うものである、ことを特徴とする請求項2に記載のPLCの制御プログラム開発支援装置。   A predetermined display form displays program lists corresponding to both source code strings in parallel by aligning program lines, and performs line identification display with different colors, brightness, etc. for program lines that differ from each other. The PLC control program development support apparatus according to claim 2, wherein the apparatus is a PLC control program development support apparatus. オブジェクトコード列同士が不一致でかつソースコード列同士が一致の場合には、メモリアドレスが自動割付されたか否かを確認可能な所定の表示形態による案内表示を行うように仕組まれている、ことを特徴とする請求項1に記載のPLCの制御プログラム開発支援装置。   If the object code strings do not match and the source code strings match, it is designed to perform guidance display in a predetermined display form that can confirm whether or not the memory address is automatically assigned. The PLC control program development support apparatus according to claim 1, wherein: 所定の表示形態が、両変数定義に対応するプログラムリストをプログラム行同士を整合させて並列表示すると共に、両者が相違するプログラム行に関しては、色彩、輝度等々を異ならせた行識別表示を行うものである、ことを特徴とする請求項4に記載のPLCの制御プログラム開発支援装置。   Predetermined display form displays program lists corresponding to both variable definitions in parallel by aligning program lines, and performs line identification display with different colors, brightness, etc. for program lines that differ from each other The PLC control program development support device according to claim 4, wherein: オブジェクトコード列同士が一致でかつソースコード列同士が不一致の場合には、メモリアドレスは変更することなく変数名のみが変更されたことを確認可能な所定の表示形態による案内表示を行うように仕組まれている、ことを特徴とする請求項1に記載のPLCの制御プログラム開発支援装置。   When the object code strings match and the source code strings do not match, the memory address is not changed, and only the variable name is changed, and the guidance display is made in a predetermined display form. The PLC control program development support apparatus according to claim 1, wherein the PLC control program development support apparatus is provided. 所定の表示形態が、両ソースコード列に対応するプログラムリストをプログラム行同士を整合させて並列表示すると共に、両者が相違するプログラム行に関しては、色彩、輝度等々を異ならせた行識別表示を行ない、さらに、行識別表示には、オブジェクトコード列は同一である旨を示す文字や記号等のキャラクタ表示を付するものである、ことを特徴とする請求項6に記載のPLCの制御プログラム開発支援装置。   Predetermined display form displays program lists corresponding to both source code strings in parallel by aligning program lines, and for program lines that differ from each other, line identification display with different colors, brightness, etc. is performed. 7. The PLC control program development support according to claim 6, wherein the line identification display is provided with a character display such as a character or symbol indicating that the object code strings are the same. apparatus. オブジェクトコード列同士が一致でかつソースコード列同士も一致の場合には、両制御プログラムは同一のものである旨を示す所定の表示形態による案内表示を行うように仕組まれている、ことを特徴とする請求項1に記載のPLCの制御プログラム開発支援装置。   When the object code strings are the same and the source code strings are also the same, the two control programs are structured to perform guidance display in a predetermined display form indicating that they are the same. The PLC control program development support device according to claim 1.
JP2007119547A 2007-04-27 2007-04-27 PLC control program development support device Active JP4725747B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007119547A JP4725747B2 (en) 2007-04-27 2007-04-27 PLC control program development support device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007119547A JP4725747B2 (en) 2007-04-27 2007-04-27 PLC control program development support device

Publications (2)

Publication Number Publication Date
JP2008276525A JP2008276525A (en) 2008-11-13
JP4725747B2 true JP4725747B2 (en) 2011-07-13

Family

ID=40054399

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007119547A Active JP4725747B2 (en) 2007-04-27 2007-04-27 PLC control program development support device

Country Status (1)

Country Link
JP (1) JP4725747B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5483011B2 (en) * 2010-03-15 2014-05-07 オムロン株式会社 PLC program development support apparatus and computer program for causing a computer to function as the apparatus
JP6130731B2 (en) * 2013-05-21 2017-05-17 株式会社東芝 Method for creating application program for plant control system
WO2016135835A1 (en) * 2015-02-23 2016-09-01 三菱電機株式会社 Control device and control system
JP6790541B2 (en) * 2016-07-20 2020-11-25 株式会社Ihi Logic update device and logic update method
JP6954191B2 (en) 2018-03-12 2021-10-27 オムロン株式会社 Control systems, development support equipment, and development support programs
JP7119714B2 (en) * 2018-07-27 2022-08-17 オムロン株式会社 Information processing device, display program, and method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2791126B2 (en) * 1989-08-28 1998-08-27 松下電工株式会社 Programmable sequencer
JPH0443401A (en) * 1990-06-08 1992-02-13 Sharp Corp Programmable controller
JPH11194933A (en) * 1998-01-06 1999-07-21 Hitachi Ltd File verification method
JP2003157104A (en) * 2001-11-22 2003-05-30 Fuji Electric Co Ltd Programming device

Also Published As

Publication number Publication date
JP2008276525A (en) 2008-11-13

Similar Documents

Publication Publication Date Title
JP4725747B2 (en) PLC control program development support device
US9619211B2 (en) Code suggestion in a software development tool
US7937172B2 (en) Program creating device for programmable controller, program creating method for programmable controller, and recording medium having program recorded thereon
US20160098256A1 (en) Visual tool and architecting logical layers of software components
WO2015075790A1 (en) Device for assisting creation of sequence program
CN108427637B (en) Test case recommendation method, electronic device and readable storage medium
US5915116A (en) Time value manipulation
CN104797993A (en) System-building assistance device
JP5849592B2 (en) Programmable controller system, programming device thereof, programmable controller, program, and debugging method
JP5051377B2 (en) Operation specification management method for program development support device
US20160132327A1 (en) Visual tool for reverse engineering software components
US20100070951A1 (en) Generic assembler
JP5758311B2 (en) Test code generation device, test code generation method, test code generation program
JP4760607B2 (en) Programmable controller
JP4393893B2 (en) Pattern system construction device, pattern application device and program, competitive element detection program, and software development support program
JP5978775B2 (en) PROGRAMMABLE CONTROLLER, ITS SUPPORT DEVICE, PROGRAM, PROGRAM TRANSFER METHOD
JP5504212B2 (en) Test case automatic generation system, test case automatic generation method, and test case automatic generation program
JP2008003841A (en) Build processing method, device and program
JP6606028B2 (en) Document defect detection program, document defect detection device, and document defect detection method
JP4255737B2 (en) Peripheral device of programmable controller
JP2006172176A (en) Disk unit and determining method of firmware
US20090138849A1 (en) Enhanced Prompting in a Visual Editor
JP2009075681A (en) Specification description support device for event-driven type software
JP4827418B2 (en) Conditional compiling identifier management method, computer program creation support apparatus, and program
CN114741356A (en) Method and device for migrating jenkins jobs

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100208

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110316

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110323

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110329

R150 Certificate of patent or registration of utility model

Ref document number: 4725747

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

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