JP2013168031A - Programmable controller system, support device thereof, and program - Google Patents

Programmable controller system, support device thereof, and program Download PDF

Info

Publication number
JP2013168031A
JP2013168031A JP2012031054A JP2012031054A JP2013168031A JP 2013168031 A JP2013168031 A JP 2013168031A JP 2012031054 A JP2012031054 A JP 2012031054A JP 2012031054 A JP2012031054 A JP 2012031054A JP 2013168031 A JP2013168031 A JP 2013168031A
Authority
JP
Japan
Prior art keywords
program
identification information
programmable controller
plc
download
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
JP2012031054A
Other languages
Japanese (ja)
Other versions
JP5957936B2 (en
Inventor
Daisuke Yoshihara
大助 吉原
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric 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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2012031054A priority Critical patent/JP5957936B2/en
Publication of JP2013168031A publication Critical patent/JP2013168031A/en
Application granted granted Critical
Publication of JP5957936B2 publication Critical patent/JP5957936B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To check that a program is accommodated to a change for operating PLC (Programmable Logic Controller) during operation and update it.SOLUTION: A compilation unit 12 compiles a source code 16 of any updated-version program and generates a machine language object 17 in conformity to constraint conditions, for example, "to retain an address of existing variables". When succeeding in compilation, the compilation unit generates unique identification information 18 corresponding to the machine language object 17 generated by an identification information generation unit 13 and the like and adds and registers it in a list. When the newest-version machine language object 17 is downloaded into a PLC 20, a programmable controller system acquires current identification information 23 of the PLC 20, determines whether or not the current identification information is registered in the list and permits the download, only when it is registered.

Description

本発明は、稼働中のプログラマブルコントローラの動作を停止しないでプログラム更新を行える支援装置等に関する。   The present invention relates to a support device that can update a program without stopping the operation of an operating programmable controller.

プログラマブルコントローラ(PLC)に関して、一旦、稼働を開始したら、例えば基本的に定期点検時等以外は停止できない状況で運用されている場合がある。一方、PLCのプログラムは、例えばバージョンアップ等の理由で変更する必要が生じるケースが少なくない。この為、従来、支援装置等を用いて、PLCを稼働中でもそのプログラムを変更できるようにしていた。   With respect to the programmable controller (PLC), once the operation is started, the programmable controller (PLC) may be operated in a situation in which it can not be stopped except for a periodical inspection, for example. On the other hand, there are many cases where the PLC program needs to be changed for reasons such as version upgrade. For this reason, conventionally, it has been possible to change the program using a support device or the like while the PLC is operating.

PLCが稼働中に、ユーザが支援装置を利用して、PLCで動作しているプログラムを変更する場合、安全性のために、支援装置が、下記の手順でのみPLCのプログラム変更を行えるようにしている。   When the user uses the support device to change the program running on the PLC while the PLC is running, the support device can change the PLC program only by the following procedure for safety. ing.

まず、PLCのプログラム変更は、支援装置からのオンライン更新によってのみ行える。オンライン更新する場合には、まず、支援装置をPLCに接続する。また、基本的には、支援装置側で保持しているプログラムに対してユーザが何らかの編集(修正/変更など)を行うことで、新規プログラム(更新版プログラム)が作成され、この新規プログラムをPLCにダウンロードすることで、PLCプログラムのオンライン更新が成されることになる。   First, the PLC program can be changed only by online update from the support device. When updating online, first, the support apparatus is connected to the PLC. Basically, a user edits (modifies / changes) the program held on the support device side to create a new program (updated program). The online update of the PLC program is performed by downloading the program.

(a)支援措置は、ユーザによるプログラムの変更が開始される前に、変更対象になるプログラムとPLCで動作しているプログラムとが一致していることを確認する処理を実行する(認証ステップ)。   (A) The support measure executes a process for confirming that the program to be changed and the program operating in the PLC match before the user starts changing the program (authentication step). .

(b)支援装置は、両プログラムが一致した場合のみ、プログラムの変更(更新)及び更新版プログラムのPLCへのダウンロードを許可する。これより、上記プログラム一致確認後、ユーザがプログラムの変更を実施し、支援装置は、更新版(バージョンアップ版等)のプログラムをコンパイルして機械語オブジェクトに変換してPLCに送信する。   (B) The support device permits the change (update) of the program and the download of the updated version program to the PLC only when both programs match. Thus, after confirming the program match, the user changes the program, and the support apparatus compiles an updated version (such as an upgraded version) of the program, converts it into a machine language object, and transmits it to the PLC.

尚、当然、(プログラム不一致により)上記認証ステップによる認証が失敗した状態でユーザがプログラムを変更した場合には、更新版プログラムはPLCに転送されない(ダウンロードが許可されないので)。   Of course, if the user changes the program in a state where the authentication in the authentication step has failed (due to program mismatch), the updated version program is not transferred to the PLC (because download is not permitted).

(c)PLCは、上記機械語オブジェクトを受信後、現在動作している機械語オブジェクトから受信した機械語オブジェクトに切り替えてプログラムを実行する。これは、例えば、実行中のプログラムのスキャンエンドに同期して、プログラムを更新/切換え等する。   (C) After receiving the machine language object, the PLC executes the program by switching from the currently operating machine language object to the received machine language object. For example, the program is updated / switched in synchronization with the scan end of the program being executed.

しかし、上記の従来手法では、ユーザが変更した内容が即、稼働中のPLCに反映されるため、ユーザのプログラム記述に間違えがある場合、システムに重大な被害を与える可能性がある。この為、上記更新版プログラムについて、別環境(実システムとは別の検証用システム)で動作確認/動作検証を行って、この検証で不具合がないことを確認したうえで実システムに反映させるというのが実状であった。   However, in the above-described conventional method, since the contents changed by the user are immediately reflected in the operating PLC, there is a possibility that the system may be seriously damaged if the user's program description is wrong. For this reason, the above-mentioned updated version of the program is verified in a different environment (a verification system different from the actual system) and verified to verify that there are no defects in the verification. The actual situation was.

しかしながら、別環境で正常動作することが確認された更新版プログラムを、そのまま上記支援装置からPLCにダウンロードすることはできない。上記の通り、支援装置は、当該支援装置上で上記一致確認されたプログラムに対して、編集/変更作業が行われて成る更新版プログラムのみ、PLCへのダウンロードを許可する仕組みであるからである。   However, an updated version program that has been confirmed to operate normally in another environment cannot be directly downloaded from the support apparatus to the PLC. This is because, as described above, the support device is a mechanism that allows only the updated program obtained by editing / changing the program that has been confirmed to match on the support device to be downloaded to the PLC. .

この為、ユーザは、別環境で動作を確認した更新版プログラムを稼働中のPLCに反映させるため、上記別環境で検証済みの更新版プログラムを支援装置にコピーすると共に、支援装置において、変更前のプログラム(オリジナルプログラム)を開き、上記(a)の認証ステップによってPLCのプログラムと照合させて一致確認した状態にした後、手作業で、更新版プログラムの内容を上記オリジナルプログラムにコピーする等していた。これは、例えば、検証済みの更新版プログラムの内容をテキストエディタ等で参照しながら、上記オリジナルプログラムにコピーペーストする等していた。この作業が煩雑であり、作業時間の無駄が発生していた。またこの様に手作業を実施することにより人為的ミスが発生する可能性があった。   For this reason, in order to reflect the updated version program whose operation has been confirmed in another environment to the operating PLC, the user copies the updated version program verified in the other environment to the support apparatus, and in the support apparatus, before the change After the program (original program) is opened and checked with the PLC program in the authentication step (a) to confirm the match, the contents of the updated program are manually copied to the original program, etc. It was. For example, the content of the verified updated program is copied and pasted into the original program while referring to the text editor or the like. This operation is complicated and wastes work time. In addition, human error may occur due to such manual operation.

また、稼働中のPLCのプログラムを変更するためには、いくつかの制約条件がある。そこで、プログラムに対する変更が制約条件を満足していることを保障するため、支援装置は、プログラムの一致を確認した後、制約条件内の操作しかユーザに許可しないようにしている。すなわち、プログラムの一致を確認した後、ユーザがこのプログラムに対して所望の変更を行うことで更新版のプログラムを作成し、その後コンパイルが実行されるが、ユーザが制約条件外の変更を行った場合、コンパイルは成功しない。   In addition, there are some restrictions on changing the PLC program in operation. Therefore, in order to ensure that the change to the program satisfies the constraint conditions, the support apparatus allows the user to perform only operations within the constraint conditions after confirming that the programs match. In other words, after confirming the match of the program, the user creates an updated program by making a desired change to this program, and then the compilation is executed, but the user makes a change outside the constraint conditions If the compilation is not successful.

プログラムを一意な識別情報で管理する方法として、例えば特許文献1に記載の従来技術がある。特許文献1には、プログラムの変更に伴って識別情報を更新し、この更新された識別情報を、前回データとして(プログラムをPLCに転送する際)記憶し、さらに、PLCのメモリに記憶されている識別情報と、自身が記憶した識別情報とを比較し、最終更新者を判別するPLCシステムが開示されている。このようにして他人が作成したプログラムが不用意に上書きされることを抑制している。   As a method of managing a program with unique identification information, for example, there is a conventional technique described in Patent Document 1. In Patent Document 1, the identification information is updated in accordance with the change of the program, the updated identification information is stored as previous data (when the program is transferred to the PLC), and further stored in the memory of the PLC. The PLC system which compares the identification information which has been stored with the identification information which it memorize | stored, and discriminate | determines a last updater is disclosed. In this way, programs created by others are prevented from being overwritten inadvertently.

特開2008−282362号公報JP 2008-282362 A

ここで、上記のようにプログラムに対する変更が制約条件を満足していることが保障される場合であっても、このプログラムをPLCにダウンロードして更新させると、問題が生じる場合がある。   Here, even if it is ensured that the change to the program satisfies the constraint condition as described above, there may be a problem if the program is downloaded to the PLC and updated.

これは、稼働中のPLCに対する変更に適合したプログラムではないことが原因となる。そして、これは、上記プログラムに対する変更が制約条件を満足している場合にも起こり得る。但し、これは、制約条件を満足していることが保障されるはずであったが、実際には制約条件を満足していなかったものと言うこともできる。   This is due to the fact that the program is not adapted to changes to the running PLC. This can also occur when changes to the program satisfy the constraints. However, this should have been guaranteed that the constraint condition was satisfied, but it can also be said that the constraint condition was not actually satisfied.

換言すれば、上記従来のコンパイラの機能によってコンパイルが成功するようなプログラムであっても、稼働中のPLCに対する変更に適合したプログラムではないということが起こり得る。   In other words, even a program that is successfully compiled by the function of the conventional compiler may not be a program that is suitable for changes to the running PLC.

また、上記特許文献1の従来技術では、最新のプログラムを管理することは可能であるが、ユーザが、稼働中のPLCに適合しない不適合プログラムを誤ってPLCに転送させるような、人為的ミスを防ぐことは考慮されていない。   In addition, in the prior art of the above-mentioned Patent Document 1, it is possible to manage the latest program. However, a human error such as causing the user to erroneously transfer a non-conforming program that does not conform to the running PLC to the PLC. Prevention is not considered.

本発明の課題は、PLCに接続した支援装置によりPLCが稼働中でもプログラム更新が可能であるPLCシステムにおいて、稼働中のPLCに対する変更に適合したプログラムであることを確認して更新することができるようにし、以って適合しないプログラムの転送などによる障害発生を確実に防ぐことができるプログラマブルコントローラシステム、その支援装置等を提供することである。   An object of the present invention is to make it possible to confirm and update a program suitable for a change to a running PLC in a PLC system in which a program can be updated while the PLC is running by a support device connected to the PLC. Thus, it is to provide a programmable controller system, its supporting device and the like that can surely prevent the occurrence of a failure due to transfer of a program that does not conform.

本発明のプログラマブルコントローラシステムは、支援装置とプログラマブルコントローラを有するプログラマブルコントローラシステムであって、前記支援装置は、ユーザに前記プログラマブルコントローラ用のプログラムを任意に作成させる手段であって、既存のプログラムを編集させることで該プログラムの更新版を作成させるプログラム作成支援手段と、該更新版のプログラムをコンパイルして機械語オブジェクトを生成するコンパイル手段と、前記コンパイル手段によるコンパイルが成功して前記機械語オブジェクトが生成される毎に、対応する一意の識別情報を生成すると共に、該生成した識別情報を前記プログラムに係る識別情報記憶部に追加登録する識別情報生成・登録手段と、ダウンロード許可される場合には、前記更新版のプログラムと対応する前記識別情報とを前記プログラマブルコントローラにダウンロードするダウンロード手段とを有し、前記プログラマブルコントローラは、前記プログラマブルコントローラ用のプログラムを記憶するプログラム記憶手段と、識別情報を記憶する識別情報記憶手段と、前記ダウンロード手段によってダウンロードされた前記更新版のプログラムと対応する前記識別情報とによって、前記プログラム記憶手段と前記識別情報記憶手段の記憶内容を更新する管理手段とを有し、前記支援装置の前記ダウンロード手段は、前記識別情報記憶手段に記憶されている識別情報を取得して、該識別情報が前記識別情報記憶部に登録されている場合にはダウンロード許可されると判定する。   The programmable controller system of the present invention is a programmable controller system having a support device and a programmable controller, and the support device is means for allowing a user to arbitrarily create a program for the programmable controller, and edits an existing program. A program creation support unit that creates an updated version of the program, a compile unit that compiles the program of the updated version to generate a machine language object, and the machine language object is successfully compiled by the compile unit. Each time it is generated, corresponding unique identification information is generated, and the generated identification information is additionally registered in the identification information storage unit related to the program, and when the download is permitted , Update Download means for downloading the program and the corresponding identification information to the programmable controller, the programmable controller storing a program for the programmable controller, and an identification information storage for storing the identification information And the management device for updating the storage contents of the program storage means and the identification information storage means with the identification information corresponding to the updated version of the program downloaded by the download means, and the support device The download unit acquires the identification information stored in the identification information storage unit, and determines that the download is permitted when the identification information is registered in the identification information storage unit.

例えばプログラムの更新が2系統に別れて、一方の系統の更新版プログラムがプログラマブルコントローラにダウンロードされて運用されている状態で、他方の系統で最新の更新版プログラムが作成された場合、当該他方の系統の識別情報記憶部には、PLCの識別情報記憶手段に記憶されている識別情報は登録されていないので、これによってダウンロード不許可にできる。この例では、当該他方の系統の更新版プログラムでは、稼働中のPLCに対する変更に適合したプログラムであることは保障されないからである。   For example, when the program update is divided into two systems, and the update program of one system is downloaded and operated in the programmable controller, the latest update program is created in the other system. Since the identification information stored in the identification information storage means of the PLC is not registered in the system identification information storage unit, the download can be prohibited by this. This is because in this example, it is not guaranteed that the updated version program of the other system is a program adapted to the change to the operating PLC.

本発明のプログラマブルコントローラシステム、その支援装置等によれば、PLCに接続した支援装置によりPLCが稼働中でもプログラム更新が可能であるPLCシステムにおいて、稼働中のPLCに対する変更に適合したプログラムであることを確認して更新することができるようにし、以って適合しないプログラムの転送などによる障害発生を確実に防ぐことができる。   According to the programmable controller system of the present invention, its support device, etc., in the PLC system in which the program can be updated even when the PLC is operating by the support device connected to the PLC, the program is adapted to the change to the operating PLC. This makes it possible to check and update the program, thereby reliably preventing the occurrence of a failure due to transfer of a program that does not conform.

本例のPLCシステムの構成図である。It is a block diagram of the PLC system of this example. 識別情報管理テーブルの一例である。It is an example of an identification information management table. 制約条件に係る従来の課題と本手法による課題解決について説明する為の図である。It is a figure for demonstrating the conventional subject which concerns on a constraint condition, and the subject solution by this method. プログラム編集とコンパイル時の処理フローチャート図である。It is a process flowchart figure at the time of program edit and compilation. ダウンロード時の処理フローチャート図である。It is a process flowchart figure at the time of download.

以下、図面を参照した本発明の実施の形態について説明する。
図1は、本例のPLC(プログラマブルコントローラ)システムの構成図である。
本システムは、パソコン等のコンピュータ上で動作する支援装置10が、PLC(プログラマブルコントローラ)20と接続されて、相互にデータ送受信可能な構成となっている。尚、図示は省略するが、PLC20には何らかの制御対象機器が接続されている。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a configuration diagram of a PLC (programmable controller) system of this example.
In this system, the support device 10 operating on a computer such as a personal computer is connected to a PLC (programmable controller) 20 so that data can be transmitted / received to / from each other. In addition, although illustration is abbreviate | omitted, some control object apparatus is connected to PLC20.

支援装置10は、ユーザインターフェース機能部11、コンパイラ部12、識別情報生成部13、識別情報管理部14等の各種機能部を有する。支援装置10は、不図示のCPU/MPU等の演算プロセッサや、ハードディスク、メモリ等の記憶装置も有しており、記憶装置には予め所定のアプリケーションプログラムが記憶されている。上記各種機能部の後述する処理機能は、上記不図示の演算プロセッサが、このアプリケーションプログラムを読出し・実行することにより実現される。   The support device 10 includes various functional units such as a user interface function unit 11, a compiler unit 12, an identification information generation unit 13, and an identification information management unit 14. The support device 10 also includes a calculation processor such as a CPU / MPU (not shown) and a storage device such as a hard disk and a memory, and a predetermined application program is stored in the storage device in advance. Processing functions to be described later of the various functional units are realized when the arithmetic processor (not shown) reads and executes the application program.

尚、本説明において単にプログラムと記した場合には、それは基本的にはPLC用プログラム(制御プログラム)を意味するものとする。
また、支援装置10は、ディスプレイ画面や入力装置等も有している。
It should be noted that when simply described as a program in this description, it basically means a PLC program (control program).
The support device 10 also has a display screen, an input device, and the like.

上記ユーザインターフェース機能部11は、ユーザが所望のPLC用プログラムを作成するのを支援する機能を有する。この機能自体は、従来からよく知られたものであるので、ここでは特に説明しないが、概略的には、ユーザインターフェース機能部11は、ディスプレイに不図示の所定の編集用画面を表示して、この編集用画面上でユーザに所望のPLC用プログラムを作成させる。ユーザは、キーボード、マウス等の入力装置を操作して、任意のプログラムのソースコード16を作成する。作成されたプログラム・ソースコード16は、上記不図示の記憶装置等に記憶される。   The user interface function unit 11 has a function of assisting the user in creating a desired PLC program. Since this function itself has been well known in the art, it is not particularly described here, but in general, the user interface function unit 11 displays a predetermined editing screen (not shown) on the display, The user is made to create a desired PLC program on this editing screen. A user operates an input device such as a keyboard and a mouse to create source code 16 of an arbitrary program. The created program / source code 16 is stored in the storage device (not shown) or the like.

コンパイラ部12は、上記ユーザが作成したソースコード16を、ターゲット(PLC20)上で動作する機械語オブジェクト17に変換する。コンパイラ部12は、この変換(コンパイル)の際に各変数に対するアドレス割当てを行うが、例えば後述する「既存変数のアドレスを固定する」という制約条件を満足すると見做せるようなアドレス割当てを行う。もし、この様な制約条件を満足することができない場合には、コンパイル失敗となる。   The compiler unit 12 converts the source code 16 created by the user into a machine language object 17 that operates on the target (PLC 20). The compiler unit 12 assigns an address to each variable at the time of this conversion (compilation). For example, the compiler unit 12 assigns an address so that it can be considered that a constraint condition “fix the address of an existing variable” described later is satisfied. If such constraints cannot be satisfied, compilation fails.

上記機械語オブジェクト17は、通信機能部15によってPLC20にダウンロードされる。但し、その前に、従来で説明したように、別環境(実システムとは別の検証用システム)で更新版プログラムの動作確認/動作検証を行って、検証OKである場合に更新版プログラム(その機械語オブジェクト17)をPLC20にダウンロードすることが望ましい。本手法では、従来のような変更対象になるプログラムとPLCのプログラムとが一致していることを確認する処理(認証ステップ)が無いので、問題なくダウンロードできる。   The machine language object 17 is downloaded to the PLC 20 by the communication function unit 15. However, before that, as described in the related art, the operation check / operation verification of the updated version program is performed in another environment (a verification system different from the actual system), and if the verification is OK, the updated version program ( It is desirable to download the machine language object 17) to the PLC 20. In this method, since there is no process (authentication step) for confirming that the program to be changed and the PLC program match with each other as in the prior art, the program can be downloaded without any problem.

上記PLC用プログラムの作成は、基本的には、既存のプログラムの更新版(バージョンアップ版等)を作成するものである。この様な場合、ユーザは、上記ユーザインターフェース機能部11の機能により、上記記憶されているソースコード16のファイルを開いて、所望の変更を行う。この様な、変更/更新版のプログラムは、上記コンパイラ部12でコンパイルされて機械語オブジェクト17に変換されて(例えば別環境での動作確認/動作検証を行った後)上記通信機能部15によって不図示の通信線を介してPLC20にダウンロードされる。   The creation of the PLC program basically creates an updated version (such as an upgraded version) of an existing program. In such a case, the user opens the stored source code 16 file and makes a desired change by the function of the user interface function unit 11. Such a modified / updated program is compiled by the compiler unit 12 and converted into a machine language object 17 (for example, after performing operation check / operation verification in another environment) by the communication function unit 15. It is downloaded to the PLC 20 via a communication line (not shown).

ここまで説明した処理機能は、従来より存在する支援装置の既存の処理機能と略同様と見做しても構わない(但し、上記の通り、プログラムの一致する処理(認証ステップ)が無くなっている)。本手法による支援装置10では、更に下記の処理機能を有する。   The processing function described so far may be regarded as substantially the same as the existing processing function of the existing support device (however, as described above, there is no program matching process (authentication step)). ). The support device 10 according to the present method further has the following processing functions.

まず、上記コンパイル部12は、コンパイルが成功する毎に、識別情報生成部13の機能を利用して、一意になるデータとしての識別情報18を生成させる。この識別情報18は、識別情報管理部14で管理する。識別情報18は、例えば後述する識別情報管理テーブル30に格納され管理される。また、上記通信機能部15は、上記機械語オブジェクト17をPLC20にダウンロードする際、これに対応して生成された識別情報18を付してダウンロードする。   First, every time the compilation is successful, the compiling unit 12 uses the function of the identification information generating unit 13 to generate identification information 18 as unique data. The identification information 18 is managed by the identification information management unit 14. The identification information 18 is stored and managed, for example, in an identification information management table 30 described later. Further, when the machine function object 17 is downloaded to the PLC 20, the communication function unit 15 adds the identification information 18 generated corresponding to the machine language object 17 and downloads it.

ここで、上記一意になるデータとは、本支援装置10内に限ったものではなく、他の全ての支援装置10も含めた話である。例えば、仮に、支援装置A、支援装置B、支援装置Cの3台の支援装置10があった場合、支援装置Aにおいてある時点で作成された識別情報18を仮に識別情報αとするならば、その後もこの支援装置Aにおいてコンパイル成功毎に識別情報18が生成されるが、識別情報αが生成されることはない。更に、本手法では、支援装置Bと支援装置Cにおいても、識別情報αが生成されることはない。これは、上記“ある時点”以降という意味ではなく、“ある時点”以前であっても識別情報αが生成されることはない。   Here, the unique data is not limited to the support device 10 but includes all other support devices 10. For example, if there are three support devices 10 of the support device A, the support device B, and the support device C, if the identification information 18 created at a certain point in the support device A is assumed to be the identification information α, Thereafter, the identification information 18 is generated for each successful compilation in the support device A, but the identification information α is not generated. Further, in this method, the identification information α is not generated in the support device B and the support device C. This does not mean “after a certain time”, and the identification information α is not generated even before “a certain time”.

この様な識別情報18の生成処理については、後に具体例を挙げて説明するが、識別情報生成部13は、例えば、日付、時刻、PC固有の情報などを用いて、一意になる情報を生成する。   The generation process of the identification information 18 will be described later with a specific example. The identification information generation unit 13 generates unique information using, for example, date, time, PC-specific information, and the like. To do.

識別情報管理部14は、識別情報生成部13が生成した識別情報18の世代管理を行う。例えば、図2に示す識別情報管理テーブル30で識別情報18を管理する。
図2に示す識別情報管理テーブル30は、世代31と識別情報32より成る。
The identification information management unit 14 performs generation management of the identification information 18 generated by the identification information generation unit 13. For example, the identification information 18 is managed by the identification information management table 30 shown in FIG.
The identification information management table 30 shown in FIG. 2 includes a generation 31 and identification information 32.

識別情報32には、上記識別情報生成部13で生成された識別情報18が格納される。世代31は、新たな識別情報18が識別情報32に格納される毎に、当該識別情報32に対して割当てられる世代管理用の番号であり、本例では図示のように、初期値を‘1’とし、新規レコード追加毎に+1インクリメントされるものとする。   In the identification information 32, the identification information 18 generated by the identification information generation unit 13 is stored. The generation 31 is a generation management number assigned to the identification information 32 every time new identification information 18 is stored in the identification information 32. In this example, the generation 31 is set to an initial value of '1. It is assumed that 'is incremented by +1 every time a new record is added.

ここで、上記“コンパイル成功する毎に識別情報18を生成”とは、“新たなプログラム(更新版)作成毎に識別情報18を生成”を意味するものと見做してもよい。この場合、図2において世代31の番号が最も小さい(‘1’の)識別情報32が、最も古い(初版の)プログラムに対応して生成された識別情報18であり、世代31の番号が最も大きい(‘3’の)識別情報32が、最新版のプログラムに対応して生成された識別情報18を意味することになる。そして、仮に図2に示す状態で新たな識別情報18が生成されて識別情報管理テーブル30に格納される場合には、その世代31の番号は‘4’となることになる。   Here, the above-mentioned “generate identification information 18 every time compilation is successful” may mean “generate identification information 18 every time a new program (update version) is created”. In this case, the identification information 32 having the smallest generation number ('1') in FIG. 2 is the identification information 18 generated corresponding to the oldest (first edition) program, and the generation 31 number is the highest. The large ('3') identification information 32 means the identification information 18 generated corresponding to the latest version of the program. Then, if new identification information 18 is generated and stored in the identification information management table 30 in the state shown in FIG. 2, the number of the generation 31 is “4”.

また、図1のPLC20の構成について簡単に説明するならば、PLC20は通信機能部21、プログラム実行管理機能部22等の各種機能部を有する。ここで、PLC20は、不図示のCPU/MPU等の演算プロセッサや、メモリ等の不図示の記憶装置も有しており、記憶装置には予め所定のアプリケーションプログラムが記憶されている。上記各種機能部の後述する処理機能は、上記不図示の演算プロセッサが、このアプリケーションプログラムを読出し・実行することにより実現される。   1 will be briefly described. The PLC 20 includes various functional units such as a communication function unit 21 and a program execution management function unit 22. Here, the PLC 20 also includes an arithmetic processor such as a CPU / MPU (not shown), and a storage device (not shown) such as a memory, and a predetermined application program is stored in the storage device in advance. Processing functions to be described later of the various functional units are realized when the arithmetic processor (not shown) reads and executes the application program.

また、上記不図示の記憶装置には、識別情報23や機械語オブジェクト24等が記憶される。PLC20は、機械語オブジェクト24を実行することで、例えば不図示の制御対象機器の制御等を行う。また、本例では、機械語オブジェクト24の更新は、PLC20を停止することなく稼働中に行うことを前提とする。   The storage device (not shown) stores identification information 23, a machine language object 24, and the like. The PLC 20 executes, for example, the machine language object 24 to control, for example, a control target device (not shown). In this example, it is assumed that the machine language object 24 is updated during operation without stopping the PLC 20.

通信機能部21は、上記支援装置10と上記不図示の通信線を介してデータ送受信等を行う機能部であり、特に上記通信機能部15から上記識別情報18付きの機械語オブジェクト17がダウンロードされてくると、この識別情報18を新たな識別情報23として上書き記憶すると共に、この機械語オブジェクト17を新たな機械語オブジェクト24として上記不図示の記憶装置等に記憶する。但し、機械語オブジェクトは上書き記憶ではなく、従って少なくともこの段階では既存の機械語オブジェクト24はそのまま残っている。運用中であるので既存の機械語オブジェクト24は実行中であり、その後、所定のタイミングで新たな機械語オブジェクト24の実行に切り換える。尚、この様な機械語オブジェクト24の実行の新旧切換えを含めた機械語オブジェクト24の実行管理は、上記プログラム実行管理機能部22が行う。既存の機械語オブジェクト24は、新旧切換えが完了したら削除するようにしてもよい。   The communication function unit 21 is a function unit that performs data transmission / reception and the like with the support device 10 via the communication line (not shown). In particular, the machine language object 17 with the identification information 18 is downloaded from the communication function unit 15. Then, the identification information 18 is overwritten and stored as new identification information 23, and the machine language object 17 is stored as a new machine language object 24 in the storage device (not shown) or the like. However, the machine language object is not overwritten, and therefore the existing machine language object 24 remains as it is at least at this stage. Since it is in operation, the existing machine language object 24 is being executed, and thereafter, switching to execution of a new machine language object 24 at a predetermined timing. The program execution management function unit 22 performs execution management of the machine language object 24 including switching between execution of the machine language object 24 and old and new. The existing machine language object 24 may be deleted when the new / old switching is completed.

ここで、PLC20が稼働中にそのプログラム(機械語オブジェクト24)の変更を実施するためには、既に述べたように制約条件が存在する。制約条件の一つに「既存変数のアドレスを固定(維持)する」がある。そのため、既存変数のアドレスを固定にするためのコンパイル指定が継続している必要がある。   Here, in order to change the program (machine language object 24) while the PLC 20 is in operation, there are restrictions as described above. One of the constraint conditions is “fix (maintain) the address of an existing variable”. Therefore, it is necessary to continue the compilation specification to fix the address of the existing variable.

図3は、この様な制約条件に係る従来の課題と本手法による課題解決について説明する為の図である。
但し、ここでは、図3の説明を行う前に、上記「既存変数のアドレスを固定(維持)する」条件を満たすためのコンパイラ12の機能について説明する。
FIG. 3 is a diagram for explaining a conventional problem related to such a constraint condition and a problem solution by this technique.
However, before describing FIG. 3, the function of the compiler 12 for satisfying the above condition “fix (maintain) the address of an existing variable” will be described.

これは、例えば本出願人による先願(特願2011−100991号)で提案した機能をコンパイラ12に備えさせればよいが、この例に限らず、例えば当該先願において背景技術として説明した従来技術を用いても良い。ここでは、この従来技術について説明する。   For example, the compiler 12 may be provided with the function proposed in the prior application (Japanese Patent Application No. 2011-100991) by the applicant of the present application. However, the present invention is not limited to this example. Technology may be used. Here, this prior art will be described.

上記先願の背景技術に記載の通り、PLCが稼動中にそのプログラムを変更する場合は(プログラムのバージョンアップ等)、既に割り付けた変数(既存の変数というものとする)のアドレスを変更することができない(変数の割当位置が変化すると、変更前と変更後とで変数の値がプログラムで正常に扱えないため、誤動作する。;変数のアドレスが変更されることにより、アドレスの変更前と変更後とでデータを引き継ぐことができない)。   As described in the background art of the previous application, when changing the program while the PLC is running (upgrading the program, etc.), change the address of the variable already assigned (referred to as an existing variable). (If the variable allocation position changes, the program cannot correctly handle the variable value before and after the change, and malfunctions .; By changing the variable address, the address before and after the change is changed. Data can't be passed on later).

そのため、従来技術では、変数を追加しても既存の変数のアドレスが変更されないようにするために予備領域を設けておき、追加した変数(追加変数というものとする)をこの予備領域に割り付けるようにしている。予備領域に追加変数を割り付けることにより、既に割り付けた変数(既存の変数)の割当位置を変更しないで、変数の追加が可能になる。勿論、既存の変数の割当位置(アドレス)は記録しておく必要がある。   Therefore, in the prior art, a spare area is provided to prevent the address of an existing variable from being changed even if a variable is added, and the added variable (referred to as an additional variable) is allocated to this spare area. I have to. By assigning the additional variable to the spare area, it is possible to add the variable without changing the assignment position of the already assigned variable (existing variable). Of course, it is necessary to record the allocation position (address) of an existing variable.

例えば初版プログラムでは変数A、変数Bがあり、変数Aは1000番地、変数Bは1001番地を割当てたとした場合、これら変数の割当位置(アドレス)を記憶しておく。また、予備領域として例えば1002番地、1003番地を確保しておく。   For example, in the first version program, there are variable A and variable B. If variable A is assigned address 1000 and variable B is assigned address 1001, the assigned position (address) of these variables is stored. Further, for example, addresses 1002 and 1003 are reserved as spare areas.

その後、ユーザが上記初版プログラムを変更等して作成した第2版プログラムでは、新たな変数Cが追加されたとする。この場合、コンパイラは、まず各変数が記憶されているか否かを判定し、この例では変数A,変数Bは記憶されているが、変数Cは記憶されていない。よって、変数A,変数Bは記憶内容に従って1000番地、1001番地を割当て、変数Cは上記予備領域(例えば1002番地)を割当てる。   Thereafter, it is assumed that a new variable C is added to the second version program created by the user changing the first version program. In this case, the compiler first determines whether or not each variable is stored. In this example, the variables A and B are stored, but the variable C is not stored. Therefore, variables A and B are assigned addresses 1000 and 1001 according to the stored contents, and variable C is assigned the spare area (for example, address 1002).

あるいは、上記第2版プログラムが、仮に上記変数Cの追加だけでなく、変数Bの削除が行われたものとする。この場合、変数Aは記憶されているが、変数Cは記憶されていない。よって、変数Aは記憶内容に従って1000番地を割当て、変数Cは上記予備領域(例えば1002番地)を割当てる。   Alternatively, it is assumed that the second version program has not only added the variable C but also deleted the variable B. In this case, variable A is stored, but variable C is not stored. Therefore, variable A is assigned 1000 addresses according to the stored contents, and variable C is assigned the spare area (for example, address 1002).

但し、ユーザが、予備領域の数を越えるような変数の追加を伴うプログラムの変更を実施すると、既存の変数のアドレス(割当位置)を変更する必要があり、既存変数のアドレスが変更されると上記の通り正常なデータ引き継ぎができなくなる。この為、PLCの動作を継続しながらプログラムを変更すること(オンライン変更)はできなくなる。   However, if the user changes a program that involves adding a variable that exceeds the number of spare areas, it is necessary to change the address (allocation position) of the existing variable, and if the address of the existing variable is changed As described above, normal data transfer cannot be performed. For this reason, the program cannot be changed (online change) while the operation of the PLC is continued.

これに対して、先願では予備領域では足りないような変数の追加があった場合でも対応可能とするものであり、上記「既存変数のアドレスを固定(維持)する」条件を満たすための機能自体は上記従来技術と略同様であってよいので、よって、ここでは特に先願については説明しない。   On the other hand, in the prior application, it is possible to cope with the addition of a variable that is not sufficient in the spare area, and the function for satisfying the above-mentioned condition of “fixing (maintaining) the address of the existing variable” As such, it may be substantially the same as the above prior art, and therefore, the prior application is not particularly described here.

図3において、まず、識別情報管理テーブル30の具体例について説明する。この例では、識別情報32は、簡単の為、DID1、DID2、・・・DID10等としている。また、DID1が第1世代(世代31が‘1’)、DID2が第2世代、DID10が第10世代であり、この時点ではDID10が最新版のプログラムに対応する識別情報となっている。尚、以下、例えばDID10に対応するプログラムは、プログラムDID10等と記す場合があるものとする。   In FIG. 3, a specific example of the identification information management table 30 will be described first. In this example, the identification information 32 is DID1, DID2,. Further, DID1 is the first generation (generation 31 is “1”), DID2 is the second generation, and DID10 is the tenth generation. At this point, DID10 is identification information corresponding to the latest version of the program. Hereinafter, for example, a program corresponding to DID10 may be referred to as program DID10 or the like.

そして、例えば、初版のプログラムDID1は、変数A,変数Bを有しており、コンパイラ部12によるコンパイルの際にこれら各変数に任意のアドレス(1000番地、1001番地)が割当てられたものとする。これより、図示のように、PLC20側において、変数Aは1000番地、変数Bには1001番地が割り付けられる。   For example, the first version of the program DID1 has a variable A and a variable B, and arbitrary addresses (addresses 1000 and 1001) are assigned to these variables when compiling by the compiler unit 12. . As a result, as shown in the figure, the variable A is assigned address 1000 and the variable B is assigned address 1001 on the PLC 20 side.

その後、プログラムDID1をベースにしてプログラムDID2を作成し、更にその後、プログラムDID2をベースにしてプログラムDID3を作成するというようにして、世代更新を10世代目のプログラムDID10まで重ねたとする。更に、何れに世代でも上記変数A,Bに関しては変更はなかったものとする。この場合、コンパイラ部12は、プログラムDID2〜プログラムDID10までの全てに関して、そのコンパイルの際に上記初版のプログラムDID1と同じく、変数Aには1000番地、変数Bには1001番地を割当てるようにする。これは、上記制約条件の1つである「既存変数のアドレスを固定(維持)する」を満たすようにするための処理である。   Then, it is assumed that the program DID2 is created on the basis of the program DID1, and then the program DID3 is created on the basis of the program DID2, so that the generation update is repeated up to the 10th generation program DID10. Further, it is assumed that the variables A and B are not changed in any generation. In this case, the compiler unit 12 assigns the address 1000 to the variable A and the address 1001 to the variable B in the same way as the first version of the program DID1 when compiling the program DID2 to the program DID10. This is a process for satisfying “fix (maintain) the address of an existing variable” which is one of the above-mentioned constraints.

尚、当然、変数のアドレスを再配置するコンパイルを実施する場合には、変数のアドレス固定では無くなるため、制約条件が満足されない。例えば、変数Aに1001番地、変数Bには1000番地が割当てられた場合、例えば変数Aの現在値を読み出すはずが、実際には変数Bの現在値を読み出して、これに基づいて値を更新することになるので、正常な動作とならない可能性が高い。   Naturally, when compiling to relocate the address of a variable, the constraint condition is not satisfied because the variable address is not fixed. For example, if address 1001 is assigned to variable A and address 1000 is assigned to variable B, for example, the current value of variable A should be read, but the current value of variable B is actually read and the value is updated based on this Therefore, there is a high possibility that normal operation will not be achieved.

一方、コンパイラ部12が上記制約条件の1つである「既存変数のアドレスを固定(維持)する」を満たすようにする処理を行うことで、変数のアドレス固定が継続される場合であっても、バックアップなどでプログラムをコピーした場合、別々にユーザがプログラム変更する可能性が存在する。   On the other hand, even if the compiler unit 12 performs the process of satisfying “fix (maintain) the address of an existing variable” which is one of the above-mentioned constraints, the variable address may be fixed. When a program is copied for backup or the like, there is a possibility that the user changes the program separately.

すなわち、上記の状況において、あるユーザAがプログラムDID10をベースにして新たな更新版プログラム(プログラムDID11とする)を作成したが、例えば同時期に別のユーザがプログラムDID10をコピーして、このプログラムDID10のコピーをベースにして新たな更新版プログラム(プログラムDID12とする)を作成したものとする。つまり、プログラムDID10までは1系統の更新であったが、2系統に分かれたものとする。   That is, in the above situation, a user A creates a new updated program (program DID11) based on the program DID10. For example, another user copies the program DID10 at the same time, and this program It is assumed that a new updated program (program DID12) is created based on a copy of DID10. That is, it is assumed that the program DID10 is updated for one system, but is divided into two systems.

この場合、PLCが稼動中に安全にプログラムの変更を実施するためには、プログラムの最新の管理ではなく、制約条件の継続性の検査が重要になる。
すなわち、例えば図3に示すように、プログラムDID11では新たな変数Cが追加され、プログラムDID12では別の新たな変数Dが追加されたものとする。そして、プログラムDID11の方が先にコンパイルされてPLC20にダウンロードされたものとする。
In this case, in order to safely change the program while the PLC is operating, it is important to check the continuity of the constraint conditions, not the latest management of the program.
That is, for example, as shown in FIG. 3, it is assumed that a new variable C is added in the program DID11 and another new variable D is added in the program DID12. It is assumed that the program DID11 is first compiled and downloaded to the PLC 20.

この場合、各変数のアドレス割当ては、変数A,Bは固定(維持/継続)であるので上記の通り1000番地、1001番地となるが、変数Cは新たに割当てられることになり例えば1002番地が割当てられることになる。そして、この様な変数割り当てが成された機械語オブジェクト17がPLC20にダウンロードされて稼働中に新旧切換えて実行されることになる。   In this case, since the variables A and B are fixed (maintain / continue), the addresses of the variables are 1000 and 1001 as described above, but the variable C is newly allocated, and for example, the address 1002 is assigned. Will be assigned. Then, the machine language object 17 to which such variable assignment is made is downloaded to the PLC 20 and switched between old and new during operation.

その後、プログラムDID12をコンパイルすると、変数のアドレス割当ては、変数A,Bは当然1000番地、1001番地となり、変数Dは例えば1002番地が割当てられることになる。しかしながら、既に、PLC20側では1002番地には変数Cが割当てられて稼働しているので、プログラムDID12の機械語オブジェクトをPLC20に転送して切換えさせると、正常に引き継がれず、正常に動作しない可能性が高いことになる。   Thereafter, when the program DID12 is compiled, the variable addresses are assigned to the addresses A and B of the addresses 1000 and 1001, and the variable D is assigned the address 1002, for example. However, because the variable C is already assigned to the address 1002 on the PLC 20 side, the machine language object of the program DID12 is transferred to the PLC 20 and switched, so that it may not be normally taken over and may not operate normally. Will be expensive.

あるいは、例えば、プログラムDID11では変数C、変数Dがこの順番で追加されてコンパイルした結果、例えば変数Cは1002番地、変数Dは1003番地に割り付けられたものとする。このプログラムをPLC20に転送して切換えさせた後に、プログラムDID12のコンパイルとPLC20へのダウンロードが行われたとする。例えば、プログラムDID12では変数D→変数Cの順番で追加されたとする。これをコンパイラ部12でコンパイルした結果、例えば変数Cは1003番地、変数Dは1002番地に割り付けられたものとする。よって、この様なプログラムDID12(その機械語)をPLC20に転送して稼働中に切換えさせた場合も、正常に継続されず、PLC20が正常に動作しない可能性が高いことになる。   Alternatively, for example, in the program DID11, as a result of adding and compiling variables C and D in this order, variable C is assigned to address 1002 and variable D is assigned to address 1003, for example. Assume that the program DID12 is compiled and downloaded to the PLC 20 after the program is transferred to the PLC 20 and switched. For example, it is assumed that the program DID12 is added in the order of variable D → variable C. As a result of compiling this by the compiler unit 12, for example, it is assumed that variable C is assigned to address 1003 and variable D is assigned to address 1002. Therefore, even when such a program DID12 (its machine language) is transferred to the PLC 20 and switched during operation, there is a high possibility that the PLC 20 will not operate normally because it is not continued normally.

上述したように、プログラムをコピーしただけであれば制約条件が満たされるが、その後、別々に変更すると制約条件の満たされなくなる(継続性がなくなる)可能性がある。換言すれば、プログラムのコンパイル成功した場合でも、つまり制約条件を満足していると見做される場合であっても、そのプログラムが稼働中のPLC20に対する変更に適合したプログラムであることが保障されるわけではない。稼働中のPLC20に対する変更に適合したプログラムであることが保障されない場合、PLC20が正常に動作しない可能性があるので、プログラムDID12(その機械語)をPLC20にダウンロードできないようにする必要ある。   As described above, the constraint condition is satisfied if only the program is copied. However, if the program is changed separately thereafter, the constraint condition may not be satisfied (continuity may be lost). In other words, even when the program is successfully compiled, that is, when it is considered that the constraints are satisfied, it is guaranteed that the program is a program that conforms to the changes to the running PLC 20. I don't mean. If it is not guaranteed that the program conforms to the change to the operating PLC 20, the PLC 20 may not operate normally, so the program DID12 (its machine language) must not be downloaded to the PLC 20.

その為に、本手法では、上記識別情報18を生成すると共に、テーブル30に記憶して世代管理している。そして、これらの情報を利用して例えば後述するフローチャート図の処理を行うことで、例えば上記の例の場合、プログラムDID12(その機械語)をPLC20にダウンロードできないようにすることができる。   For this purpose, in this method, the identification information 18 is generated and stored in the table 30 for generation management. Then, for example, in the case of the above example, the program DID12 (its machine language) can be prevented from being downloaded to the PLC 20 by performing the processing of the flowchart diagram described below using these pieces of information.

このフローチャート図については後に説明するものとし、ここでは図3を参照して概略的に説明する。
まず、上記コンパイラ部12によるプログラムDID11のコンパイル完了時、PLC20の状態は、上記機械語オブジェクト24としてプログラムDID10(その機械語)を記憶・実行しており、上記識別情報23として‘DID10’が記憶されている。一方、支援装置10の状態は、上記テーブル30に、DID1、DID2、・・・DID9、DID10、DID11が記憶されている。この状態においてプログラムDID11のダウンロードが指示された場合、支援装置10は、上記識別情報23(DID10)を取得して、これと同一の識別情報がテーブル30に記憶されているか否かを判定し、記憶されている場合のみダウンロードを許可する。
This flowchart will be described later, and will be schematically described here with reference to FIG.
First, when the compiling of the program DID11 by the compiler unit 12 is completed, the PLC 20 stores and executes the program DID10 (the machine language) as the machine language object 24 and stores “DID10” as the identification information 23. Has been. On the other hand, DID1, DID2,... DID9, DID10, and DID11 are stored in the table 30 as the state of the support apparatus 10. When downloading of the program DID11 is instructed in this state, the support apparatus 10 acquires the identification information 23 (DID10) and determines whether or not the same identification information is stored in the table 30. Allow downloads only if stored.

この場合、上記の通りテーブル30にはDID10が記憶されているので、ダウンロードが許可される。その結果、PLC20の状態は、上記機械語オブジェクト24としてプログラムDID11(その機械語)を記憶・実行しており、上記識別情報23として‘DID11’が記憶されている。   In this case, since the DID 10 is stored in the table 30 as described above, the download is permitted. As a result, the PLC 20 stores / executes the program DID11 (the machine language) as the machine language object 24, and stores “DID11” as the identification information 23.

その後、例えば別の支援装置(10’と記すものとする)で上記プログラムDID12が作成され、コンパイラ部12によるプログラムDID12のコンパイルが行われ、コンパイル成功して機械語が生成されたとする。   Thereafter, for example, it is assumed that the program DID12 is created by another support device (denoted as 10 '), the compiler D12 compiles the program DID12, and the compilation succeeds to generate a machine language.

尚、上記プログラムDID10のコピーの際に、上記テーブル30もコピーされているものとする(テーブル30’とする)。もしテーブル30’が無ければ上記識別情報23によるチェック処理自体が実行できないことになり、結局、ダウンロードできないことになる。   It is assumed that the table 30 is also copied when the program DID10 is copied (referred to as table 30 '). If there is no table 30 ′, the check process itself using the identification information 23 cannot be executed, and eventually it cannot be downloaded.

上記プログラムDID12のコンパイル完了時、上記テーブル30’には、DID1、DID2、・・・、DID9、DID10、DID12が記憶されていることになる。この状態においてプログラムDID12のダウンロードが指示された場合、支援装置10’は、上記支援装置10と同様、上記識別情報23(このとき、上記の通り“DID11”となっている)を取得して、これと同一の識別情報がテーブル30’に記憶されているか否かを判定し、記憶されている場合のみダウンロードを許可する。   When the compilation of the program DID12 is completed, DID1, DID2,..., DID9, DID10, and DID12 are stored in the table 30 '. When the download of the program DID12 is instructed in this state, the support apparatus 10 ′ acquires the identification information 23 (at this time, “DID11” as described above), like the support apparatus 10, It is determined whether or not the same identification information is stored in the table 30 ′, and download is permitted only when it is stored.

ここで、この場合、識別情報23(DID11)と同一の識別情報は、テーブル30’内に存在しないことになるので、ダウンロードは許可されないことになる。このようにして、上記制約条件の1つである「既存変数のアドレスを固定(維持)する」を満たしつつ、PLC20の稼働中にPLCプログラムを更新しても、PLC20の動作に異常が生じることがないようにできる。   Here, in this case, the same identification information as the identification information 23 (DID11) does not exist in the table 30 ', so that downloading is not permitted. In this way, even if the PLC program is updated while the PLC 20 is in operation while satisfying one of the above-described constraints, “fix (maintain) the address of an existing variable”, an abnormality occurs in the operation of the PLC 20. There can be no.

尚、上記PLC20には未だプログラムDID10(その機械語)が記憶・実行されている状態で、支援装置10’からプログラムDID12をダウンロードすることは、許可されることになる。この場合、その後に支援装置10からプログラムDID11をダウンロードしようとすると、不許可になる。   Note that it is permitted to download the program DID12 from the support apparatus 10 'while the program DID10 (the machine language) is still stored and executed in the PLC 20. In this case, subsequent attempts to download the program DID11 from the support device 10 are disapproved.

また尚、例えば仮に、上記PLC20には未だプログラムDID10(その機械語)が記憶・実行されている状態で、上記支援装置10において上記プログラムDID11のコンパイル完了後、この機械語をPLC20にダウンロードせずに、更にプログラムDID11をベースにした更新版プログラム(プログラムDID13とする)が作成されたとする。   In addition, for example, if the program DID10 (its machine language) is still stored and executed in the PLC 20, after the compilation of the program DID11 is completed in the support device 10, the machine language is not downloaded to the PLC 20. Furthermore, it is assumed that an updated version program (referred to as program DID13) based on the program DID11 is created.

これは、例えば、プログラムDID10は変数A,変数Bを有しており、プログラムDID11では変数Cを追加したが、コンパイル後にユーザが更に変数Dを追加する必要性を感じた為、プログラムDID13において更に変数Dを追加した場合等が考えられる。この場合、上記テーブル30には、DID1、DID2、・・・、DID9、DID10、DID11、DID13が記憶されていることになる。そして、PLC20側にはDID10が保持されているので、DID10がテーブル30にあることを以ってダウンロード許可されることになる。これより、プログラムDID13がPLC20にダウンロードされて更新されることになる。   This is because, for example, the program DID10 has a variable A and a variable B, and the program DID11 added the variable C. However, since the user felt the necessity to add the variable D after compilation, the program DID10 The case where the variable D is added etc. can be considered. In this case, the table 30 stores DID1, DID2,..., DID9, DID10, DID11, and DID13. Since the DID 10 is held on the PLC 20 side, downloading is permitted when the DID 10 is in the table 30. As a result, the program DID13 is downloaded to the PLC 20 and updated.

この場合、1世代分抜かされて(プログラムDID11が抜かされて)更新されることになるが、特に問題が生じるようなことはない。例えば上記の例において、プログラムDID10のコンパイル時には変数A,変数Bが、1000番地、1001番地に割当てられているものとする。その後、プログラムDID11のコンパイル時には変数A,変数Bの1000番地、1001番地への割当てが維持されると共に、変数Cに対しては例えば1002番地が割り当てられる。その後、プログラムDID13のコンパイル時には変数A,変数B、変数Cの1000番地、1001番地、1002番地への割当てが維持されると共に、変数Dに対しては例えば1003番地が割り当てられる。   In this case, one generation is extracted (program DID11 is extracted) and updated, but there is no particular problem. For example, in the above example, assume that variable A and variable B are assigned to addresses 1000 and 1001 when compiling program DID10. Thereafter, when the program DID11 is compiled, the assignment of the variables A and B to the addresses 1000 and 1001 is maintained, and the variable C is assigned, for example, the address 1002. Thereafter, at the time of compiling the program DID13, the assignment of the variables A, B, and C to the addresses 1000, 1001, and 1002 is maintained, and for example, the address 1003 is assigned to the variable D.

従って、PLC20にプログラムDID10が保持・実行されている状態で、プログラムDID13をダウンロードして更新しても、変数A,変数Bのアドレス割当てが変わるわけではなく、動作に問題が生じることはない。   Therefore, even if the program DID10 is held and executed in the PLC 20 and the program DID13 is downloaded and updated, the address assignment of the variables A and B does not change, and no problem occurs in operation.

上記の例では、ダウンロード対象のプログラムDID13は、PLC20で保持・実行されているプログラムDID10(マスタプログラム)の次の世代ではないが(換言すればマスタプログラムを直接ベースにして作成されたものではないが)、マスタプログラムが基になった派生プログラム(世代管理されたプログラム)であると言える。この様な場合、上記のようにダウンロードしても特に問題ないので、ダウンロード許可される。   In the above example, the download target program DID13 is not the next generation of the program DID10 (master program) held and executed by the PLC 20 (in other words, it is not created based on the master program directly). It can be said that it is a derived program (generation-managed program) based on the master program. In such a case, the download is permitted because there is no particular problem even if the download is performed as described above.

この様に、ダウンロード対象のプログラムが、現在のマスタプログラムが基になった派生プログラムであるか否かをチェックする為に、本手法では上記のように識別情報23と識別情報18群(テーブル30)を用いている。   In this way, in order to check whether or not the program to be downloaded is a derived program based on the current master program, in this method, the identification information 23 and the identification information 18 group (table 30) as described above are used. ) Is used.

ここで、例えば、パソコンに搭載されるOSやワープロソフト等のプログラムにおいては、その更新プログラムはメーカが作ったものが標準であり、世の中に1つしかないものである。従って、プログラムの更新作業は、メーカーが作った更新プログラムを一方的にインストールすれば、何等問題なくその更新が完結されることになる。   Here, for example, in a program such as an OS and word processor software installed in a personal computer, the update program is a standard program created by the manufacturer, and there is only one program in the world. Therefore, if the update program created by the manufacturer is unilaterally installed, the update of the program can be completed without any problem.

これに対して、PLCシステムでは、個々の顧客の要求仕様が違うため、一律の機能を提供すればよいというものではなく、顧客毎に違った機能(アプリケーション)を提供する必要がある。このアプリケーションを更新するには、そのときにそのPLCシステムが実際に実行しているプログラムに対して互換性(派生)を保ったプログラムを、PLCにダウンロードして更新させる必要がある(その個々の機能や既存の変数のアドレス割当てを継承する必要がある)。   On the other hand, in the PLC system, since the required specifications of each customer are different, it is not necessary to provide a uniform function, and it is necessary to provide a different function (application) for each customer. In order to update this application, it is necessary to download and update a program that maintains compatibility (derivation) with respect to the program that is actually executed by the PLC system at that time. Function or existing variable address assignment must be inherited).

この為、ダウンロード対象のプログラムが、PLC20に保持されたプログラム(マスタプログラムというものとする)が基になった派生プログラム(世代管理されたプログラム)であることを確認する必要がある。これを実現するために、上記のように一意の識別情報を用いたチェック処理を行うものである。   For this reason, it is necessary to confirm that the program to be downloaded is a derived program (a generation-managed program) based on a program (referred to as a master program) held in the PLC 20. In order to realize this, a check process using unique identification information is performed as described above.

上述したように、従来では上記(a)の認証ステップによる確認を行っていたのに対して、本手法では、PLCに保持されたマスタプログラムが基となった派生プログラム(世代管理されたプログラム)であることを確認するようにしたことを特徴としている。すなわち、マスタプログラムを基に世代管理されたプログラムであれば、稼働中のPLCに対する変更に適合したプログラムであると見做すようにしている。世代管理されたプログラムであることを確認する為に、上記一意の識別情報18を用いて識別情報管理テーブル30で管理する構成としている。   As described above, in the past, confirmation by the authentication step (a) was performed, but in this method, a derived program (a generation-managed program) based on the master program held in the PLC. It is characterized by confirming that. In other words, if the program is generation-managed based on the master program, it is assumed that the program is suitable for changes to the operating PLC. In order to confirm that the program is a generation-managed program, the identification information management table 30 is used to manage the unique identification information 18.

尚、後述するフローチャートの処理では、上述した特徴に加えて、更に差分ダウンロードを行う処理となっているが、差分ダウンロードは必須ではない。尚、差分ダウンロードとは、例えば上記プログラムDID11(その機械語)をダウンロードする場合には、プログラムDID11においてプログラムDID10とは異なる部分だけをダウンロードするものである。   In addition, in the process of the flowchart to be described later, in addition to the above-described features, a process for further downloading a difference is performed, but the difference download is not essential. For example, in the case of downloading the program DID11 (its machine language), the difference download means downloading only a portion of the program DID11 that is different from the program DID10.

また、尚、支援装置10が、最初にPLC20にプログラムをダウンロードする場合は、PLC20を停止して、通信機能を利用してPLC20にプログラムとその識別情報をダウンロードする。その後、PLC20を稼動状態にする。これは、初期状態では、未だPLC20にプログラムが格納されておらず、よって識別情報も格納されていない状態となっており、本手法を適用できない(ダウンロードが許可されない)為であり、PLC20を停止してプログラム等をダウンロードするようにしている(稼働中ではないので問題ない)。   In addition, when the support device 10 first downloads the program to the PLC 20, the PLC 20 is stopped and the program and its identification information are downloaded to the PLC 20 using the communication function. Thereafter, the PLC 20 is brought into an operating state. This is because, in the initial state, the program is not yet stored in the PLC 20, and therefore the identification information is not stored. This method cannot be applied (downloading is not permitted), and the PLC 20 is stopped. The program is downloaded (no problem because it is not in operation).

以上説明した処理の具体的処理例を、図4、図5のフローチャート図に示す。
以下、図4、図5のフローチャート図について説明する。
図4は、プログラム編集(更新)とコンパイル時の処理を示す。
Specific processing examples of the processing described above are shown in the flowcharts of FIGS.
Hereinafter, the flowcharts of FIGS. 4 and 5 will be described.
FIG. 4 shows the program editing (updating) and compiling process.

図4において、ユーザは、支援装置10において、任意のソースプログラム(ソースコード16)を作成する。これは、基本的には、既存のソースプログラムに基づいて何らかの所望の変更を行うことで作成される。そして、ユーザが、作成したソースコード16のコンパイルを指示することで、コンパイラ部12が当該ソースコード16のコンパイルを実行する(ステップS11)。そして、コンパイル成功して(ステップS12、YES)機械語オブジェクト17が生成されたら、識別情報生成部13が、生成された機械語オブジェクト17に対応付ける一意の識別情報18を生成する(ステップS13)。   In FIG. 4, the user creates an arbitrary source program (source code 16) in the support apparatus 10. This is basically created by making some desired changes based on the existing source program. Then, when the user instructs to compile the generated source code 16, the compiler unit 12 executes the compile of the source code 16 (step S11). When the compilation is successful (YES in step S12) and the machine language object 17 is generated, the identification information generation unit 13 generates unique identification information 18 associated with the generated machine language object 17 (step S13).

上記コンパイルは、制約条件を満たさない場合は、成功しない。これは、例えば上記先願の背景技術として説明した従来技術において、例えば上記「予備領域では足りないような変数の追加があった場合」には、上記「既存変数のアドレスを固定(維持)する」条件を満たさなくなるので、実質的にコンパイル失敗となる。   The above compilation will not succeed if the constraints are not met. For example, in the conventional technique described as the background art of the prior application, for example, when “addition of a variable that is not sufficient in the spare area” is performed, the “address of the existing variable” is fixed (maintained). Since the condition is not satisfied, the compilation is substantially failed.

従って、ステップS12がYESになる場合には、制約条件を満足するはずの機械語オブジェクト17が生成されることになり、識別情報18はこの様な機械語オブジェクト17に対してのみ生成されてテーブル30に登録・管理されることになる。但し、この様な機械語オブジェクト17をPLC20にダウンロードして実行させても動作異常が生じる可能性がある(理由は既に述べた)。この為、本手法では、識別情報を用いてダウンロード許可の判定を行う。例えば後述する図5の処理でテーブル30を参照してダウンロード許可された場合、ダウンロードされる機械語オブジェクト17は、制約条件(特に、既存変数のアドレスを固定(維持)すること)を満足することが保障されたものとなる。これについては詳しくは後述する。   Therefore, when step S12 is YES, a machine language object 17 that should satisfy the constraint condition is generated, and the identification information 18 is generated only for such a machine language object 17 and is stored in the table. 30 will be registered and managed. However, even if such a machine language object 17 is downloaded to the PLC 20 and executed, an operation abnormality may occur (the reason has already been described). For this reason, in this method, determination of download permission is performed using identification information. For example, when the download is permitted with reference to the table 30 in the processing of FIG. 5 described later, the machine language object 17 to be downloaded satisfies the constraint condition (in particular, fixing (maintaining) the address of the existing variable). Is guaranteed. This will be described in detail later.

識別情報18は、例えば、現在日時情報とプログラムの識別情報と支援装置10の識別情報とを用いて生成されるものであり(但し、この例に限らない)、その生成元の支援装置10だけでなく他の支援装置10であってもこれと同一の識別情報が生成されることはない一意な識別情報である。   The identification information 18 is generated using, for example, the current date and time information, the program identification information, and the identification information of the support device 10 (but not limited to this example). It is unique identification information in which the same identification information is not generated even in other support apparatuses 10.

ここで、この識別情報18生成について、具体例を挙げて説明する。
例えば、「識別情報18=Mac+PJ+日時」
によって、識別情報18を生成する。上記Macは支援装置10のMACアドレスである。但し、この例に限らず、各支援装置10を一意に識別できる情報であれば何でも良く、例えば製造番号等であってもよい。上記PJは、プロジェクトファイル名である。つまり、プログラムをプロジェクト単位で管理している場合におけるプロジェクトファイルの名称であるが、フォルダ名などであってもよい。勿論、PJの代わりに例えばプログラムファイル名等を用いてもよい。尚、“プロジェクト”は、例えばIEC61131-3で定義されているが、この定義に限るものではない。例えば、一般的にも、複数のPOU(プログラム)とそれに付随する設定情報が、プロジェクトの情報としてパソコン等に保存される。
Here, the generation of the identification information 18 will be described with a specific example.
For example, “identification information 18 = Mac + PJ + date and time”
Thus, the identification information 18 is generated. The Mac is the MAC address of the support apparatus 10. However, the present invention is not limited to this example, and any information may be used as long as the information can uniquely identify each support apparatus 10, and for example, a production number may be used. The PJ is a project file name. That is, it is the name of the project file when the program is managed in units of projects, but may be a folder name or the like. Of course, a program file name or the like may be used instead of PJ. “Project” is defined in IEC61131-3, for example, but is not limited to this definition. For example, generally, a plurality of POUs (programs) and setting information associated therewith are stored in a personal computer or the like as project information.

あるいは、プロジェクトは、フォルダ単位で管理されるものであり、フォルダ内にはこのプロジェクトに係る各種ファイル(プログラムファイルや設定情報ファイル等)が格納されるものであって、上記識別情報管理テーブル30もファイルの1つとして格納されるものであってもよい。   Alternatively, a project is managed in units of folders, and various files (program files, setting information files, etc.) related to the project are stored in the folder. The identification information management table 30 is also included in the project. It may be stored as one of the files.

上記日時は、例えば、西暦2011年12月26日14時27分35.078秒等というように、年月日時分秒(秒は1/100秒)のレベルで示されるものとする。このレベルであれば、支援装置10が、全く同じ日時に複数の識別情報18を生成するのは困難であり、他の支援装置10では全く同じ日時に識別情報18を生成することは可能であっても今度はMacが異なることになる。従って、例えば上記のように生成される識別番号18は、必ず一意のものになると見做してよいと言える。   The date and time are indicated at the level of year / month / day / hour / minute / second (second is 1/100 second), for example, December 26, 2011, 14: 27: 35.078 seconds. At this level, it is difficult for the support device 10 to generate a plurality of identification information 18 at exactly the same date and time, and it is possible for other support devices 10 to generate the identification information 18 at the exact same date and time. But this time, Mac will be different. Therefore, for example, it can be considered that the identification number 18 generated as described above is necessarily unique.

識別情報管理部14は、上記ステップS13で生成された識別情報18を、最新の世代として識別情報管理テーブル30に記憶する(ステップS14)。これは、例えば、テーブル30における現在の最新の世代31に対して+1インクリメントして世代数を1つ増加させ、当該新たな最新の世代数と、上記生成された識別情報18とを、識別情報管理テーブル30の新規レコードの世代31と識別情報32に格納する。   The identification information management unit 14 stores the identification information 18 generated in step S13 in the identification information management table 30 as the latest generation (step S14). For example, the current latest generation 31 in the table 30 is incremented by +1 to increase the number of generations by one, and the new latest generation number and the generated identification information 18 are identified by the identification information. The new record generation 31 and the identification information 32 are stored in the management table 30.

次に、図5のダウンロード処理について説明する。
PLC20が稼働中にそのプログラムを更新させる為に新たなプログラム(更新版プログラム)を支援装置10からPLC20へダウンロードする場合、本手法では支援装置10が、上記識別情報管理テーブル30等を用いて、ダウンロードを許可するか否かを判定する。
Next, the download process in FIG. 5 will be described.
When a new program (updated version program) is downloaded from the support apparatus 10 to the PLC 20 in order to update the program while the PLC 20 is in operation, the support apparatus 10 uses the identification information management table 30 or the like in this method. Determine whether to allow download.

すなわち、ユーザ等が支援装置10をPLC20に接続すると、オンラインモード開始となり、支援装置10はまずPLC20から当該PLC20が保持している識別情報23を取得する(ステップS21)。尚、既に述べたように、識別情報23は、PLC20が現在、保持・実行している機械語オブジェクト24に対応する識別情報である。   That is, when the user or the like connects the support apparatus 10 to the PLC 20, the online mode starts, and the support apparatus 10 first acquires the identification information 23 held by the PLC 20 from the PLC 20 (step S21). As already described, the identification information 23 is identification information corresponding to the machine language object 24 currently held and executed by the PLC 20.

支援装置10は、続いて、上記取得した識別情報23が、識別情報管理テーブル30内に存在するか否かを判定する。すなわち、識別情報管理テーブル30の各識別情報32のなかに、識別情報23と同一の識別情報が存在するか否かをチェックする(ステップS22)。   Subsequently, the support apparatus 10 determines whether or not the acquired identification information 23 exists in the identification information management table 30. That is, it is checked whether or not the same identification information as the identification information 23 exists in each identification information 32 of the identification information management table 30 (step S22).

もし、識別情報管理テーブル30内に識別情報23と一致するものが存在しない場合には(ステップS22,NO)、ダウンロードは不許可となり、例えば「ダウンロードを実施できない」旨のメッセージを表示する等して(ステップS26)、本処理を終了する。   If there is no item that matches the identification information 23 in the identification information management table 30 (step S22, NO), the download is not permitted and, for example, a message indicating that the download cannot be performed is displayed. (Step S26), and this process is terminated.

一方、識別情報管理テーブル30内に識別情報23と一致するものが存在する場合には(ステップS22,YES)、ダウンロードを許可するものと判定し、本例では差分のみをダウンロードするので、まず差分部分を求める。   On the other hand, if there is a thing that matches the identification information 23 in the identification information management table 30 (step S22, YES), it is determined that the download is permitted and only the difference is downloaded in this example. Find the part.

すなわち、PLC20内のプログラムとの照合処理を実施し、相互に異なる部分をPLCに送信する。これは、例えば、プログラムが複数のPOU(あるいはプログラムファイル等)から成るものである場合には、支援装置10の上記変更版プログラム17を構成する各POUと、PLC20に保持され動作しているプログラム24の各POUとを比較照合して(POUの内容を比較照合して)、完全に一致しない場合には不一致と判定し、“不一致となるPOU”(差分)を全て抽出して一覧表示する(ステップS23)。尚、POUとは、プログラム構成単位を意味し、例えばPG(プログラム)、FB(ファンクションブロック)、FCT(ファンクション)等の種類があるが、この例に限らない。   That is, collation processing with the program in the PLC 20 is performed, and different portions are transmitted to the PLC. For example, when the program is composed of a plurality of POUs (or program files, etc.), the POUs constituting the modified version program 17 of the support apparatus 10 and the programs held and operated in the PLC 20 24 POUs are compared with each other (by comparing the contents of the POUs). If they do not completely match, it is determined that they do not match, and all “POUs that do not match” (difference) are extracted and displayed in a list. (Step S23). Note that the POU means a program structural unit. For example, there are types such as PG (program), FB (function block), and FCT (function), but the present invention is not limited to this example.

その後、この差分一覧表示を参照したユーザが、そのなかからダウンロードすべきPOUを任意に選択指定して(勿論、全てを選択してもよい)差分ダウンロード開始指示を出すと(ステップS24,YES)、支援装置10は、上記“不一致となるPOU”(差分)であってユーザ指定されたPOU全てを、PLC20にダウンロードする(ステップS25)。尚、ユーザがダウンロードをキャンセル等した場合には(ステップS24,NO)、ダウンロードすることなく本処理を終了する。   After that, when the user who refers to this difference list display arbitrarily selects and designates POUs to be downloaded (of course, all may be selected) and issues a difference download start instruction (YES in step S24). The support apparatus 10 downloads all the POUs designated by the user that are the above-mentioned “POUs that do not match” (difference) to the PLC 20 (step S25). If the user cancels the download (step S24, NO), the process ends without downloading.

尚、上記ステップS22の判定がYESの場合であっても、当該一致確認した識別情報が最新の場合は、ステップS23以降の処理を実行しないようにしてもよい。PLC20の識別情報23と最新プログラムの識別情報が一致した場合、当該最新プログラムが既にPLC20にダウンロードされていることを意味するので、同じプログラムを再度ダウンロードする必要が無いからである。尚、本例ではその世代番号(世代31)が一番大きい識別情報32が、最新となる(最新のプログラムに対応するものとなる)。その為に、識別情報32だけでなく世代31の情報も生成して格納している。   Even if the determination in step S22 is YES, if the identification information that has been confirmed to match is the latest, the processing from step S23 onward may not be executed. This is because when the identification information 23 of the PLC 20 matches the identification information of the latest program, it means that the latest program has already been downloaded to the PLC 20, and therefore it is not necessary to download the same program again. In this example, the identification information 32 having the largest generation number (generation 31) is the latest (corresponding to the latest program). For this purpose, not only the identification information 32 but also the information of the generation 31 is generated and stored.

上記のことから、例えば、ステップS22の判定がYESの場合、識別情報23に対応する世代も、この世代が最新の世代(世代31として登録されている各世代のうち最大)であるか否かも、識別情報管理テーブル30を参照すれば分かるので、識別情報23に対応する世代が最新の世代である場合にはステップS23以降の処理を実行せずに本処理を終了し、最新の世代ではない場合にはステップS23以降の処理を実行する。   From the above, for example, if the determination in step S22 is YES, whether the generation corresponding to the identification information 23 is also the latest generation (maximum of the generations registered as the generation 31) or not. As can be understood by referring to the identification information management table 30, if the generation corresponding to the identification information 23 is the latest generation, this processing is terminated without executing the processing after step S23, and the generation is not the latest generation. In this case, the processing after step S23 is executed.

尚、本処理例では、差分のなかからユーザが任意に選択した一部のみをダウンロードするが、この例に限らず、差分全てを強制的にダウンロードすることで、PLC20の保持プログラムを、最新版へと更新させるようにしてもよい。尚、基本的に、PLC20には最新版のプログラムを保持させる必要がある(そうしないと、支援装置10側でのモニタ処理に支障がでる)。   In this processing example, only a part arbitrarily selected by the user from the differences is downloaded. However, the present invention is not limited to this example, and the latest version of the program retained in the PLC 20 can be downloaded by forcibly downloading all the differences. You may make it update to. Basically, it is necessary for the PLC 20 to hold the latest version of the program (otherwise, the monitoring process on the support apparatus 10 side will be hindered).

上記のように、世代管理することで、PLC20側に既に最新プログラムがある場合には、無意味なダウンロード処理が実行されずに済み、ユーザは直ちにモニタを行えるようになる。   As described above, by performing generation management, if there is already the latest program on the PLC 20 side, meaningless download processing is not executed, and the user can immediately monitor.

尚、上記ソースコード16や機械語オブジェクト17、24等のプログラマブルコントローラにおいて実行させるPLC用プログラム(制御プログラム)は、プロジェクト(プロジェクトファイルまたはプロジェクトデータ等)単位で管理・実行される場合がある。プロジェクトは、例えば、複数のPOU(Program Organization Unit)すなわちPOU群などで構成される。POU群は、ユーザの作成したプログラムを構成する要素全てであり、例えばファンクションやファンクションブロックなどの実行コード等から構成される。   The PLC program (control program) to be executed by the programmable controller such as the source code 16 and the machine language objects 17 and 24 may be managed and executed in units of projects (project files or project data). The project is composed of, for example, a plurality of POUs (Program Organization Units), that is, POU groups. The POU group is all the elements that make up the program created by the user, and includes, for example, execution codes such as functions and function blocks.

これより、支援装置10は、プロジェクト単位でユーザが記述したプログラムや各種設定を管理するものであってもよい。プロジェクトには、複数のプログラム(POU群等)や各種設定情報などが含まれる。本手法は、制約条件の継続性の確認を、プログラム単位だけでなく、プロジェクト単位でも実施可能である。   Thus, the support apparatus 10 may manage programs and various settings described by the user on a project basis. The project includes a plurality of programs (POU group etc.) and various setting information. This method can check the continuity of constraints not only on a program basis but also on a project basis.

稼働中のPLCのプログラムを変更するためには、いくつかの制約条件がある。そこで、プログラムに対する変更が制約条件を満足してあることを保障するため、支援装置は、プログラムの一致を確認した後、制約条件内の操作しかユーザに許可しないようにしている(但し、既に述べたように、必ずしも制約条件を満足していることが保障されるわけではない)。これは、既に従来で述べたコンパイラの機能によるものであり、制約条件を満足しない変更が行われたプログラムは、コンパイル成功しないことになる。しかしながら、コンパイル成功した場合でも、つまり制約条件を満足していることは保障されると見做される場合であっても、稼働中のPLCに対する変更に適合したプログラムであること(本当に制約条件を満足していること)が保障されるわけではない。   In order to change the program of the running PLC, there are some restrictions. Therefore, in order to ensure that the change to the program satisfies the constraint condition, the support device allows the user to perform only operations within the constraint condition after confirming the matching of the program (however, as already described). As such, it is not always guaranteed that the constraints are satisfied). This is because of the function of the compiler already described in the prior art, and a program in which a change that does not satisfy the constraint condition is made will not compile successfully. However, even if the compilation is successful, that is, even if it is assumed that it is guaranteed that the constraints are satisfied, it must be a program that conforms to the changes to the running PLC. Satisfaction) is not guaranteed.

例えばプログラムの更新が2系統に別れて、一方の系統の更新版プログラムがプログラマブルコントローラにダウンロードされて運用されている状態で、他方の系統で最新の更新版プログラムが作成された場合、当該他方の系統の更新版プログラムでは、稼働中のPLC20に対する変更に適合したプログラムであることは保障されない。本手法によれば、当該他方の系統の識別情報管理テーブル30には、PLC20の現在の識別情報23は登録されていないので、これによってダウンロード不許可にできる。   For example, when the program update is divided into two systems, and the update program of one system is downloaded and operated in the programmable controller, the latest update program is created in the other system. It is not guaranteed that the updated program of the system is a program adapted to a change to the operating PLC 20. According to this method, the current identification information 23 of the PLC 20 is not registered in the identification information management table 30 of the other system.

これに対して、上述した本手法によれば、変更・更新されたプログラムが、稼働中のPLCに対する変更に適合したプログラムであることを確認して更新することができるため、例えば、システムに適合しないプログラムの転送などによる人為的ミスを確実に防ぐことができる高信頼なプログラマブルコントローラシステムを提供することができる。   On the other hand, according to the above-described method, since the changed / updated program can be confirmed and updated as a program suitable for the change to the running PLC, for example, it is compatible with the system. It is possible to provide a highly reliable programmable controller system that can reliably prevent human error due to transfer of a program that is not executed.

換言すれば、本例の支援装置は、制約条件内でプログラム変更の継続性を、識別情報を管理することにより保証し、ユーザの手作業による更新版プログラムの反映を行う必要なく、支援装置が変更されたプログラムをPLCに転送することにより、人為的ミスの防止、作業時間の低減が可能である。   In other words, the support device of this example guarantees continuity of program change within the constraint conditions by managing the identification information, and the support device does not need to reflect the updated version program manually by the user. By transferring the changed program to the PLC, it is possible to prevent human error and reduce work time.

10 支援装置
11 ユーザインターフェース機能部
12 コンパイラ部
13 識別情報生成部
14 識別情報管理部
15 通信機能部
16 ソースコード
17 機械語オブジェクト
18 識別情報
20 PLC
21 通信機能部
22 プログラム実行管理機能部
23 識別情報
24 機械語オブジェクト
30 識別情報管理テーブル
31 世代
32 識別情報
DESCRIPTION OF SYMBOLS 10 Support apparatus 11 User interface function part 12 Compiler part 13 Identification information generation part 14 Identification information management part 15 Communication function part 16 Source code 17 Machine language object 18 Identification information 20 PLC
21 Communication Function Unit 22 Program Execution Management Function Unit 23 Identification Information 24 Machine Language Object 30 Identification Information Management Table 31 Generation 32 Identification Information

Claims (8)

支援装置とプログラマブルコントローラを有するプログラマブルコントローラシステムであって、
前記支援装置は、
ユーザに前記プログラマブルコントローラ用のプログラムを任意に作成させる手段であって、既存のプログラムを編集させることで該プログラムの更新版を作成させるプログラム作成支援手段と、
該更新版のプログラムをコンパイルして機械語オブジェクトを生成するコンパイル手段と、
前記コンパイル手段によって前記機械語オブジェクトが生成される毎に、対応する一意の識別情報を生成すると共に、該生成した識別情報を前記プログラムに係る識別情報記憶部に追加登録する識別情報生成・登録手段と、
ダウンロード許可される場合には、前記更新版のプログラムと対応する前記識別情報とを前記プログラマブルコントローラにダウンロードするダウンロード手段とを有し、
前記プログラマブルコントローラは、
前記プログラマブルコントローラ用のプログラムを記憶するプログラム記憶手段と、
識別情報を記憶する識別情報記憶手段と、
前記ダウンロード手段によってダウンロードされた前記更新版のプログラムと対応する前記識別情報とによって、前記プログラム記憶手段と前記識別情報記憶手段の記憶内容を更新する管理手段とを有し、
前記支援装置の前記ダウンロード手段は、前記識別情報記憶手段に記憶されている識別情報を取得して、該識別情報が前記識別情報記憶部に登録されている場合にはダウンロード許可されると判定することを特徴とするプログラマブルコントローラシステム。
A programmable controller system having a support device and a programmable controller,
The support device includes:
Means for arbitrarily creating a program for the programmable controller by a user, and a program creation support means for creating an updated version of the program by editing an existing program;
Compiling means for compiling the updated version of the program to generate a machine language object;
Each time the machine language object is generated by the compiling unit, corresponding unique identification information is generated, and the generated identification information is additionally registered in the identification information storage unit according to the program. When,
If the download is permitted, the update program and the download information for downloading the corresponding identification information to the programmable controller,
The programmable controller is
Program storage means for storing a program for the programmable controller;
Identification information storage means for storing identification information;
The program storage means and a management means for updating the storage contents of the identification information storage means with the identification information corresponding to the updated version of the program downloaded by the download means,
The download unit of the support apparatus acquires the identification information stored in the identification information storage unit, and determines that the download is permitted when the identification information is registered in the identification information storage unit. A programmable controller system characterized by that.
前記コンパイル手段は、前記機械語オブジェクト生成の際に、少なくとも既存変数のアドレスを維持する制約条件を守るように、変数のアドレス割当てを行うことを特徴とする請求項1記載のプログラマブルコントローラシステム。   2. The programmable controller system according to claim 1, wherein the compiling unit performs variable address assignment so that at least a constraint condition for maintaining an address of an existing variable is observed when the machine language object is generated. 前記識別情報は、該生成元の支援装置だけでなく他の支援装置であってもこれと同一の識別情報が生成されることはない一意な識別情報であることを特徴とする請求項1記載のプログラマブルコントローラシステム。   The identification information is unique identification information in which the same identification information is not generated not only by the support device of the generation source but also by another support device. Programmable controller system. 前記識別情報は、現在日時情報と前記プログラムの識別情報と前記支援装置の識別情報とを用いて生成されることを特徴とする請求項3記載のプログラマブルコントローラシステム。   The programmable controller system according to claim 3, wherein the identification information is generated using current date and time information, identification information of the program, and identification information of the support device. 識別情報生成・登録手段は、前記生成した識別情報に対応する世代情報を生成して、該識別情報に該世代情報を対応付けて前記識別情報記憶部に追加登録することを特徴とする請求項1〜4の何れかに記載のプログラマブルコントローラシステム。   The identification information generation / registration unit generates generation information corresponding to the generated identification information, and additionally registers the generation information in association with the identification information in the identification information storage unit. The programmable controller system in any one of 1-4. 前記ダウンロード手段は、前記プログラマブルコントローラの前記プログラム記憶手段に記憶されるプログラムと、前記ダウンロード対象となる前記更新版のプログラムとの差分を抽出して一覧表示して、該差分の全部または一部をユーザに選択させて、該選択部分のみを前記プログラマブルコントローラにダウンロードすることを特徴とする請求項1〜5の何れかに記載のプログラマブルコントローラシステム。   The download means extracts and displays a list of differences between the program stored in the program storage means of the programmable controller and the updated version of the program to be downloaded, and all or part of the differences are displayed. The programmable controller system according to claim 1, wherein the selection is performed by a user and only the selected portion is downloaded to the programmable controller. 支援装置とプログラマブルコントローラを有するプログラマブルコントローラシステムの該支援装置であって、
ユーザに前記プログラマブルコントローラ用のプログラムを任意に作成させる手段であって、既存のプログラムを編集させることで該プログラムの更新版を作成させるプログラム作成支援手段と、
該更新版のプログラムをコンパイルして機械語オブジェクトを生成するコンパイル手段と、
前記コンパイル手段によって前記機械語オブジェクトが生成される毎に、対応する一意の識別情報を生成すると共に、該生成した識別情報を前記プログラムに係る識別情報記憶部に追加登録する識別情報生成・登録手段と、
ダウンロード許可される場合には、前記更新版のプログラムと対応する前記識別情報とを前記プログラマブルコントローラにダウンロードするダウンロード手段とを有し、
前記ダウンロード手段は、前記プログラマブルコントローラに記憶されている、該プログラマブルコントローラが保持・実行しているプログラムに対応する識別情報を取得して、該取得した識別情報が前記識別情報記憶部に登録されている場合にはダウンロード許可されると判定することを特徴とするプログラマブルコントローラの支援装置。
The support device of a programmable controller system having a support device and a programmable controller,
Means for arbitrarily creating a program for the programmable controller by a user, and a program creation support means for creating an updated version of the program by editing an existing program;
Compiling means for compiling the updated version of the program to generate a machine language object;
Each time the machine language object is generated by the compiling unit, corresponding unique identification information is generated, and the generated identification information is additionally registered in the identification information storage unit according to the program. When,
If the download is permitted, the update program and the download information for downloading the corresponding identification information to the programmable controller,
The download unit acquires identification information stored in the programmable controller and corresponding to a program held and executed by the programmable controller, and the acquired identification information is registered in the identification information storage unit. A programmable controller support device that determines that download is permitted when the download is permitted.
支援装置とプログラマブルコントローラを有するプログラマブルコントローラシステムの該支援装置のコンピュータを、
ユーザに前記プログラマブルコントローラ用のプログラムを任意に作成させる手段であって、既存のプログラムを編集させることで該プログラムの更新版を作成させるプログラム作成支援手段と、
該更新版のプログラムをコンパイルして機械語オブジェクトを生成するコンパイル手段と、
前記コンパイル手段によって前記機械語オブジェクトが生成される毎に、対応する一意の識別情報を生成すると共に、該生成した識別情報を前記プログラムに係る識別情報記憶部に追加登録する識別情報生成・登録手段と、
ダウンロード許可される場合には前記更新版のプログラムと対応する前記識別情報とを前記プログラマブルコントローラにダウンロードする手段であって、前記プログラマブルコントローラに記憶されている、該プログラマブルコントローラが保持・実行しているプログラムに対応する識別情報を取得して、該取得した識別情報が前記識別情報記憶部に登録されている場合にはダウンロード許可されると判定するダウンロード手段、
として機能させるためのプログラム。

A computer of the support device of the programmable controller system having the support device and the programmable controller,
Means for arbitrarily creating a program for the programmable controller by a user, and a program creation support means for creating an updated version of the program by editing an existing program;
Compiling means for compiling the updated version of the program to generate a machine language object;
Each time the machine language object is generated by the compiling unit, corresponding unique identification information is generated, and the generated identification information is additionally registered in the identification information storage unit according to the program. When,
When downloading is permitted, the program is a means for downloading the updated version of the program and the corresponding identification information to the programmable controller, which is stored and executed by the programmable controller. Downloading means for acquiring identification information corresponding to a program, and determining that downloading is permitted when the acquired identification information is registered in the identification information storage unit;
Program to function as.

JP2012031054A 2012-02-15 2012-02-15 Programmable controller system, its support device, program Active JP5957936B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012031054A JP5957936B2 (en) 2012-02-15 2012-02-15 Programmable controller system, its support device, program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012031054A JP5957936B2 (en) 2012-02-15 2012-02-15 Programmable controller system, its support device, program

Publications (2)

Publication Number Publication Date
JP2013168031A true JP2013168031A (en) 2013-08-29
JP5957936B2 JP5957936B2 (en) 2016-07-27

Family

ID=49178381

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012031054A Active JP5957936B2 (en) 2012-02-15 2012-02-15 Programmable controller system, its support device, program

Country Status (1)

Country Link
JP (1) JP5957936B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015162179A (en) * 2014-02-28 2015-09-07 ファナック株式会社 Sequence program replacement method of programmable controller
JP2016099899A (en) * 2014-11-25 2016-05-30 富士電機株式会社 Control system, support device of the same, and programmable control device
JP2017037466A (en) * 2015-08-10 2017-02-16 オムロン株式会社 Support device and support program
JP2017062757A (en) * 2015-09-25 2017-03-30 富士電機株式会社 Controller system, and support device thereof
WO2017128160A1 (en) * 2016-01-28 2017-08-03 深圳配天智能技术研究院有限公司 Method for machining reset, compiler, robot, numerical control system, and machine tool
JP2018013917A (en) * 2016-07-20 2018-01-25 株式会社Ihi Logic update device and logic update method
JP2018132817A (en) * 2017-02-13 2018-08-23 横河電機株式会社 Engineering device, engineering method and program
CN109143993A (en) * 2017-06-19 2019-01-04 费希尔-罗斯蒙特系统公司 Configuration change in synchronizing process factory
JP6541902B1 (en) * 2018-05-29 2019-07-10 三菱電機株式会社 Program management system, programming support apparatus, program management method, and programming support program
JP2019207534A (en) * 2018-05-29 2019-12-05 オムロン株式会社 Support device, control system, and development support program
WO2022254928A1 (en) * 2021-05-31 2022-12-08 オムロン株式会社 Control device, control system, and program managing control program updates
JP7456557B1 (en) 2022-12-19 2024-03-27 三菱電機株式会社 Drawing support program, drawing support method, drawing support device, and drawing support system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000284815A (en) * 1999-03-30 2000-10-13 Fuji Electric Co Ltd Program generating device
JP2003058380A (en) * 2001-08-09 2003-02-28 Fuji Electric Co Ltd Support device of programmable controller, compiling method and compiler
JP2007080167A (en) * 2005-09-16 2007-03-29 Hitachi Information Systems Ltd Software resource distribution system and method, and program
JP2008282362A (en) * 2007-05-14 2008-11-20 Keyence Corp Program editing support device, computer program, program editing support method, and plc system
JP2009146229A (en) * 2007-12-14 2009-07-02 Fuji Electric Systems Co Ltd Programmable controller system
JP2012027639A (en) * 2010-07-22 2012-02-09 Fuji Electric Co Ltd Programmable controller and debug method of programmable controller
JP2012216150A (en) * 2011-04-01 2012-11-08 Mitsubishi Electric Corp Programmable controller system and memory defragmenting method
JP2012234272A (en) * 2011-04-28 2012-11-29 Fuji Electric Co Ltd Programmable controller system and support device therefor
JP2013025347A (en) * 2011-07-15 2013-02-04 Fuji Electric Co Ltd Programmable controller

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000284815A (en) * 1999-03-30 2000-10-13 Fuji Electric Co Ltd Program generating device
JP2003058380A (en) * 2001-08-09 2003-02-28 Fuji Electric Co Ltd Support device of programmable controller, compiling method and compiler
JP2007080167A (en) * 2005-09-16 2007-03-29 Hitachi Information Systems Ltd Software resource distribution system and method, and program
JP2008282362A (en) * 2007-05-14 2008-11-20 Keyence Corp Program editing support device, computer program, program editing support method, and plc system
JP2009146229A (en) * 2007-12-14 2009-07-02 Fuji Electric Systems Co Ltd Programmable controller system
JP2012027639A (en) * 2010-07-22 2012-02-09 Fuji Electric Co Ltd Programmable controller and debug method of programmable controller
JP2012216150A (en) * 2011-04-01 2012-11-08 Mitsubishi Electric Corp Programmable controller system and memory defragmenting method
JP2012234272A (en) * 2011-04-28 2012-11-29 Fuji Electric Co Ltd Programmable controller system and support device therefor
JP2013025347A (en) * 2011-07-15 2013-02-04 Fuji Electric Co Ltd Programmable controller

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015162179A (en) * 2014-02-28 2015-09-07 ファナック株式会社 Sequence program replacement method of programmable controller
JP2016099899A (en) * 2014-11-25 2016-05-30 富士電機株式会社 Control system, support device of the same, and programmable control device
CN107615192A (en) * 2015-08-10 2018-01-19 欧姆龙株式会社 Support device, method and the recording medium for preserving support program
WO2017026290A1 (en) * 2015-08-10 2017-02-16 オムロン株式会社 Support device, method, and recording medium whereon support program is stored
CN107615192B (en) * 2015-08-10 2020-03-17 欧姆龙株式会社 Support device, method and recording medium storing support program
EP3336627A4 (en) * 2015-08-10 2019-04-03 Omron Corporation Support device, method, and recording medium whereon support program is stored
JP2017037466A (en) * 2015-08-10 2017-02-16 オムロン株式会社 Support device and support program
US10705500B2 (en) 2015-08-10 2020-07-07 Omron Corporation Support device, method, and recording medium for simplifying control program changing operation
JP2017062757A (en) * 2015-09-25 2017-03-30 富士電機株式会社 Controller system, and support device thereof
WO2017128160A1 (en) * 2016-01-28 2017-08-03 深圳配天智能技术研究院有限公司 Method for machining reset, compiler, robot, numerical control system, and machine tool
JP2018013917A (en) * 2016-07-20 2018-01-25 株式会社Ihi Logic update device and logic update method
JP2018132817A (en) * 2017-02-13 2018-08-23 横河電機株式会社 Engineering device, engineering method and program
CN109143993A (en) * 2017-06-19 2019-01-04 费希尔-罗斯蒙特系统公司 Configuration change in synchronizing process factory
JP2019003652A (en) * 2017-06-19 2019-01-10 フィッシャー−ローズマウント システムズ,インコーポレイテッド Synchronization of configuration changes in process plant
JP7226900B2 (en) 2017-06-19 2023-02-21 フィッシャー-ローズマウント システムズ,インコーポレイテッド Synchronization of configuration changes within the process plant
JP6541902B1 (en) * 2018-05-29 2019-07-10 三菱電機株式会社 Program management system, programming support apparatus, program management method, and programming support program
WO2019230262A1 (en) * 2018-05-29 2019-12-05 オムロン株式会社 Support device, control system, and development assistance program
JP2019207534A (en) * 2018-05-29 2019-12-05 オムロン株式会社 Support device, control system, and development support program
KR20200140382A (en) 2018-05-29 2020-12-15 미쓰비시덴키 가부시키가이샤 Program management system, programming support device, program management method and programming support program
CN112204479A (en) * 2018-05-29 2021-01-08 三菱电机株式会社 Program management system, program support device, program management method, and program support program
CN112204479B (en) * 2018-05-29 2021-12-07 三菱电机株式会社 Program management system, program support device, program management method, and program support program
JP7067273B2 (en) 2018-05-29 2022-05-16 オムロン株式会社 Support equipment, control systems, and development support programs
WO2019229845A1 (en) * 2018-05-29 2019-12-05 三菱電機株式会社 Program management system, programming assistance device, program management method, and programming assistance program
WO2022254928A1 (en) * 2021-05-31 2022-12-08 オムロン株式会社 Control device, control system, and program managing control program updates
JP7456557B1 (en) 2022-12-19 2024-03-27 三菱電機株式会社 Drawing support program, drawing support method, drawing support device, and drawing support system

Also Published As

Publication number Publication date
JP5957936B2 (en) 2016-07-27

Similar Documents

Publication Publication Date Title
JP5957936B2 (en) Programmable controller system, its support device, program
JP4865634B2 (en) Program editing support apparatus, computer program, program editing support method, and PLC system
JP5095013B2 (en) Programmable controller system and development system
US20030051235A1 (en) Method and apparatus for verifying and analyzing computer software installation
US9027014B2 (en) Updating firmware compatibility data
CN105389187B (en) System updating method
CN109814873B (en) Code publishing method and device
JP6520241B2 (en) Control system, its management server device, support device
JP2016001376A (en) Programmable controller system, and support device of the same
EP3734445A1 (en) Secure and reliable remote update of a control device in an elevator
JP6205934B2 (en) Programmable controller system, its support device, program
JP6541902B1 (en) Program management system, programming support apparatus, program management method, and programming support program
JP4621709B2 (en) Version management system and program version management method
JP6025165B2 (en) Update system for control program of semiconductor manufacturing equipment
JP6455096B2 (en) Control system, its support device, programmable control device
JP4490084B2 (en) Program creation method in program development system
JP3741581B2 (en) Distributed system
JP5428050B2 (en) Computer system and module execution method
CN115544521B (en) Method and device for generating checksum of offline installation file
JP5441198B2 (en) Program version synchronization system and method, program version synchronization apparatus and program
JP2009098963A (en) Automatic module generation system
CN115495150A (en) Code migration method and device, electronic equipment and storage medium
JP2008234466A (en) Information processor, version management method, and version management program
Mantion et al. Modernisation of the Toolchain and Continuous Integration of Front-End Computer Software at CERN
JP2003345592A (en) Software product managing system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150114

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151117

RD12 Notification of acceptance of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7432

Effective date: 20151204

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20151204

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151229

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160606

R150 Certificate of patent or registration of utility model

Ref document number: 5957936

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250