JP4278580B2 - Program change method, programmable controller, and program editing apparatus. - Google Patents
Program change method, programmable controller, and program editing apparatus. Download PDFInfo
- Publication number
- JP4278580B2 JP4278580B2 JP2004210348A JP2004210348A JP4278580B2 JP 4278580 B2 JP4278580 B2 JP 4278580B2 JP 2004210348 A JP2004210348 A JP 2004210348A JP 2004210348 A JP2004210348 A JP 2004210348A JP 4278580 B2 JP4278580 B2 JP 4278580B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- change
- information
- circuit
- sequence program
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Programmable Controllers (AREA)
Description
本発明は、プログラマブルコントローラのプログラム変更方法、プログラマブルコントローラおよびプログラム編集装置に関するものである。 The present invention relates to a program change method for a programmable controller, a programmable controller, and a program editing apparatus.
プログラマブルコントローラのシーケンスプログラムを変更する際、変更する回路の存在する先頭アドレス、変更前の回路サイズ、変更後の回路サイズ、変更後の回路に関する情報などが必要となる。 When the sequence program of the programmable controller is changed, the start address where the circuit to be changed exists, the circuit size before the change, the circuit size after the change, information on the circuit after the change, and the like are required.
従来、ロジックをまとめた部品回路であるファンクションブロック(FB(Function Block))を使用せずにシーケンスプログラムの変更を行なっていた。この場合、変更する回路はそれぞれ回路の内容が異なるため、変更する回路毎に回路の変更位置の先頭アドレスや、変更前の回路サイズ、変更後の回路サイズ、変更後の回路などの回路変更に関する情報をプログラマブルコントローラに書き込み、シーケンスプログラムを変更する必要がある。 Conventionally, a sequence program is changed without using a function block (FB (Function Block)) which is a component circuit in which logics are grouped. In this case, since the circuit contents to be changed are different from each other, the start address of the circuit change position for each circuit to be changed, the circuit size before the change, the circuit size after the change, the circuit change such as the circuit after the change, etc. It is necessary to write information to the programmable controller and change the sequence program.
特許文献1に記載の、プログラマブルコントローラのプログラム変更方法では、同時に変更すべき複数のモジュールを一旦プログラムメモリ上の空き領域に作成しておき、操作者の指令に基づいて一括活性化させることとしている。この活性化は実行モジュールの先頭番地などを保持しているディレクトリを書き換えることによって行なわれ、バッファメモリ内の複数のモジュールが活性化されると同時にそれまで有効だった対応するモジュールを無効化している。
In the program change method of the programmable controller described in
上記従来の技術によれば、複数のモジュールをオンラインで同時に変更可能することは可能となるが、変更するモジュールが複数箇所ある場合、この変更するモジュールが同一のものであっても、モジュール毎にモジュール変更に関する情報を、プログラマブルコントローラに書き込む必要がある。このため、プログラマブルコントローラに書き込むモジュール変更に関する情報の情報量が増大し、モジュール変更に関する情報の書込み時間に長時間を要するとともに、モジュール変更に関する情報を書き込むために多くのメモリ容量が必要になるといった問題があった。 According to the above conventional technique, it is possible to change a plurality of modules simultaneously online, but when there are a plurality of modules to be changed, even if the modules to be changed are the same, each module is changed. Information about module changes needs to be written to the programmable controller. For this reason, the amount of information related to the module change to be written to the programmable controller increases, it takes a long time to write the information related to the module change, and a large amount of memory capacity is required to write the information related to the module change. was there.
本発明は、上記に鑑みてなされたものであって、プログラム変更時にプログラマブルコントローラへ書き込む情報量が少ないプログラム変更方法、プログラマブルコントローラおよびプログラム編集装置を得ることを目的とする。 The present invention has been made in view of the above, and an object of the present invention is to obtain a program change method, a programmable controller, and a program editing device that require a small amount of information to be written to the programmable controller when the program is changed.
上述した課題を解決し、目的を達成するために、本発明は、同一の機能ブロック回路を複数有するシーケンスプログラムを備えたプログラマブルコントローラの前記シーケンスプログラムのプログラム変更方法において、前記プログラマブルコントローラと接続された外部装置から、前記シーケンスプログラムを変更するためのプログラム変更情報を送信するプログラム送信ステップと、前記外部装置から送信された前記プログラム変更情報を前記プログラマブルコントローラが記憶するプログラム記憶ステップと、記憶した前記プログラム変更情報に基づいて、前記プログラマブルコントローラのシーケンスプログラムの変更を行なうプログラム変更ステップと、を含み、前記プログラム変更情報は、変更される機能ブロック回路に関する情報および前記シーケンスプログラム内で前記変更される機能ブロック回路を格納する複数のアドレスに関する情報を有することを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention is connected to the programmable controller in the program change method of the sequence program of a programmable controller having a sequence program having a plurality of the same functional block circuits. A program transmission step for transmitting program change information for changing the sequence program from an external device, a program storage step for storing the program change information transmitted from the external device by the programmable controller, and the stored program A program change step for changing the sequence program of the programmable controller based on the change information, the program change information relates to a functional block circuit to be changed Characterized in that it has information about a plurality of addresses for storing the functional block circuits the change in distribution and in the sequence program.
この発明によれば、シーケンスプログラムを変更するためのプログラム変更情報は、同一の機能ブロック回路を複数箇所で変更する場合であっても、この同一の機能ブロック回路に関する回路変更情報は1つであるため、外部装置からプログラマブルコントローラへ書き込む情報量を小さくすることが可能となる。 According to the present invention, the program change information for changing the sequence program has only one circuit change information regarding the same functional block circuit even when the same functional block circuit is changed at a plurality of locations. Therefore, the amount of information written from the external device to the programmable controller can be reduced.
この発明によれば、外部装置からプログラマブルコントローラへ書き込む情報量を小さくすることが可能となるので、外部装置からプログラマブルコントローラにシーケンスプログラムを変更するためのプログラム変更情報を書き込む時間が短くなるとともに、プログラム変更情報を格納するメモリのサイズを小さくすることが可能になるという効果を奏する。 According to the present invention, since it is possible to reduce the amount of information written from the external device to the programmable controller, the time for writing the program change information for changing the sequence program from the external device to the programmable controller is shortened, and the program There is an effect that the size of the memory for storing the change information can be reduced.
以下に、本発明にかかるプログラム変更方法、プログラマブルコントローラおよびプログラム編集装置の実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。 Embodiments of a program changing method, a programmable controller, and a program editing apparatus according to the present invention will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.
実施の形態
図1は、本発明の実施の形態に係るプログラム変更システムの構成を示す図である。プログラム変更システムは、プログラマブルコントローラ10、シーケンスプログラム編集装置20からなり、プログラマブルコントローラ10とシーケンスプログラム編集装置20は通信手段40によって接続されている。プログラマブルコントローラ10は、演算装置(プログラム変更部)11、メモリ部(プログラム記憶部)30、編集装置用I/F部(情報受信部)15、デバイス情報用I/F部16からなる。
Embodiment FIG. 1 is a diagram showing a configuration of a program change system according to an embodiment of the present invention. The program change system includes a
編集装置用I/F部15は、シーケンスプログラム編集装置20で作成されたプログラム(後述するシーケンスプログラム70)やシーケンスプログラム70を変更する際のプログラム変更に関する情報(後述するプログラム変更情報50など)などを受信する通信インタフェースである。
The editing device I /
デバイス情報用I/F部16は、図示しない外部デバイスと情報の送受信を行なう通信インタフェースである。デバイス情報用I/F部16は、外部デバイスから外部デバイスの状態に関する情報として外部デバイスのスイッチのON/OFFなどの情報を受信する。
The device information I /
メモリ部30は、変更情報格納部12、シーケンスプログラム格納部13、デバイス記憶部14を備える。変更情報格納部12は、プログラム変更情報50を格納(記憶)するメモリである。シーケンスプログラム格納部13は、シーケンスプログラム編集装置20などで作成された、外部デバイスを制御するシーケンスプログラム70を格納するメモリである。デバイス記憶部14は、外部デバイスの状態に関する情報や演算装置11によるシーケンスプログラムの演算結果を記憶するデバイスメモリである。
The memory unit 30 includes a change
演算装置11は、シーケンスプログラム格納部13に格納されたシーケンスプログラムを実行する。演算装置11は、シーケンスプログラムの実行結果をデバイス記憶部14に設定し、設定した実行結果をデバイス情報用I/F部16を介して、外部デバイスに出力する。プログラマブルコントローラ10は、この演算装置11による処理を繰り返すことによって外部デバイスのシーケンス制御を行う。演算装置11は、変更情報格納部12に格納されたプログラム変更情報50に基づいてシーケンスプログラム格納部13に格納されたシーケンスプログラムの変更を行なう。この演算装置11によるプログラムの変更処理が特許請求の範囲に記載のプログラム変更部の処理に対応する。
The
シーケンスプログラム編集装置20は、シーケンスプログラム70などの作成や編集を行なう装置であり、例えばパーソナルコンピュータからなる。シーケンスプログラム編集装置20は、プログラム作成部21、変更情報作成部22、通信I/F部23を備える。
The sequence
プログラム作成部21は、プログラマブルコントローラ10が実行するシーケンスプログラム70の作成を行なう。変更情報作成部22は、シーケンスプログラム70を変更する際のプログラム変更情報50を作成する。通信I/F部23は、プログラマブルコントローラ10と情報の送受信を行う通信インタフェースである。通信I/F部23はプログラム作成部21で作成したシーケンスプログラムや変更情報作成部22で作成したプログラム変更情報50をプログラマブルコントローラ10に送信する。
The
通信手段40は、プログラマブルコントローラ10とシーケンスプログラム編集装置20間の情報の送受信を行う機能を備えている。通信手段40は、LAN(Local Area Network)やインターネット等の通信ネットワークであってもよいし、プログラマブルコントローラ10とシーケンスプログラム編集装置20を直接接続する構成としてもよい。
The communication means 40 has a function of transmitting and receiving information between the
つぎに、プログラム変更システムのプログラム変更の処理手順を説明する。図2は、シーケンスプログラムの変更の処理手順を示すフローチャートである。シーケンスプログラム編集装置20のプログラム作成部21は、プログラマブルコントローラ10が実行するシーケンスプログラム70を作成し、通信I/F部23、通信手段40を介してプログラマブルコントローラ10にシーケンスプログラム70を送信する。
Next, a program change processing procedure of the program change system will be described. FIG. 2 is a flowchart showing a processing procedure for changing the sequence program. The
プログラマブルコントローラ10は、シーケンスプログラム格納部13にこのシーケンスプログラム(変更前のシーケンスプログラム)70を記憶するとともに、このシーケンスプログラム70に基づいて動作する。この後、シーケンスプログラム70を変更する必要が生じると、シーケンスプログラム編集装置20のプログラム作成部21で新たなシーケンスプログラム70を作成する。そして、変更情報作成部22は変更前のシーケンスプログラムと新たなシーケンスプログラムに基づいてプログラム変更情報50を作成する。
The
シーケンスプログラム編集装置20の通信I/F部23は、プログラマブルコントローラ10のシーケンスプログラムを変更するためのプログラム変更情報50を、通信手段40を介してプログラマブルコントローラ10に送信する。
The communication I / F unit 23 of the sequence
図3は、シーケンスプログラムの一例を示す図である。図3に示すように、シーケンスプログラム70は複数のプログラムからなる。シーケンスプログラム70において、アドレスA〜アドレス(A+1)とアドレスB〜アドレス(B+1)には同じ回路が格納されている。ここでは、アドレスA〜アドレス(A+1)とアドレスB〜アドレス(B+1)に格納されている回路が、「LD M0、OUT M2」である場合を示している。この回路において、LDは接点入力命令を示し、OUTはコイル出力命令を示し、Mは内部デバイスの種類を示している。この回路は、「M0デバイスがONの時にM2デバイスをONにし、M0デバイスがOFF時にM2デバイスをOFFにせよ」といった内容のシーケンスプログラムの回路である。 FIG. 3 is a diagram illustrating an example of a sequence program. As shown in FIG. 3, the sequence program 70 includes a plurality of programs. In the sequence program 70, the same circuit is stored in address A to address (A + 1) and address B to address (B + 1). Here, a case is shown in which the circuits stored in address A to address (A + 1) and address B to address (B + 1) are “LD M0, OUT M2”. In this circuit, LD indicates a contact input command, OUT indicates a coil output command, and M indicates the type of internal device. This circuit is a circuit of a sequence program with a content such as “M2 device is turned on when M0 device is on, and M2 device is turned off when M0 device is off”.
シーケンスプログラム編集装置20からのプログラム変更情報50は、プログラマブルコントローラ10の編集装置用I/F部15を介して変更情報格納部12に書き込まれる(ステップS100)。
Program change information 50 from the sequence
ここで、プログラム変更情報50の構成について説明する。図4−1は、実施の形態に係るプログラム変更情報の構成を示す図である。ここでは、図3に示したシーケンスプログラム70のアドレスA〜アドレス(A+1)とアドレスB〜アドレス(B+1)の回路を「LD M1、OUT M2」に変更する場合のプログラム変更情報50を示している。本実施の形態においては、アドレスA〜アドレス(A+1)とアドレスB〜アドレス(B+1)に格納される同一の回路をまとめて変更する。 Here, the configuration of the program change information 50 will be described. FIG. 4A is a diagram of a configuration of program change information according to the embodiment. Here, program change information 50 in the case where the circuits of address A to address (A + 1) and address B to address (B + 1) of the sequence program 70 shown in FIG. 3 are changed to “LD M1, OUT M2” is shown. . In the present embodiment, the same circuits stored in address A to address (A + 1) and address B to address (B + 1) are collectively changed.
プログラム変更情報50は、変更回路数、回路変更情報51(変換前回路サイズ、変更後回路サイズ、変更後回路)、変更回路数分の先頭アドレスで構成されている。変更回路数は、シーケンスプログラム内において変更される回路の数を示す。ここでは、システムプログラム内において変更される回路の数が2つ(アドレスA〜アドレス(A+1)とアドレスB〜アドレス(B+1))であるため変更回路数として「2」を示している。 The program change information 50 includes the number of changed circuits, circuit change information 51 (pre-conversion circuit size, post-change circuit size, post-change circuit), and head addresses corresponding to the number of changed circuits. The number of changed circuits indicates the number of circuits to be changed in the sequence program. Here, since the number of circuits to be changed in the system program is two (address A to address (A + 1) and address B to address (B + 1)), “2” is shown as the number of changed circuits.
変換前回路サイズは、シーケンスプログラム内において変更される回路(変更前回路)がシーケンスプログラム格納部13や変更情報格納部12において使用しているメモリのサイズを示している。ここでは、変更前回路のサイズが「2」(バイト)である場合を示している。
The pre-conversion circuit size indicates the size of the memory used in the sequence
変更後回路サイズは、シーケンスプログラム内において変更する回路(変更後回路)がシーケンスプログラム格納部13や変更情報格納部12において使用しているメモリサイズを示している。ここでは、変更前回路のサイズが「2」(バイト)である場合を示している。本実施の形態では、LD命令、OUT命令が、それぞれメモリサイズ1バイト必要であるものとして変更前回路のサイズ、変更後回路のサイズを2バイトと記述している。
The post-change circuit size indicates the memory size used in the sequence
変更後回路はシーケンスプログラム70の変更後の回路であり、ここでは、アドレスA〜アドレス(A+1)とアドレスB〜アドレス(B+1)に格納されている回路が同一であるため、アドレスA〜アドレス(A+1)とアドレスB〜アドレス(B+1)に格納されている回路は同一の回路「LD M1、OUT M2」によって変更される。先頭アドレスは、変更される回路の先頭のアドレスを示している。ここでは、変更される回路「LD M0、OUT M2」の先頭アドレスAと先頭アドレスBを示している。 The post-change circuit is a circuit after the change of the sequence program 70. Here, since the circuits stored in the address A to the address (A + 1) and the address B to the address (B + 1) are the same, the address A to the address ( A + 1) and the circuits stored at address B to address (B + 1) are changed by the same circuit “LD M1, OUT M2.” The start address indicates the start address of the circuit to be changed. Here, the start address A and the start address B of the circuit “LD M0, OUT M2” to be changed are shown.
ここで、本実施の形態における変更情報と従来用いられていた変更情報の構成の差異を明確にするため、従来用いられていた変更情報の構成について説明する。図4−2は、変更回路数分の回路変更情報を有するプログラム変更情報の構成を示す図であり、従来用いられていたプログラム変更情報の構成を示している。 Here, in order to clarify the difference between the configuration of the change information in the present embodiment and the conventionally used change information, the configuration of the conventionally used change information will be described. FIG. 4B is a diagram illustrating a configuration of program change information having circuit change information for the number of changed circuits, and illustrates a configuration of program change information that has been conventionally used.
図4−2に示すように、従来のプログラム変更情報60は、変更回路数、変更回路数分の回路変更情報61A,61B、変更回路数分の先頭アドレスで構成されている。ここでは、変更回路数は「2」である。そして、1つめの回路の変更に関する情報として先頭アドレスと回路変更情報61Aが含まれ、2つめの回路の変更に関する情報として先頭アドレスと回路変更情報61Bが含まれている。 As shown in FIG. 4B, the conventional program change information 60 includes the number of changed circuits, circuit change information 61A and 61B corresponding to the number of changed circuits, and a head address corresponding to the number of changed circuits. Here, the number of changed circuits is “2”. The first address and circuit change information 61A are included as information related to the change of the first circuit, and the start address and circuit change information 61B are included as information related to the change of the second circuit.
1つめの回路の回路変更情報61Aは、先頭アドレス(A)、変更前回路サイズ(「2」)、変更後回路サイズ(「2」)、変更後回路(「LD M1、OUT M2」)を含んでいる。 The circuit change information 61A of the first circuit includes the start address (A), the pre-change circuit size (“2”), the post-change circuit size (“2”), and the post-change circuit (“LD M1, OUT M2”). Contains.
2つめの回路の回路変更情報61Bは、先頭アドレス(B)、変更前回路サイズ(「2」)、変更後回路サイズ(「2」)、変更後回路(「LD M1、OUT M2」)を含んでいる。 The circuit change information 61B of the second circuit includes the start address (B), the pre-change circuit size (“2”), the post-change circuit size (“2”), and the post-change circuit (“LD M1, OUT M2”). Contains.
このように、従来のプログラム変更情報60は、同一の回路を複数箇所で変更する場合、変更回路数分の回路変更情報が必要であった。一方、図4−1に示した本実施の形態に係るプログラム変更情報50は、同一の回路を複数箇所で変更する場合、この同一の回路に対する回路変更情報は1つである。これにより、シーケンスプログラム編集装置20からプログラマブルコントローラ10へ書き込む情報を小さくすることが可能となる。
Thus, the conventional program change information 60 requires circuit change information for the number of changed circuits when the same circuit is changed at a plurality of locations. On the other hand, the program change information 50 according to the present embodiment shown in FIG. 4A has one circuit change information for the same circuit when the same circuit is changed at a plurality of locations. Thereby, the information written from the sequence
シーケンスプログラム編集装置20からのプログラム変更情報50が、プログラマブルコントローラ10の変更情報格納部12に書き込まれると、演算装置11はプログラム変更情報50に基づいてシーケンスプログラム格納部13のシーケンスプログラム70を変更する(ステップS110)。
When the program change information 50 from the sequence
図5は、シーケンスプログラムの設定変更の処理手順を示すフローチャートである。シーケンスプログラム格納部13のシーケンスプログラム70を変更するため、演算装置11は変更情報格納部12に書き込まれたプログラム変更情報50から変更を行なう回路を抽出する。例えば、図3に示した「LD M0、OUT M2」の回路を変更する場合、先頭アドレスAに対応する「LD M0、OUT M2」の回路、先頭アドレスBに対応する「LD M0、OUT M2」の回路の2つの回路を抽出する。そして、抽出した変更回路に対して順番に回路の変更処理を行う(変更処理を繰り返す)。ここでは、n(nは自然数)個目の回路の設定変更処理を行う際に参照する先頭アドレス情報を先頭アドレスnとして説明する。回路の変更処理に際し、まず演算装置11は変更回路数分の処理が全て完了したか否かを確認する(ステップS200)。
FIG. 5 is a flowchart showing a procedure for changing the setting of the sequence program. In order to change the sequence program 70 of the sequence
演算装置11は変更回路数分の処理が完了していないと判断すると、n回目の設定変更処理(ループ処理)を開始する。まず、n個目の変更回路に対して変更前回路サイズと変更後回路サイズを比較し、変更前回路サイズが変更後回路サイズより小さいか否か(変更前回路サイズ<変更後回路サイズ)を判断する(ステップS210)。ここでの、変更前回路サイズと変更後回路サイズは、プログラム変更情報50の回路変更情報51から抽出し比較される。
If the
演算装置11によって、変更前回路サイズが変更後回路サイズより小さくないと判断されると(ステップS210、No)、変更前回路サイズが変更後回路サイズより大きいか否か(変更前回路サイズ>変更後回路サイズ)を判断する(ステップS220)。
If the
変更前回路サイズと変更後回路サイズが同じサイズである場合(変更前回路サイズが変更後回路サイズより大きくない場合)(ステップS220、No)、回路変更情報51から変更後回路を抽出し、シーケンスプログラム格納部13上のシーケンスプログラムの先頭アドレスnの位置にこの変更後回路の回路をコピーする(ステップS230)。この後、次の回路の設定変更処理を行うためにステップS200の処理を行なう。 When the circuit size before change and the circuit size after change are the same size (when the circuit size before change is not larger than the circuit size after change) (step S220, No), the circuit after change is extracted from the circuit change information 51, and the sequence The changed circuit is copied to the position of the start address n of the sequence program on the program storage unit 13 (step S230). Thereafter, the process of step S200 is performed in order to perform a setting change process of the next circuit.
演算装置11によって、変更前回路サイズが変更後回路サイズより大きいと判断された場合(ステップS220、Yes)、シーケンスプログラム格納部13上のシーケンスプログラムの先頭アドレスnの位置に変更後回路の回路をコピーする(ステップS240)。そして、ステップS240においてコピーした回路に連続して次のプログラムが配置されるよう、シーケンスプログラム格納部13上において、「先頭アドレスn+変更前回路サイズ」のアドレス位置からプログラムの最終位置までのプログラム(データ)全体を「先頭アドレスn+変更後回路サイズ」のアドレス位置に移動させる(ステップS250)。換言すると、「先頭アドレスn+変更前回路サイズ」のアドレス位置からプログラムの最終位置までのプログラム全体が、「先頭アドレスn+変更後回路サイズ」分だけ移動する。
When the
「先頭アドレスn+変更前回路サイズ」のアドレス位置からプログラムの最終位置までのプログラム全体を移動させたことによって、変更処理が済んでいない回路の回路変更情報の先頭アドレスがずれる。変更処理が済んでいない回路の回路変更情報の先頭アドレスを修正するため、変更処理が済んでいない回路に対して順番に先頭アドレスの修正処理を行なう(修正処理を繰り返す)。すなわち、まず演算装置11は修正処理の必要な回路数分のアドレス修正処理が全て完了したか否かを確認する(ステップS260)。ここでは、m(mは自然数)個目の回路のアドレス修正処理を行う際に参照する先頭アドレス情報を先頭アドレスmとして説明する。
By moving the entire program from the address position of “start address n + circuit size before change” to the final position of the program, the start address of the circuit change information of the circuit that has not been changed is shifted. In order to correct the start address of the circuit change information of the circuit that has not been changed, the start address is corrected in order for the circuits that have not been changed (the correction process is repeated). That is, first, the
演算装置11は修正処理の必要な回路数分のアドレス修正処理が全て完了していないと判断すると、m個目のアドレス修正処理(ループ処理)を開始する。アドレス修正処理に際し、まず演算装置11が先頭アドレスmの値が先頭アドレスnの値より大きいか否か(先頭アドレスm>先頭アドレスn)を確認する(ステップS270)。
When the
演算装置11が先頭アドレスmの値が先頭アドレスnの値より大きくないと判断した場合(ステップS270、No)は、先頭アドレスmの修正をする必要がないためアドレス修正処理を行なわない。この場合は、次の回路の先頭アドレス(m+1)のアドレス修正処理を行うためにステップS260の処理を行なう。
When the
演算装置11が先頭アドレスmの値が先頭アドレスnの値より大きいと判断すると(ステップS270、Yes)、ステップS250の処理でプログラムを移動させた分だけ、先頭アドレスmの値を修正するため、先頭アドレスmの値に「変更後回路サイズ−変更前回路サイズ」の値を加える。そして、次の回路の先頭アドレス(m+1)のアドレス修正処理を行うためにステップS260の処理を行なう。
When the
ステップS260において、演算装置11が修正処理の必要な回路数分のアドレス修正処理が全て完了したと判断するまで、ステップS270とステップS280の処理を繰り返す(処理中のn個目の回路変更情報の次(n+1個目)の回路変更情報から最後の回路変更情報までループする)。
In step S260, the processing of step S270 and step S280 is repeated until the
ステップS260において、演算装置11が修正処理の必要な回路数分のアドレス修正処理が全て完了したと判断すると、次の回路の設定変更処理を行うためにステップS200の処理を行なう。
In step S260, when the
演算装置11によって、変更前回路サイズが変更後回路サイズより大きくないと判断された場合(ステップS210、Yes)、シーケンスプログラム格納部13上において、「先頭アドレスn+変更前回路サイズ」のアドレス位置からプログラムの最終位置までのプログラム全体を「先頭アドレスn+変更後回路サイズ」のアドレス位置に移動させる(ステップS290)。そして、シーケンスプログラム格納部13上のシーケンスプログラムの先頭アドレスnの位置に変更後回路の回路をコピーする(ステップS300)。
When the
この後、ステップS260〜ステップS280の処理を行なう。すなわち、演算装置11は修正処理の必要な回路数分のアドレス修正処理が全て完了したか否かを確認し(ステップS260)、修正処理の必要な回路数分のアドレス修正処理が全て完了していないと判断すると、m個目の回路のアドレス修正処理を行なう。アドレス修正処理に際し、まず演算装置11が先頭アドレスmの値が先頭アドレスnの値より大きいか否かを確認する(ステップS270)。
Thereafter, the processes in steps S260 to S280 are performed. That is, the
演算装置11が先頭アドレスmの値が先頭アドレスnの値より大きくないと判断した場合は(ステップS270、No)、先頭アドレスmの修正をする必要がないためアドレス修正処理を行なわない。
When the
演算装置11が先頭アドレスmの値が先頭アドレスnの値より大きいと判断すると(ステップS270、Yes)、ステップ300の処理でプログラムを移動させた分だけ先頭アドレスmの値を修正するため、先頭アドレスmの値に「変更後回路サイズ−変更前回路サイズ」の値を加える。ここでは、変更前回路サイズが変更後回路サイズより小さいため、「変更後回路サイズ−変更前回路サイズ」の値は負の値となる。
If the
そして、ステップS260において演算装置11が修正処理の必要な回路数分のアドレス修正処理が全て完了したと判断するまで、ステップS270とステップS280の処理を繰り返す。
Then, in step S260, the processing of step S270 and step S280 is repeated until it is determined that the
ステップS260において演算装置11が修正処理の必要な回路数分のアドレス修正処理が全て完了したと判断すると次の回路の設定変更処理を行うためにステップS200の処理を行なう。
If the
ステップS200において、演算装置11が抽出した変更回路に対して変更処理が全て完了したと判断するまで、ステップS210〜ステップS300の処理を繰り返す。ステップS200において、演算装置11が変更処理の必要な回路数分の変更処理が全て完了したと判断するとプログラムの設定変更処理を終了する。
In step S <b> 200, the processes in steps S <b> 210 to S <b> 300 are repeated until it is determined that all the change processes have been completed for the change circuit extracted by the
このように、プログラム変更情報50は、同一の回路を複数箇所で変更する場合であっても、この同一の回路に対する回路変更情報51は1つであるため、シーケンスプログラム編集装置20からプログラマブルコントローラ10へ書き込む情報を小さくすることが可能となる。 As described above, the program change information 50 includes a single circuit change information 51 for the same circuit even when the same circuit is changed at a plurality of locations. It is possible to reduce the information to be written to.
このように実施の形態によれば、シーケンスプログラム編集装置20からプログラマブルコントローラ10へ書き込む情報量を小さくすることが可能となるので、シーケンスプログラム編集装置20から変更情報格納部12にプログラム変更情報50を書き込む時間が短くなるとともに、変更情報格納部12のメモリサイズを小さくすることが可能となる。
Thus, according to the embodiment, it is possible to reduce the amount of information written from the sequence
以上のように、本発明にかかるプログラム変更方法は、プログラマブルコントローラのシーケンスプログラムの変更に適している。 As described above, the program changing method according to the present invention is suitable for changing the sequence program of the programmable controller.
10 プログラマブルコントローラ
11 演算装置
12 変更情報格納部
13 シーケンスプログラム格納部
14 デバイス記憶部
15 編集装置用I/F部
16 デバイス情報用I/F部
20 シーケンスプログラム編集装置
21 プログラム作成部
22 変更情報作成部
23 通信I/F部
30 メモリ部
40 通信手段
50,60 プログラム変更情報
51,61A,61B 回路変更情報
70 シーケンスプログラム
DESCRIPTION OF
Claims (4)
前記プログラマブルコントローラと接続された外部装置から、前記シーケンスプログラムを変更するためのプログラム変更情報を送信するプログラム送信ステップと、
前記外部装置から送信された前記プログラム変更情報を前記プログラマブルコントローラが記憶するプログラム記憶ステップと、
記憶した前記プログラム変更情報に基づいて、前記プログラマブルコントローラのシーケンスプログラムの変更を行なうプログラム変更ステップと、
を含み、
前記プログラム変更情報は、変更される機能ブロック回路に関する情報および前記シーケンスプログラム内で前記変更される機能ブロック回路を格納する複数のアドレスに関する情報を有することを特徴とするプログラム変更方法。 In the program change method of the sequence program of the programmable controller provided with a sequence program having a plurality of the same functional block circuits,
A program transmission step for transmitting program change information for changing the sequence program from an external device connected to the programmable controller;
A program storage step in which the programmable controller stores the program change information transmitted from the external device;
A program change step for changing the sequence program of the programmable controller based on the stored program change information;
Including
The program change method includes information on a function block circuit to be changed and information on a plurality of addresses for storing the function block circuit to be changed in the sequence program.
シーケンスプログラムの編集を行なう外部装置から、前記シーケンスプログラムを変更するためのプログラム変更情報を受信する情報受信部と、
前記外部装置から受信した前記プログラム変更情報を記憶するプログラム記憶部と、
記憶した前記プログラム変更情報に基づいて、前記シーケンスプログラムの変更を行なうプログラム変更部と、
を備え、
前記プログラム変更情報は、変更される機能ブロック回路に関する情報および前記シーケンスプログラム内で前記変更される機能ブロック回路を格納する複数のアドレスに関する情報を有することを特徴とするプログラマブルコントローラ。 In a programmable controller that executes a sequence program having a plurality of the same functional block circuits,
An information receiving unit for receiving program change information for changing the sequence program from an external device that edits the sequence program;
A program storage unit for storing the program change information received from the external device;
A program change unit for changing the sequence program based on the stored program change information;
With
The program change information includes information on a function block circuit to be changed and information on a plurality of addresses storing the function block circuit to be changed in the sequence program.
前記プログラマブルコントローラのシーケンスプログラムを変更するための情報をプログラム変更情報として作成する変更情報作成部を備え、
前記シーケンスプログラムは同一の機能ブロック回路を複数有し、かつ前記プログラム変更情報は変更される機能ブロック回路に関する情報および前記シーケンスプログラム内で前記変更される機能ブロック回路を格納する複数のアドレスに関する情報を有することを特徴とするプログラム編集装置。
In a program editing device for editing a sequence program executed by a programmable controller,
A change information creating unit that creates information for changing the sequence program of the programmable controller as program change information,
The sequence program has a plurality of the same function block circuits, and the program change information includes information on the function block circuits to be changed and information on a plurality of addresses storing the function block circuits to be changed in the sequence program. A program editing apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004210348A JP4278580B2 (en) | 2004-07-16 | 2004-07-16 | Program change method, programmable controller, and program editing apparatus. |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004210348A JP4278580B2 (en) | 2004-07-16 | 2004-07-16 | Program change method, programmable controller, and program editing apparatus. |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006031462A JP2006031462A (en) | 2006-02-02 |
JP4278580B2 true JP4278580B2 (en) | 2009-06-17 |
Family
ID=35897717
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004210348A Expired - Fee Related JP4278580B2 (en) | 2004-07-16 | 2004-07-16 | Program change method, programmable controller, and program editing apparatus. |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4278580B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103180789B (en) * | 2010-10-27 | 2016-03-02 | 三菱电机株式会社 | Daily record setting device, daily record establishing method |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04175902A (en) * | 1990-11-09 | 1992-06-23 | Fuji Electric Co Ltd | Programmable controller system |
JPH04367029A (en) * | 1991-06-14 | 1992-12-18 | Fuji Electric Co Ltd | Programming device for programmable controller |
JPH05224707A (en) * | 1992-02-13 | 1993-09-03 | Yaskawa Electric Corp | Program changing method for programmable controller |
JPH09160611A (en) * | 1995-12-05 | 1997-06-20 | Hitachi Ltd | Programmable controller |
JP2000181696A (en) * | 1998-12-15 | 2000-06-30 | Mitsubishi Electric Corp | Program controller and program controlling method |
JP2001142510A (en) * | 1999-11-11 | 2001-05-25 | Omron Corp | Controller system, programming tool and controller |
-
2004
- 2004-07-16 JP JP2004210348A patent/JP4278580B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2006031462A (en) | 2006-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2006059217A (en) | Software memory image generation apparatus and built-in device software update system and program | |
JP4278580B2 (en) | Program change method, programmable controller, and program editing apparatus. | |
JPH09282169A (en) | Input/output data managing system | |
CN110442074B (en) | Processing device for programmable logic controller program | |
JP2008060714A (en) | Information processing system | |
KR101805866B1 (en) | Electronic apparatus for software defined radio and scheduling method therefor | |
JP5045036B2 (en) | Data processing device | |
JP2013125288A (en) | Data processing device and data processing method | |
JPH08307246A (en) | Method for configuring integrated circuit device and logic circuit | |
JP4362777B2 (en) | Programming device, symbol automatic registration method, program, and recording medium | |
JP4072504B2 (en) | Program rewriting method and system | |
JPH0969043A (en) | Microcomputer built-in control unit | |
JP3114907B2 (en) | How to change the sequence program of the programmable controller | |
JP2004151762A (en) | Programmable controller | |
JPH04104345A (en) | Write control system for partial rewrite data of main storage device with ecc mechanism | |
JPH03160524A (en) | Information processor | |
JP2007328437A (en) | Boot method and digital control for digital controller | |
JPS62163142A (en) | Apparatus for correcting computer program | |
JPH05290589A (en) | Semiconductor integrated circuit | |
JP2008015792A (en) | Rom patch processing method and rom patch device | |
JP2014146914A (en) | Network device, method for controlling network device, and control program for network device | |
JPH08174926A (en) | Printer | |
JPS6349839A (en) | Leading system for electronic computer system | |
JP2005038180A (en) | Program starting method, program starting program, and computer-readable storage medium | |
JPH06324893A (en) | Memory check method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061110 |
|
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: 20090310 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090312 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090310 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120319 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120319 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130319 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130319 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140319 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |