JPH0991011A - Load distributing device and its method - Google Patents

Load distributing device and its method

Info

Publication number
JPH0991011A
JPH0991011A JP24751795A JP24751795A JPH0991011A JP H0991011 A JPH0991011 A JP H0991011A JP 24751795 A JP24751795 A JP 24751795A JP 24751795 A JP24751795 A JP 24751795A JP H0991011 A JPH0991011 A JP H0991011A
Authority
JP
Japan
Prior art keywords
processing
programmable controller
load
request
programmable
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
JP24751795A
Other languages
Japanese (ja)
Other versions
JP3368370B2 (en
Inventor
Hitoshi Ishikawa
仁 石川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP24751795A priority Critical patent/JP3368370B2/en
Publication of JPH0991011A publication Critical patent/JPH0991011A/en
Application granted granted Critical
Publication of JP3368370B2 publication Critical patent/JP3368370B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To automatically controlling the distribution of load of each programmable controller(PC) in accordance with the load state of each PC. SOLUTION: The PC system is constituted of connecting plural PCs 100-1 to 100-n through a network 200. Each of the PCs 100-1 to 100-n calculates its own load and requests another PC to execute at least a part of its own processing.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は、高速ネットワー
クを介して複数台のプログラマブルコントローラを接続
して構成したプログラマブルコントローラシステムにお
ける負荷分散装置および方法に関し、特に、各プログラ
マブルコントローラ自体がその負荷を自動的に判断して
負荷を各プログラマブルコントローラ間で分散して処理
の高効率化を図った負荷分散装置および方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a load balancing apparatus and method in a programmable controller system in which a plurality of programmable controllers are connected via a high speed network, and in particular, each programmable controller itself automatically manages its load. The present invention relates to a load distribution device and method for distributing a load among programmable controllers to improve processing efficiency.

【0002】[0002]

【従来の技術】最近、高速ネットワークを介して複数台
のプログラマブルコントローラを接続して構成したプロ
グラマブルコントローラシステムが提案されている。
2. Description of the Related Art Recently, there has been proposed a programmable controller system configured by connecting a plurality of programmable controllers via a high speed network.

【0003】すなわち、最近のFA(ファクトリオート
メーション)システムの多様化に対処するためには1台
のプログラマブルコントローラではその制御態様に限界
があるので、複数台のプログラマブルコントローラを高
速ネットワークを介して接続して、プログラマブルコン
トローラシステムを構築することにより、このプログラ
マブルコントローラシステムを利用して、効率の良いF
A(ファクトリオートメーション)システムを構築する
試みがなされている。
That is, in order to cope with the recent diversification of FA (factory automation) systems, one programmable controller has a limit in its control mode. Therefore, a plurality of programmable controllers are connected via a high speed network. By constructing a programmable controller system, the programmable controller system can be used to achieve an efficient F
Attempts have been made to build an A (Factory Automation) system.

【0004】[0004]

【発明が解決しようとする課題】しかし、一般に、従来
のプログラマブルコントローラにおいては、このプログ
ラマブルコントローラ本体と、このプログラマブルコン
トローラ本体に係わるセンサ、アクチュエータといった
物理的なリソースとの関係は一義的に決定されているの
が普通であり、そのため、上記のように、高速ネットワ
ークを介して複数台のプログラマブルコントローラを接
続してプログラマブルコントローラシステムを構築した
場合でも、各プログラマブルコントローラ本体と、この
プログラマブルコントローラ本体に係わるセンサ、アク
チュエータといった物理的なリソースとの関係は一義的
に決定され、たとえ、複数台のプログラマブルコントロ
ーラの中で負荷に余裕のあるプログラマブルコントロー
ラ間で負荷分散を行うシステムは存在しなかった。
However, generally, in the conventional programmable controller, the relationship between the programmable controller main body and physical resources such as sensors and actuators related to the programmable controller main body is uniquely determined. Therefore, even when a programmable controller system is constructed by connecting a plurality of programmable controllers via a high-speed network as described above, each programmable controller main body and the sensors related to this programmable controller main body are connected. , The relationship with physical resources such as actuators is uniquely determined, and even if multiple programmable controllers have a sufficient load, the load distribution can be distributed among the programmable controllers. Cormorants system did not exist.

【0005】そこで、この発明は、各プログラマブルコ
ントローラの負荷状態に応じて各プログラマブルコント
ローラの負荷を自動的に分散制御できるようようにした
プログラマブルコントローラシステムにおける負荷分散
装置および方法を提供することを目的とする。
Therefore, it is an object of the present invention to provide a load balancing apparatus and method in a programmable controller system that can automatically control the load of each programmable controller according to the load state of each programmable controller. To do.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するた
め、この発明の負荷分散装置は、ネットワークを介して
複数台のプログラマブルコントローラを接続して構成し
たプログラマブルコントローラシステムにおける負荷分
散装置において、上記各プログラマブルコントローラ
は、自己の負荷をそれぞれ算出する負荷算出手段と、上
記負荷算出手段により算出された負荷に対応して自己の
処理の少なくとも一部を他のプログラマブルコントロー
ラに依頼する処理依頼手段と、具備することを特徴とす
る。
In order to achieve the above object, the load balancing apparatus of the present invention is a load balancing apparatus in a programmable controller system configured by connecting a plurality of programmable controllers via a network. The programmable controller comprises: load calculating means for calculating its own load; and processing requesting means for requesting at least a part of its own processing to another programmable controller corresponding to the load calculated by the load calculating means. It is characterized by doing.

【0007】また、この発明の負荷分散方法は、ネット
ワークを介して複数台のプログラマブルコントローラを
接続して構成したプログラマブルコントローラシステム
における負荷分散方法において、上記各プログラマブル
コントローラは自己の負荷をそれぞれ算出し、該算出し
た負荷に対応して自己の処理の少なくとも一部を他のプ
ログラマブルコントローラに依頼する。
The load balancing method of the present invention is a load balancing method in a programmable controller system configured by connecting a plurality of programmable controllers via a network, wherein each programmable controller calculates its own load, The other programmable controller is requested to perform at least a part of its own processing corresponding to the calculated load.

【0008】また、この発明では、上記プログラマブル
コントローラは、分割可能なラダープログラムを実行
し、上記処理依頼手段は、分割された上記ラダープログ
ラムの一部の処理を他のプログラマブルコントローラに
依頼することを特徴とする。
Further, according to the present invention, the programmable controller executes a divisible ladder program, and the process requesting means requests another programmable controller to perform a part of the process of the divided ladder program. Characterize.

【0009】また、上記処理依頼手段は、上記ラダープ
ログラムの作成後で、かつシステムの非稼働時に上記処
理の依頼を行うことを特徴とする。
Further, the processing requesting means requests the processing after the ladder program is created and when the system is not operating.

【0010】また、上記処理依頼手段は、上記ラダープ
ログラムの作成後で、かつシステムの動作時に上記処理
の依頼を行うことを特徴とする。
The processing requesting means may request the processing after the ladder program is created and when the system is operating.

【0011】また、上記複数台のプログラマブルコント
ローラで共有され、各プログラマブルコントローラの命
令実行時間、全てのプログラマブルコントローラの平均
命令実行時間、負荷が最小のプログラマブルコントロー
ラ、を記憶する共有記憶手段を更に具備し、上記処理依
頼手段は、上記処理の依頼に際して、上記共有記憶手段
に記憶された負荷が最小のプログラマブルコントローラ
を処理依頼先プログラマブルコントローラとして選択す
ることを特徴とする。
Further, there is further provided a shared storage means which is shared by the plurality of programmable controllers and stores the instruction execution time of each programmable controller, the average instruction execution time of all programmable controllers, and the programmable controller with the minimum load. The processing request means selects the programmable controller with the minimum load stored in the shared storage means as the processing request destination programmable controller when requesting the processing.

【0012】また、上記処理依頼手段は、上記処理の依
頼に際して、上記共有記憶手段に記憶された各プログラ
マブルコントローラの命令実行時間を所定の順番で調
べ、最初に発見された上記平均命令実行時間より短い命
令実行時間のプログラマブルコントローラを処理依頼先
プログラマブルコントローラとして選択することを特徴
とする。
When requesting the processing, the processing requesting means checks the instruction execution time of each programmable controller stored in the shared storage means in a predetermined order, and based on the first found average instruction execution time. It is characterized in that a programmable controller having a short instruction execution time is selected as a process request destination programmable controller.

【0013】また、上記処理依頼手段は、上記処理の依
頼に際して、他の全てのプログラマブルコントローラに
対して処理依頼を行えるかどうかを問い合わせるメッセ
ージを発行し、処理依頼を行える旨のレスポンスが返送
されたプログラマブルコントローラを処理依頼先プログ
ラマブルコントローラとして選択することを特徴とす
る。
Further, when the processing request is made, the processing requesting means issues a message inquiring to all other programmable controllers whether or not the processing request can be made, and a response indicating that the processing request can be made is returned. It is characterized in that the programmable controller is selected as the programmable controller to which the process is requested.

【0014】また、上記処理依頼手段は、自己の処理の
少なくとも一部を他のプログラマブルコントローラに依
頼するに際して生じるオーバヘッドが最小になる処理を
選択して上記他のプログラマブルコントローラに依頼す
ることを特徴とする。
Further, the processing requesting means selects the processing which minimizes the overhead generated when requesting at least a part of its own processing to another programmable controller and requests it to the other programmable controller. To do.

【0015】また、上記処理依頼手段は、上記処理依頼
に際して上記プログラマブルコントローラで新たに共有
する必要が生じるデータが最小の処理を選択することを
特徴とする。
Further, the processing requesting means selects a processing which requires a minimum amount of data to be newly shared by the programmable controller when the processing is requested.

【0016】また、上記処理依頼手段は、自己の処理の
少なくとも一部を他のプログラマブルコントローラに依
頼するに際して該処理の依頼に係わる入力および出力を
記述するプログラムコードを書換えるプログラムコード
書換手段を具備することを特徴とする。
Further, the processing requesting means comprises a program code rewriting means for rewriting a program code describing an input and an output relating to the request of the processing when requesting at least a part of its own processing to another programmable controller. It is characterized by doing.

【0017】また、上記各プログラマブルコントローラ
は、上記分割された処理単位でのラダープログラムを管
理するプログラム状態テーブルを具備し、上記複数台の
プログラマブルコントローラは、上記複数台のプログラ
マブルコントローラで共有するデータを管理する共有デ
ータテーブルを具備し、各プログラマブルコントローラ
における実際の処理は上記プログラム状態テーブルを参
照して実行し、上記処理の依頼は上記共有データテーブ
ルを参照して実行することを特徴とする。
Further, each of the programmable controllers includes a program status table for managing a ladder program in the divided processing units, and the plurality of programmable controllers store data shared by the plurality of programmable controllers. It is characterized in that it has a shared data table to be managed, and actual processing in each programmable controller is executed by referring to the program status table, and the request for the processing is executed by referring to the shared data table.

【0018】また、上記プログラム状態テーブルは、各
処理単位で各処理を識別するための識別情報、各処理単
位に対して、該処理単位が実行中であるか、該処理単位
が他のプログラマブルコントローラに対して依頼中であ
るか、該処理単位が他のプログラマブルコントローラか
ら依頼中であるかを示すステータス情報、各処理単位が
必要とする入力データを示す入力データ情報、各処理単
位が必要とする出力データを示す出力データ情報、各処
理単位における実際の処理の内容を記述するコード情
報、を格納することを特徴とする。
Further, the program state table is such that identification information for identifying each process in each process unit, for each process unit, the process unit is being executed, or the process unit is another programmable controller. Status information indicating whether or not the processing unit is requesting the processing unit from another programmable controller, input data information indicating input data required by each processing unit, and each processing unit requires It is characterized by storing output data information indicating output data and code information describing the contents of actual processing in each processing unit.

【0019】また、上記共有データテーブルは、上記複
数台のプログラマブルコントローラで共有するデータ、
上記共有するデータのアドレス、上記共有するデータを
利用している処理を識別するための識別情報を格納する
ことを特徴とする。
Further, the shared data table is data shared by the plurality of programmable controllers,
It is characterized in that an address of the shared data and identification information for identifying a process using the shared data are stored.

【0020】このような構成によると、ユーザが意識し
てプログラムを配置しなくても、各プログラマブルコン
トローラ(PLC)におけるプログラムの分散化が可能
になり、また、動作時には、各プログラマブルコントロ
ーラ(PLC)の負荷を考慮しながら分散化を反映して
いくことが可能になるので、効率のよいFA(ファクト
リオートメーション)システムを組むことが可能にな
る。
With this configuration, the programs can be distributed in each programmable controller (PLC) without the user consciously arranging the programs, and at the time of operation, each programmable controller (PLC) can be distributed. Since it is possible to reflect the decentralization while considering the load of, it becomes possible to build an efficient FA (factory automation) system.

【0021】また、新たなプログラマブルコントローラ
(PLC)を1台追加し、それに対してプログラミング
しない場合でも、そのプログラマブルコントローラ(P
LC)が自動的に周囲のプログラマブルコントローラ
(PLC)の負荷を減少することができ、要した設備の
コストに見合うだけのシステムの性能アップを簡単に得
ることができる。
Further, even if one new programmable controller (PLC) is added and programming is not performed for it, the programmable controller (P
The LC) can automatically reduce the load on the programmable controller (PLC) in the surroundings, and can easily obtain the performance improvement of the system commensurate with the cost of the equipment required.

【0022】[0022]

【発明の実施の形態】以下、この発明に係わる負荷分散
装置および方法の実施例を図面に基づいて詳細に説明す
る。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of a load balancing apparatus and method according to the present invention will be described below in detail with reference to the drawings.

【0023】図1は、この発明に係わる負荷分散装置お
よび方法を適用して構成したプログラマブルコントロー
ラシステムの一実施例の概略構成をブロック図で示した
ものである。
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of a programmable controller system configured by applying the load balancing apparatus and method according to the present invention.

【0024】図1において、このプログラマブルコント
ローラシステムは、複数のプログラマブルコントローラ
(PLC)100−1〜100−nを高速ネットワーク
200に接続して構成される。また、このプログラマブ
ルコントローラシステムには、複数のプログラマブルコ
ントローラ(PLC)100−1〜100−nにより共
用して使用されるネットワーク内グローバルメモリ30
0が設けられ、このネットワーク内グローバルメモリ3
00も高速ネットワーク200に接続されている。
In FIG. 1, this programmable controller system is constructed by connecting a plurality of programmable controllers (PLC) 100-1 to 100-n to a high speed network 200. In addition, the programmable controller system includes an in-network global memory 30 shared by a plurality of programmable controllers (PLC) 100-1 to 100-n.
0 is provided, and the global memory in this network 3
00 is also connected to the high speed network 200.

【0025】プログラマブルコントローラ(PLC)1
00−1〜100−nは、それぞれシステムプログラム
が格納されるリードオンリィメモリ(ROM)101、
プログラム状態テーブル102−1、共有データテーブ
ル102−2、処理依頼可能フラグ102−3が格納さ
れるランダムアクセスメモリ(RAM)102、入出力
メモリ(I/Oメモリ)103、中央演算処理装置(C
PU)104、ネットワークインターフェース(I/
F)105を具備しており、これらはプログラマブルコ
ントローラ(PLC)100−1〜100−n内の内部
バス106に接続されている。
Programmable controller (PLC) 1
00-1 to 100-n are read-only memories (ROMs) 101 for storing system programs,
A program status table 102-1, a shared data table 102-2, a random access memory (RAM) 102 that stores a process request enable flag 102-3, an input / output memory (I / O memory) 103, a central processing unit (C).
PU) 104, network interface (I /
F) 105, which are connected to the internal bus 106 in the programmable controllers (PLC) 100-1 to 100-n.

【0026】ここで、リードオンリィメモリ(ROM)
101に格納されるシステムプログラムは、プログラマ
ブルコントローラ(PLC)100−1〜100−n本
体の動作制御を行うプログラムで、この発明に係わる
「処理の依頼方法」および「依頼後の処理」に関する記
述を含んでいる。この「処理の依頼方法」および「依頼
後の処理」については後に詳述する。
Here, a read only memory (ROM)
The system program stored in 101 is a program for controlling the operation of the programmable controllers (PLC) 100-1 to 100-n main body, and describes the "processing request method" and "processing after request" according to the present invention. Contains. The "processing request method" and the "processing after request" will be described in detail later.

【0027】また、ランダムアクセスメモリ(RAM)
102に格納されるプログラム状態テーブル102−1
は、分割されたプログラム単位がどのような状態にあ
り、どのような入力や出力を持つかを記述する。また、
処理コードを指すポインタであるか、処理コード自体で
あるかにかかわらず、処理内容を示すデータを持つ。
Random access memory (RAM)
Program state table 102-1 stored in 102
Describes in what state the divided program units are and what kind of input and output they have. Also,
It has data indicating the processing content regardless of whether the pointer is a processing code or the processing code itself.

【0028】また、ランダムアクセスメモリ(RAM)
102に格納される共有データテーブル102−2は、
ネットワーク200を介して自分のプログラマブルコン
トローラ(PLC)が他のプログラマブルコントローラ
(PLC)に依頼した処理に関係する入力および出力を
記述する。
Random access memory (RAM)
The shared data table 102-2 stored in 102 is
It describes the inputs and outputs related to the processing requested by another programmable controller (PLC) by its own programmable controller (PLC) via the network 200.

【0029】また、ランダムアクセスメモリ(RAM)
102に格納される処理依頼可能フラグ102−3は、
自分のプログラマブルコントローラ(PLC)が他のプ
ログラマブルコントローラ(PLC)に処理を依頼可能
であるかを示すフラグで、この処理依頼可能フラグは、
プログラマブルコントローラ(PLC)の動作開始時に
はONになる。また、プログラマブルコントローラ(P
LC)の動作中に、内部で実行している処理単位がない
ことが判明したときには、この処理依頼可能フラグはO
FFにされる。
Random access memory (RAM)
The process requestable flag 102-3 stored in 102 is
A flag indicating whether or not one's programmable controller (PLC) can request processing to another programmable controller (PLC). This processing requestable flag is
It is turned on at the start of the operation of the programmable controller (PLC). In addition, the programmable controller (P
When it is found that there is no internally executed processing unit during the operation of (LC), this processing requestable flag is set to O.
Set to FF.

【0030】また、中央演算処理装置(CPU)104
は、ユーザプログラムの実行あるいは周辺処理を行う。
The central processing unit (CPU) 104
Performs user program execution or peripheral processing.

【0031】ネットワーク内グローバルメモリ300
は、 1)各PLCの命令実行負荷 2)ネットワーク内のPLCの平均命令実行負荷 3)ネットワーク内の最も負荷の少ないPLC 4)PLC間共有の入出力情報 を格納する。
In-network global memory 300
1) instruction execution load of each PLC 2) average instruction execution load of PLC in the network 3) PLC with the least load in the network 4) input / output information shared between PLCs is stored.

【0032】ここで、「各PLCの命令実行負荷」は、
このプログラマブルコントローラシステムを構成するネ
ットワーク200内の複数のプログラマブルコントロー
ラ(PLC)100−1〜100−nのそれぞれの命令
実行負荷で、この命令実行負荷としては、各プログラマ
ブルコントローラ(PLC)100−1〜100−nの
「実行命令」の、例えば、1サイクルでの単純な命令実
行時間、1サイクル内の命令実行時間の割合等を用いる
ことができ、要は、各プログラマブルコントローラ(P
LC)100−1〜100−nの「実行命令」の負荷を
相対的に判断できる指標であればどのような値でも用い
ることが可能である。
Here, the "instruction execution load of each PLC" is
The instruction execution load of each of the plurality of programmable controllers (PLC) 100-1 to 100-n in the network 200 that configures this programmable controller system. As the instruction execution load, each programmable controller (PLC) 100-1 to 100-1. For example, a simple instruction execution time in one cycle, a ratio of the instruction execution time in one cycle, and the like of 100-n "execution instructions" can be used. In short, each programmable controller (P
Any value can be used as long as it is an index capable of relatively judging the load of the “execution instruction” of LC) 100-1 to 100-n.

【0033】また、「ネットワーク内のPLCの平均命
令実行負荷」は、ネットワーク200内の各プログラマ
ブルコントローラ(PLC)100−1〜100−nの
命令実行負荷の平均である。ここで、各プログラマブル
コントローラ(PLC)100−1〜100−nの命令
実行負荷の次元が実行時間であれば、相加平均をとり、
割合であれば相乗平均をとるのが適している。
The "average instruction execution load of PLCs in the network" is the average instruction execution load of each programmable controller (PLC) 100-1 to 100-n in the network 200. Here, if the dimension of the instruction execution load of each programmable controller (PLC) 100-1 to 100-n is the execution time, the arithmetic mean is calculated,
If it is a ratio, it is suitable to take a geometric mean.

【0034】また、「ネットワーク内の最も負荷の少な
いPLC」は、ネットワーク200内の各プログラマブ
ルコントローラ(PLC)100−1〜100−nのな
かで1番命令実行の負荷の軽いプログラマブルコントロ
ーラ(PLC)を示す変数である。この変数は、各プロ
グラマブルコントローラ(PLC)100−1〜100
−nを示すノードアドレスであっても、各プログラマブ
ルコントローラ(PLC)100−1〜100−nに固
有のID値であってもかまわない。
The "PLC with the least load in the network" is a programmable controller (PLC) with the lightest load of executing the first instruction among the programmable controllers (PLC) 100-1 to 100-n in the network 200. Is a variable that indicates. This variable is used for each programmable controller (PLC) 100-1 to 100
The node address indicating -n may be an ID value unique to each programmable controller (PLC) 100-1 to 100-n.

【0035】また、「PLC間共有の入出力情報」は、
処理を他のプログラマブルコントローラ(PLC)に依
頼することにより、プログラマブルコントローラ(PL
C)間で共有化する必要のある入出力情報の参照エリア
である。
The "input / output information shared between PLCs" is
By requesting processing to another programmable controller (PLC), the programmable controller (PL)
This is a reference area for input / output information that needs to be shared between C).

【0036】さて、この実施例のプログラマブルコント
ローラシステムの詳細動作を説明する前に、この発明に
係わる負荷分散装置および方法の基本的概念について説
明する。
Before describing the detailed operation of the programmable controller system of this embodiment, the basic concept of the load balancing apparatus and method according to the present invention will be described.

【0037】まず、図2に示すように、2台のプログラ
マブルコントローラ(PLC1およびPLC2)100
−1、100−2を高速ネットワーク(LAN)200
に接続した構成を考える。
First, as shown in FIG. 2, two programmable controllers (PLC1 and PLC2) 100 are provided.
-1, 100-2 to high-speed network (LAN) 200
Consider the configuration connected to.

【0038】ここで、プログラマブルコントローラ(P
LC1)100−1における処理がプログラマブルコン
トローラ(PLC2)100−2における処理に比較し
て非常に多いとする。この場合、この発明に係わる負荷
分散装置および方法においては、プログラマブルコント
ローラ(PLC1)100−1における処理の一部をプ
ログラマブルコントローラ(PLC2)100−2に依
頼し、システム全体の負荷の分散を図る。
Here, the programmable controller (P
It is assumed that the processing in LC1) 100-1 is much larger than the processing in programmable controller (PLC2) 100-2. In this case, in the load distribution apparatus and method according to the present invention, a part of the processing in the programmable controller (PLC1) 100-1 is requested to the programmable controller (PLC2) 100-2 to distribute the load of the entire system.

【0039】ここで、プログラマブルコントローラ(P
LC1)100−1およびプログラマブルコントローラ
(PLC2)100−2のプログラムがラダープログラ
ムから構成されているとすると、このラダープログラム
は、図3に示すように小さい回路に分割することが可能
である。
Here, the programmable controller (P
Assuming that the programs of LC1) 100-1 and programmable controller (PLC2) 100-2 are composed of ladder programs, this ladder program can be divided into small circuits as shown in FIG.

【0040】図3においては、プログラマブルコントロ
ーラ(PLC1)100−1(プログラマブルコントロ
ーラ1)のラダープログラムの実行処理の負荷が非常に
大きく、プログラマブルコントローラ(PLC2)10
0−2(プログラマブルコントローラ2)のラダープロ
グラムの実行処理の負荷が非常に小さい場合を示してい
る。
In FIG. 3, the load of the execution process of the ladder program of the programmable controller (PLC1) 100-1 (programmable controller 1) is very large, and the programmable controller (PLC2) 10
0-2 (programmable controller 2) shows a case where the load of the execution process of the ladder program is very small.

【0041】この場合、プログラマブルコントローラ1
のラダープログラムを処理A〜Dに分割し、この分割し
た処理A〜Dの一部をプログラマブルコントローラ2に
依頼する。ここで、分割した処理A〜Dはその順序を変
更しても、このラダープログラム実行に関係する影響は
ない。
In this case, the programmable controller 1
The ladder program is divided into processes A to D, and a part of the divided processes A to D is requested to the programmable controller 2. Here, even if the order of the divided processes A to D is changed, there is no influence related to the execution of the ladder program.

【0042】今、プログラマブルコントローラ1がラダ
ープログラムを実行する時間をT1とし、プログラマブ
ルコントローラ2がラダープログラムを実行する時間を
T2として、時間T1が時間T2よりも十分に大きく
て、プログラマブルコントローラ1からプログラマブル
コントローラ2にプログラムの実行を依頼する場合を考
える。
Now, the time when the programmable controller 1 executes the ladder program is T1, the time when the programmable controller 2 executes the ladder program is T2, and the time T1 is sufficiently larger than the time T2. Consider a case where the controller 2 is requested to execute a program.

【0043】ここで、もしも処理Aの実行時間TAにつ
いて (T1−T2)<(TA+ΔTA) の関係が成立すれば、プログラマブルコントローラ1が
処理Aをプログラマブルコントローラ2に依頼すること
により、システム全体としてのプログラム実行時間は減
少する。ここで、ΔTAは、プログラマブルコントロー
ラ1が処理Aをプログラマブルコントローラ2に依頼す
るのに必要はオーバヘッドである。具体的には、このオ
ーバヘッドは、処理Aに関係する入力情報をプログラマ
ブルコントローラ2で利用可能にし、かつ、このプログ
ラマブルコントローラ2による処理Aの出力情報をプロ
グラマブルコントローラ1に反映するために必要な時間
である。
Here, if the relationship of (T1−T2) <(TA + ΔTA) is established for the execution time TA of the process A, the programmable controller 1 requests the programmable controller 2 to perform the process A, so that the entire system is executed. Program execution time is reduced. Here, ΔTA is an overhead required for the programmable controller 1 to request the programmable controller 2 to perform the process A. Specifically, this overhead is the time required to make the input information related to the process A available to the programmable controller 2 and to reflect the output information of the process A by the programmable controller 2 in the programmable controller 1. is there.

【0044】上記条件が成立すると、処理Aをプログラ
マブルコントローラ1からプログラマブルコントローラ
2に依頼することが可能になる。
When the above conditions are satisfied, it is possible to request the process A from the programmable controller 1 to the programmable controller 2.

【0045】図4は、処理Aをプログラマブルコントロ
ーラ1からプログラマブルコントローラ2に依頼した場
合のプログラマブルコントローラ1およびプログラマブ
ルコントローラ2による処理プログラムを示したもので
ある。すなわち、プログラマブルコントローラ1の処理
Aがプログラマブルコントローラ2に依頼されたので、
プログラマブルコントローラ1による処理は、処理B〜
Cになり、プログラマブルコントローラ2による処理
は、処理Aとなって、システム全体の負荷分散が図れ
る。
FIG. 4 shows a processing program by the programmable controller 1 and the programmable controller 2 when the programmable controller 1 requests the programmable controller 2 for the processing A. That is, since the process A of the programmable controller 1 is requested to the programmable controller 2,
The processing by the programmable controller 1 is processing B to
The processing becomes C, and the processing by the programmable controller 2 becomes processing A, so that the load distribution of the entire system can be achieved.

【0046】なお、上記説明では、プログラマブルコン
トローラ1の処理Aをプログラマブルコントローラ2に
依頼した場合を示したが、プログラマブルコントローラ
1の処理A以外の処理、すなわち処理B〜Cをプログラ
マブルコントローラ2に依頼するようにしてもよい。こ
こで、依頼可能な処理のうちどの処理を依頼するかは、
この処理の依頼により生じるオーバヘッドができるだけ
少ないものに決定される。すなわち、処理の依頼に際し
て、オーバヘッドができるだけ少ないもの、すなわち、
処理の依頼に際して新たにプログラマブルコントローラ
1とプログラマブルコントローラ2との間で共有しなけ
ればならない入出力情報が一番少ないものを選択するの
がシステムの資源の有効利用の観点から有効な方法であ
る。
In the above description, the case where the process A of the programmable controller 1 is requested to the programmable controller 2 is shown, but the process other than the process A of the programmable controller 1, that is, the processes B to C are requested to the programmable controller 2. You may do it. Here, which of the processes that can be requested is requested,
The overhead caused by the request for this processing is determined to be as small as possible. That is, when requesting processing, the one with the least overhead, that is,
It is an effective method from the viewpoint of effective use of system resources to newly select the input / output information that must be shared between the programmable controller 1 and the programmable controller 2 when requesting processing.

【0047】また、プログラマブルコントローラ1から
処理Aをプログラマブルコントローラ2に依頼した後、
まだ、プログラマブルコントローラ2の負荷がプログラ
マブルコントローラ1に比較して小さい場合は、プログ
ラマブルコントローラ1から更に他の処理をプログラマ
ブルコントローラ2に依頼することも可能である。
After requesting the process A from the programmable controller 1 to the programmable controller 2,
When the load of the programmable controller 2 is still smaller than that of the programmable controller 1, the programmable controller 1 can request the programmable controller 2 to perform other processing.

【0048】この際においても、プログラマブルコント
ローラ1とプログラマブルコントローラ2との間で共有
する必要がある入出力情報が少ない処理を選択して、こ
の処理をプログラマブルコントローラ1からプログラマ
ブルコントローラ2に依頼する。すなわち、プログラマ
ブルコントローラ1からプログラマブルコントローラ2
に依頼可能な処理の中で、新たに情報交換の必要が少な
い処理を依頼することになる。例えば、処理Aで利用し
ている入出力情報を処理Cでも利用しているならば、新
たに情報交換が必要な情報量は処理Cを依頼することに
より少なくなる。
Also in this case, a process having a small amount of input / output information that needs to be shared between the programmable controller 1 and the programmable controller 2 is selected, and the programmable controller 1 requests this process from the programmable controller 2. That is, programmable controller 1 to programmable controller 2
Among the processes that can be requested to, a process that requires less new information exchange will be requested. For example, if the input / output information used in the process A is also used in the process C, the amount of information that requires new information exchange is reduced by requesting the process C.

【0049】上記処理を繰り返すことにより、プログラ
マブルコントローラ1とプログラマブルコントローラ2
との間の負荷の均一化が図られ、システム全体の高効率
化が図れる。
By repeating the above processing, programmable controller 1 and programmable controller 2
The load can be made uniform between the two, and the efficiency of the entire system can be improved.

【0050】ところで、上記説明においては、2台のプ
ログラマブルコントローラ(PLC1およびPLC2)
100−1、100−2を高速ネットワーク(LAN)
200に接続した構成を考えたが、一般にプログラマブ
ルコントローラシステムを構成する場合に、高速ネット
ワーク(LAN)200に接続されるプログラマブルコ
ントローラ(PLC)の数は、図2に示したような2台
には限らない。
In the above description, two programmable controllers (PLC1 and PLC2) are used.
High speed network (LAN) 100-1 and 100-2
Although a configuration in which the programmable controller system is connected to the high-speed network (LAN) 200 is considered in general when configuring a programmable controller system, the number of programmable controllers (PLC) connected to the high-speed network (LAN) 200 is not two as shown in FIG. Not exclusively.

【0051】そこで、次に、図5に示しように、高速ネ
ットワーク(LAN)200に対して2台を越える複数
台、すなわち4台のプログラマブルコントローラ(PL
C1〜PLC4)100−1〜100−4が接続された
場合を考える。
Therefore, next, as shown in FIG.
Consider a case where C1 to PLC4) 100-1 to 100-4 are connected.

【0052】この場合のプログラムの負荷の分散を行う
タイミングは次に示す2つの場合が考えられる。 1)各プログラマブルコントローラ(PLC1〜PLC
4)100−1〜100−4のプログラム作成後で、シ
ステムの非稼働時の負荷分散(以下、これを静的な負荷
分散という)。 2)各プログラマブルコントローラ(PLC1〜PLC
4)100−1〜100−4のプログラム作成後で、シ
ステム動作時の負荷分散(以下、これを動的な負荷分散
という)。
In this case, there are two possible timings for distributing the program load. 1) Each programmable controller (PLC1 to PLC
4) After creating the programs 100-1 to 100-4, load distribution when the system is not operating (hereinafter, this is referred to as static load distribution). 2) Each programmable controller (PLC1 to PLC
4) After creating the programs 100-1 to 100-4, load distribution during system operation (hereinafter referred to as dynamic load distribution).

【0053】ここで、上記1)の静的な負荷分散につい
ては、プログラミングツールなどにより、適宜、プログ
ラムを各プログラマブルコントローラ(PLC1〜PL
C4)100−1〜100−4に分散することができ
る。
Here, for the static load distribution of the above 1), the program is appropriately changed by a programming tool or the like to each programmable controller (PLC1 to PL).
C4) It can be dispersed in 100-1 to 100-4.

【0054】また、上記2)の動的な負荷分散の場合
は、各プログラマブルコントローラ(PLC1〜PLC
4)100−1〜100−4が、システム動作時に、自
分のプログラマブルコントローラがシステム全体から見
て相対的にどれだけの負荷があるかを判断し、もし自分
のプログラマブルコントローラの負荷がシステム全体か
ら見て相対的に多い場合は、相対的に少ない他のプログ
ラマブルコントローラに処理を依頼する。
Further, in the case of the dynamic load distribution of 2) above, each programmable controller (PLC1 to PLC)
4) 100-1 to 100-4 determine how much load their programmable controller has relative to the entire system when the system is operating, and if the load of its programmable controller is from the entire system If the number is relatively large as viewed, processing is requested to another relatively small programmable controller.

【0055】図6は、上記動的な負荷分散を可能にする
ための構成を示したものである。図6に示し構成におい
ては、このプログラマブルコントローラシステムを構成
する4台のプログラマブルコントローラ(PLC1〜P
LC4)100−1〜100−4の全てが共有するメモ
リ300を設け、このメモリ300のメモリエリアに 1)PLC1での命令実行時間 2)PLC2での命令実行時間 3)PLC3での命令実行時間 4)PLC4での命令実行時間 5)ネットワーク内全PLCの平均命令時間 6)ネットワーク内で一番負荷の少ないPLC番号 を格納し、各プログラマブルコントローラ(PLC1〜
PLC4)100−1〜100−4は、このメモリ30
0のメモリエリアに格納された上記情報を参照して自分
のプログラマブルコントローラのシステム全体から見た
相対的な負荷を判断する。
FIG. 6 shows a configuration for enabling the dynamic load distribution. In the configuration shown in FIG. 6, the four programmable controllers (PLC1 to P
LC4) A memory 300 shared by all of 100-1 to 100-4 is provided, and 1) instruction execution time in PLC1 is provided in a memory area of this memory 300 2) instruction execution time in PLC2 3) instruction execution time in PLC3 4) Instruction execution time in PLC 4 5) Average instruction time of all PLCs in the network 6) PLC number with the least load in the network is stored, and each programmable controller (PLC1 to PLC1
PLC4) 100-1 to 100-4 are connected to this memory 30.
By referring to the above information stored in the memory area of 0, the relative load of the programmable controller as viewed from the entire system is determined.

【0056】なお、上記メモリ300のメモリエリアに
格納される上記1)〜4)の各PLCでの命令実行時間
はそれぞれ対応するプログラマブルコントローラ(PL
C1〜PLC4)100−1〜100−4がメモリ30
0のメモリエリアに動的に書き込む。
The instruction execution time in each of the PLCs 1) to 4) stored in the memory area of the memory 300 corresponds to the programmable controller (PL).
C1 to PLC4) 100-1 to 100-4 are the memory 30
Dynamically write to memory area 0.

【0057】すなわち、PLC1での命令実行時間は、
プログラマブルコントローラ(PLC1)100−1が
書き込み、同様に、PLC2での命令実行時間は、プロ
グラマブルコントローラ(PLC2)100−2が、P
LC3での命令実行時間は、プログラマブルコントロー
ラ(PLC3)100−3が、PLC4での命令実行時
間は、プログラマブルコントローラ(PLC4)100
−4がそれぞれメモリ300の対応するメモリエリアに
書き込む。
That is, the instruction execution time in PLC1 is
The programmable controller (PLC1) 100-1 writes, and similarly, the instruction execution time in the PLC2 is
The instruction execution time in LC3 is the programmable controller (PLC3) 100-3, and the instruction execution time in PLC4 is the programmable controller (PLC4) 100-3.
-4 respectively writes in the corresponding memory areas of the memory 300.

【0058】また、5)の「ネットワーク内全PLCの
平均命令時間」および6)の「ネットワーク内で一番負
荷の少ないPLC番号」は、ネットワーク内で一番負荷
の少ないと判断されたプログラマブルコントローラ(P
LC3)100−3が計算してメモリ300の対応する
メモリエリアに書き込む。
The 5) "average command time of all PLCs in the network" and the 6) "PLC number with the least load in the network" are the programmable controllers determined to have the least load in the network. (P
LC3) 100-3 calculates and writes to the corresponding memory area of memory 300.

【0059】なお、5)の「ネットワーク内全PLCの
平均命令時間」および6)の「ネットワーク内で一番負
荷の少ないPLC番号」の計算およびメモリ300の対
応するメモリエリアへの書き込みは、ネットワーク内で
一番負荷の少ないと判断されたプログラマブルコントロ
ーラ(PLC3)100−3により行うように構成した
が、この処理を他のプログラマブルコントローラ(PL
C)が行うように構成してもよい。すなわち、この実施
例では、5)の「ネットワーク内全PLCの平均命令時
間」および6)の「ネットワーク内で一番負荷の少ない
PLC番号」の計算およびメモリ300の対応するメモ
リエリアへの書き込みも負荷分散の対象として処理され
ている。
The calculation of 5) "average command time of all PLCs in the network" and 6) "PLC number with the least load in the network" and writing to the corresponding memory area of the memory 300 are performed by the network. The programmable controller (PLC3) 100-3 that is determined to have the least load among them is configured to perform this processing, but this processing is performed by another programmable controller (PL).
It may be configured to be performed by C). That is, in this embodiment, the calculation of 5) "average command time of all PLCs in the network" and 6) "PLC number with the least load in the network" and writing to the corresponding memory area of the memory 300 are also performed. It is being processed for load balancing.

【0060】メモリ300のメモリエリアに格納された
上記情報を参照して自分のプログラマブルコントローラ
のシステム全体から見た相対的な負荷が大であると判断
すると、このプログラマブルコントローラは処理の依頼
先となる他のプログラマブルコントローラを選択する。
If it is determined that the relative load of the programmable controller of the own system as a whole is large by referring to the above information stored in the memory area of the memory 300, this programmable controller becomes the processing request destination. Select another programmable controller.

【0061】この処理の依頼先となる他のプログラマブ
ルコントローラの選択は以下に示す方法により行われ
る。 1)メモリ300のメモリエリアに格納されたネットワ
ーク内で一番負荷の少ないPLC番号からそのPLC番
号に対応するプログラマブルコントローラを処理の依頼
先となる他のプログラマブルコントローラとして選択す
る。 2)メモリ300のメモリエリアに格納された各PLC
での命令実行時間をネットワーク内全PLCの平均命令
時間と、自分のプログラマブルコントローラの平均命令
時間を記憶したメモリエリアを起点として、順番に比較
していくことにより、一番最初に発見された平均命令処
理より短い命令実行時間のプログラマブルコントローラ
(PLC)を処理の依頼先となる他のプログラマブルコ
ントローラとして選択する。 3)自分以外の全ての他のプログラマブルコントローラ
(PLC)に対して処理依頼を行えるるか否かを問うメ
ッセージを発行し、その処理を依頼されることが可能な
プログラマブルコントローラ(PLC)からのレスポン
スに基づきこの処理の依頼先となる他のプログラマブル
コントローラを選択する。
The selection of another programmable controller to which this processing is requested is performed by the method described below. 1) From the PLC number with the least load in the network stored in the memory area of the memory 300, the programmable controller corresponding to that PLC number is selected as another programmable controller to be the processing request destination. 2) Each PLC stored in the memory area of the memory 300
By comparing the instruction execution time at the average instruction time of all PLCs in the network and the memory area storing the average instruction time of the programmable controller of one's own in order, the average found first A programmable controller (PLC) having an instruction execution time shorter than that of the instruction processing is selected as another programmable controller to which the processing is requested. 3) A response from the programmable controller (PLC) that issues a message to all other programmable controllers (PLCs) other than itself and asks whether or not the processing can be requested. Based on the above, another programmable controller to be the request destination of this processing is selected.

【0062】なお、上記1)乃至3)の方法のいずれの
方法を採用するかはシステム構成上任意である。ただ
し、1)の方法は、特定のプログラマブルコントローラ
(PLC)が計算した上記メモリ300のメモリエリア
に格納された6)の「ネットワーク内で一番負荷の少な
いPLC番号」により簡単に求めることができるが、シ
ステム全体のプログラマブルコントローラ(PLC)の
数が多くなると、同時に複数のプログラマブルコントロ
ーラ(PLC)が同一のプログラマブルコントローラ
(PLC)を処理の依頼先として選択する可能性がある
ので、処理依頼の時間が多くなるという問題があり、ま
た、2)および3)の方法においては、同一のプログラ
マブルコントローラ(PLC)を処理の依頼先として選
択する可能性は低くなるが、処理依頼先のプログラマブ
ルコントローラ(PLC)の選択処理が複雑になるとい
う問題がある。
Which of the above methods 1) to 3) is adopted is arbitrary in terms of system configuration. However, the method of 1) can be easily obtained by “the PLC number with the least load in the network” of 6) stored in the memory area of the memory 300 calculated by a specific programmable controller (PLC). However, when the number of programmable controllers (PLCs) in the entire system increases, a plurality of programmable controllers (PLCs) may simultaneously select the same programmable controller (PLC) as a request destination of processing. In the methods 2) and 3), the possibility that the same programmable controller (PLC) is selected as the processing request destination is low, but the programmable controller (PLC) that is the processing request destination is less likely to be selected. There is a problem that the selection process of) becomes complicated.

【0063】次に、処理依頼元のプログラマブルコント
ローラ(PLC)は依頼する処理を決定する。この依頼
する処理の決定は、この処理の依頼により生じるオーバ
ヘッドができるだけ小さくなる処理を選択する。
Next, the programmable controller (PLC) as the processing request source determines the processing to be requested. In determining the processing to be requested, a processing in which the overhead caused by this processing request is minimized is selected.

【0064】図7は、上記各プログラマブルコントロー
ラ(PLC)における処理依頼時の処理をフローチャー
トで示したものである。
FIG. 7 is a flow chart showing the processing at the time of processing request in each programmable controller (PLC).

【0065】まず、自PLCの相対的な負荷の大小を求
める(ステップ111)。この処理は前述したように、
メモリ300のメモリエリアに記憶された「ネットワー
ク内全PLCの平均命令時間」に基づき行われる。
First, the relative load of the own PLC is calculated (step 111). This process, as described above,
It is performed based on the "average command time of all PLCs in the network" stored in the memory area of the memory 300.

【0066】自PLCの相対的な負荷が大と判断される
と、次に、処理依頼先PLCを求める(ステップ11
2)。この処理依頼先PLCは、上述した 1)メモリ300のメモリエリアに格納されたネットワ
ーク内で一番負荷の少ないPLC番号からそのPLC番
号に対応するプログラマブルコントローラを処理の依頼
先となる他のプログラマブルコントローラとして選択す
る。 2)メモリ300のメモリエリアに格納された各PLC
での命令実行時間をネットワーク内全PLCの平均命令
時間と、自分のプログラマブルコントローラの平均命令
時間を記憶したメモリエリアを起点として、順番に比較
していくことにより、一番最初に発見された平均命令処
理より短い命令実行時間のプログラマブルコントローラ
(PLC)を処理の依頼先となる他のプログラマブルコ
ントローラとして選択する。 3)自分以外の全ての他のプログラマブルコントローラ
(PLC)に対して処理依頼を行えるるか否かを問うメ
ッセージを発行し、その処理を依頼されることが可能な
プログラマブルコントローラ(PLC)からのレスポン
スに基づきこの処理の依頼先となる他のプログラマブル
コントローラを選択する。 のいづれかの方法により行われる。
If it is determined that the relative load of the own PLC is large, then the processing request destination PLC is obtained (step 11).
2). This processing request destination PLC is the above-mentioned 1) Another programmable controller which requests the programmable controller corresponding to the PLC number from the PLC number with the least load in the network stored in the memory area of the memory 300 as the processing request destination. To choose as. 2) Each PLC stored in the memory area of the memory 300
By comparing the instruction execution time at the average instruction time of all PLCs in the network and the memory area storing the average instruction time of the programmable controller of one's own in order, the average found first A programmable controller (PLC) having an instruction execution time shorter than that of the instruction processing is selected as another programmable controller to which the processing is requested. 3) A response from the programmable controller (PLC) that issues a message to all other programmable controllers (PLCs) other than itself and asks whether or not the processing can be requested. Based on the above, another programmable controller to be the request destination of this processing is selected. It is carried out by any of the following methods.

【0067】次に、依頼する処理を選択する(ステップ
114)。この依頼する処理の選択は、上述したよう
に、処理の依頼により生じるオーバヘッドを考慮して選
択される。
Next, the process to be requested is selected (step 114). As described above, the selection of the processing to be requested is selected in consideration of the overhead caused by the processing request.

【0068】そして、処理依頼先PLCおよび依頼する
処理が決定されると、その処理を依頼する処理の依頼処
理を行い(ステップ114)、この処理を終了する。
When the processing request destination PLC and the processing to be requested are determined, a processing requesting processing for the processing is performed (step 114), and this processing ends.

【0069】さて、上述したように、ラダープログラム
については、回路毎に分割が可能である。ここで、分割
された処理単位は、図8に示すように、入力121、処
理122、出力123を所持する。
As described above, the ladder program can be divided for each circuit. Here, the divided processing unit possesses an input 121, a processing 122, and an output 123, as shown in FIG.

【0070】ここで重要なことは、分割された処理単位
に対して必要な入力情報、出力情報が定義でき、それよ
って情報の共有によるオーバヘッドが計算できることで
ある。ラダープログラムでは、入力接点および出力接点
を必要な入力情報および出力情報として割り当てること
ができるので、上記入力情報、出力情報の定義およびそ
れよる情報の共有によるオーバヘッドは簡単に計算でき
る。
What is important here is that necessary input information and output information can be defined for the divided processing units, and thus the overhead due to sharing of information can be calculated. In the ladder program, since the input contact and the output contact can be assigned as necessary input information and output information, the definition of the input information and the output information and the overhead due to the sharing of the information can be easily calculated.

【0071】次に、一般的なプログラムについてのプロ
グラムの分割方法について説明する。
Next, a program dividing method for a general program will be described.

【0072】1)ST言語 ST言語は、FORTRANに似た言語であり、「逐次
実行」、「判断文」、「繰り返し文」などがある。これ
らについてどのように分割可能かを以下に示す。
1) ST Language The ST language is a language similar to FORTRAN and includes “sequential execution”, “judgment sentence”, “repeated sentence” and the like. The following shows how they can be divided.

【0073】a)「逐次実行」 「判断」および「繰り返し」を含まない「逐次実行」は
図9に示すように任意に分割可能である。すなわち、
「判断」および「繰り返し」を含まない「逐次実行」
は、どのように分割を行っても、この分割された処理を
どのプログラマブルコントローラ(PLC)が行っても
かまわない。すなわち、各処理にそれぞれ依存関係がな
ければ、その処理をどのように分割することもでき、ま
たそれをどのように分散してもよい。
A) "Sequential execution""Judgment" and "sequential execution" that do not include "repeat" can be arbitrarily divided as shown in FIG. That is,
"Sequential execution" that does not include "judgment" and "repetition"
It does not matter how the division is performed or which programmable controller (PLC) performs the divided processing. That is, if each process does not have a dependency relationship, the process may be divided in any way, and may be distributed in any manner.

【0074】また、このとき、各処理に含まれるのは、
ほとんど代入処理である。そこで、この処理は、図10
に示すように、代入文の入力141、処理142、代入
文における出力143で定義でき、これによって、処理
を分散するときのオーバヘッドを算出できる。
At this time, each processing includes:
Almost all assignment processing. Therefore, this process is shown in FIG.
As shown in FIG. 4, the input 141 of the assignment statement, the process 142, and the output 143 of the assignment statement can be defined. By this, the overhead when distributing the processes can be calculated.

【0075】b)「判断文」 「判断文」は、図11に示すように、条件の判断15
1、処理152から構成されている。ここで、この「判
断文」は、一つの処理単位と考えることができる。この
とき、処理の入出力情報としては図12に示すように、
代入文への入力+条件161、処理162、代入文にお
ける出力163で定義でき、これによって、処理を分散
するときのオーバヘッドを算出できる。
B) "Judgment sentence" The "judgment sentence" is, as shown in FIG.
1 and processing 152. Here, this "judgment sentence" can be considered as one processing unit. At this time, as the input / output information of the process, as shown in FIG.
It can be defined by the input to the assignment statement + the condition 161, the process 162, and the output 163 in the assignment statement, whereby the overhead when distributing the processing can be calculated.

【0076】c)「繰り返し文」 「繰り返し文」は、その処理に要する入出力情報はない
ので、これを1つの処理と考えたときに、追加される情
報はない。
C) "Repeat sentence""Repeatsentence" has no input / output information required for its processing, and therefore, when this is regarded as one process, no information is added.

【0077】2)SFC SFCにおいては、「STEP」および「TRANSI
TION」という枠組みがある。そして処理としては
「STEP」内の「ACTION」および「TRANS
ITION」の処理をそれぞれ一つ一つに分割すること
ができる。
2) SFC In SFC, "STEP" and "TRANSI" are used.
There is a framework called "TION". Then, as processing, "ACTION" and "TRANS" in "STEP"
Each of the "ITION" processes can be divided into individual processes.

【0078】「TRANSITION」の処理は、「S
TEP」の活性状態を入力として、それに対して、「S
TEP」の活性状態を出力するから、図13に示すよう
に、STEPの活性状態171、TRANSITION
処理172、STEPの活性状態173で定義でき、こ
れによって、処理を分散するときのオーバヘッドを算出
できる。
The process of "TRANSITION" is "S
With the active state of "TEP" as input, "S"
Since the active state of "TEP" is output, as shown in FIG. 13, the active state 171 of STEP, TRANSITION
This can be defined by the processing 172 and the active state 173 of STEP, and thus the overhead when distributing the processing can be calculated.

【0079】また、「STEP」内の「ACTION」
の処理の実行/非実行は、自STEPの活性状態から得
られるから、図14に示すように、STEPの活性状態
181、STEP内ACTION処理182で定義で
き、これによって、処理を分散するときのオーバヘッド
を算出できる。
In addition, "ACTION" in "STEP"
Since the execution / non-execution of the process of is obtained from the active state of its own STEP, it can be defined by the active state 181 of STEP and the ACTION process 182 in STEP as shown in FIG. The overhead can be calculated.

【0080】上述したように、ST言語、あるいはSF
Cのような順序性が重要であるプログラムにおいても、
このプログラムを小さな処理単位に分割することが可能
であり、このプログラムの小さな処理単位への分割によ
り負荷分散することが可能になる。
As described above, ST language or SF
Even in programs such as C where ordering is important,
This program can be divided into small processing units, and the division of this program into small processing units enables load distribution.

【0081】また、上記のように分割されたプログラム
の処理を、図15に示すように、さらに細分化すること
も可能である。すなわち、入力A、処理190、出力B
で定義される処理は、入力A、処理190−1(処理
1)、出力(A+B+α)および入力(A+B+α)、
処理190−2(処理2)、出力Bに分割できる。この
場合は、一般的には、細分化した処理間での情報の交換
に“入力+出力+テンポラリ利用の変数”だけが必要に
なる。
Further, the processing of the program divided as described above can be further subdivided as shown in FIG. That is, input A, processing 190, output B
The processing defined by is input A, processing 190-1 (processing 1), output (A + B + α) and input (A + B + α),
Process 190-2 (process 2) can be divided into output B. In this case, generally, only “input + output + temporary use variable” is necessary for exchanging information between the subdivided processes.

【0082】図16は、図1に示したプログラマブルコ
ントローラシステムにおけるプログラム状態テーブル1
02−1の詳細を示したものである。プログラム状態テ
ーブル102−1は、分割した単位でのプログラムを管
理するテーブルで、このプログラム状態テーブル102
−1の構成要素は、 1)タグ番号 2)ステータス 3)入力データ 4)出力データ 5)処理するコード体系 から成っている。
FIG. 16 shows a program status table 1 in the programmable controller system shown in FIG.
02-1 shows the details of No. 02-1. The program status table 102-1 is a table that manages programs in units of divisions.
The components of -1 consist of 1) tag number 2) status 3) input data 4) output data 5) code system to be processed.

【0083】ここで、「タグ番号」は、各「処理単位」
にユニークな番号である。
Here, "tag number" means "each processing unit"
Is a unique number.

【0084】また、「ステータス」は、“実行中”、
“依頼中”、“被依頼中”の3種類のステータスからな
り、ここで、“実行中”は、この「処理単位」をこのプ
ログラマブルコントローラ(PLC)で実行中であるこ
とを示し、“依頼中”は、この「処理単位」を他のプロ
グラマブルコントローラ(依頼先プログラマブルコント
ローラ)に依頼中であることを示し、“被依頼中”は、
この「処理単位」が他のプログラマブルコントローラ
(依頼元プログラマブルコントローラ)から依頼されて
いることを示す。
The "status" is "running",
It consists of three types of statuses, "Requesting" and "Requested", where "Running" indicates that this "processing unit" is being executed by this programmable controller (PLC). "Medium" indicates that this "processing unit" is being requested to another programmable controller (requested programmable controller), and "Requested" is
This "processing unit" is requested by another programmable controller (request source programmable controller).

【0085】なお、依頼先プログラマブルコントローラ
は依頼先ノードアドレスで指定され、依頼元プログラマ
ブルコントローラは依頼元ノードアドレスで指定され
る。
The request-destination programmable controller is designated by the request-destination node address, and the request-source programmable controller is designated by the request-source node address.

【0086】また、「入力データ」は、この「処理単
位」が必要とする入力データを示し、「出力データ」
は、この「処理単位」が必要とする出力データを示す。
"Input data" indicates input data required by this "processing unit", and "output data"
Indicates output data required by this “processing unit”.

【0087】また、「処理するコード体系」は、この
「処理単位」における実際の処理を記述している。
The "processing code system" describes the actual processing in this "processing unit".

【0088】すなわち、図16に示したプログラム状態
テーブル102−1において、タグ番号「1」の「処理
単位」は、“実行中”であり、その「処理単位」の「入
力データ」は、「A」および「B」、「出力データ」
は、「C」であることを示している。
That is, in the program state table 102-1 shown in FIG. 16, the "processing unit" of the tag number "1" is "in execution", and the "input data" of the "processing unit" is ""A" and "B", "output data"
Indicates that it is “C”.

【0089】また、タグ番号「2」の「処理単位」は、
“依頼中”であり、その「処理単位」の依頼先ノードア
ドレスは「ノードZ」であり、「入力データ」は「A」
および「G」であることを示している。
The "processing unit" of the tag number "2" is
“Requesting”, the requesting node address of the “processing unit” is “node Z”, and the “input data” is “A”.
And “G”.

【0090】また、タグ番号「3」の「処理単位」は、
“被依頼中”であり、その「処理単位」の依頼元ノード
アドレスは「ノードW」であることを示している。
The "processing unit" of the tag number "3" is
It indicates that "request is in progress" and the request source node address of the "processing unit" is "node W".

【0091】また、タグ番号「4」の「処理単位」は、
“実行中”であり、その「処理単位」の「入力データ」
は、「A」であることを示している。
The "processing unit" of the tag number "4" is
"Running", and the "input data" of the "processing unit"
Indicates that it is “A”.

【0092】また、タグ番号「5」の「処理単位」は、
“依頼中”であり、その「処理単位」の依頼先ノードア
ドレスは「ノードL」であり、「出力データ」は「G」
および「V」であることを示している。
The "processing unit" of the tag number "5" is
“Requesting”, the requesting node address of the “processing unit” is “Node L”, and the “output data” is “G”.
And “V”.

【0093】図17は、図1に示したプログラマブルコ
ントローラシステムにおける共有データテーブル102
−2の詳細を示したものである。
FIG. 17 shows a shared data table 102 in the programmable controller system shown in FIG.
2 shows details of -2.

【0094】この共有データテーブル102−2は、プ
ログラマブルコントローラ間で共有する必要のあるデー
タを管理するテーブルである。この共有データテーブル
102−2の構成要素は、 1)データ 2)共有メモリ内アドレス 3)関連プログラムタグ番号 から成っている。
The shared data table 102-2 is a table for managing data that needs to be shared between programmable controllers. The components of the shared data table 102-2 are composed of 1) data 2) shared memory address 3) related program tag number.

【0095】ここで、「データ」には共有するデータが
記述される。また、「共有メモリ内アドレス」には、共
有するデータの共有メモリにおけるアドレスが記述され
る。また、「関連プログラムタグ番号」にはこのデータ
を利用しているプログラムのタグ番号が記述される。
Here, data to be shared is described in "data". In the “shared memory address”, the address of the shared data in the shared memory is described. Also, in the "related program tag number", the tag number of the program using this data is described.

【0096】すなわち、図17に示す共有データテーブ
ル102−2は、図16に示したプログラム状態テーブ
ル102−1に関連して示したもので、図16に示した
プログラム状態テーブル102−1においては、タグ番
号「2」およびタグ番号「5」の「処理単位」が、“依
頼中”であるので、この“依頼中”の「処理単位」に関
連する入出力データおよびタグ番号が記述される。
That is, the shared data table 102-2 shown in FIG. 17 is shown in relation to the program state table 102-1 shown in FIG. 16, and in the program state table 102-1 shown in FIG. Since the “processing unit” of the tag number “2” and the tag number “5” is “requesting”, the input / output data and the tag number related to the “processing unit” of the “requesting” are described. .

【0097】具体的には、この“依頼中”の「処理単
位」に関連する入出力データは、図16に示したように
データ「A」、「G」、「V」であるので、このデータ
「A」、「G」、「V」に対応して、その「共有メモリ
内アドレス」および「関連プログラムタグ番号」が記述
される。
Specifically, since the input / output data related to the "processing unit" of "requesting" is the data "A", "G", "V" as shown in FIG. The "shared memory address" and the "related program tag number" are described corresponding to the data "A", "G", and "V".

【0098】すなわち、図17に示す共有データテーブ
ル102−2には、データ「A」に対応して、その共有
メモリ内アドレス「0121」および関連プログラムタ
グ番号「2」が記述され、データ「G」に対応して、そ
の共有メモリ内アドレス「0200」および関連プログ
ラムタグ番号「2」および「5」が記述され、データ
「V」に対応して、その共有メモリ内アドレス「020
1」および関連プログラムタグ番号「5」が記述され
る。
That is, in the shared data table 102-2 shown in FIG. 17, the address "0121" in the shared memory and the associated program tag number "2" are described in correspondence with the data "A", and the data "G". "0200" in the shared memory and the related program tag numbers "2" and "5" are described corresponding to ".", And the address in the shared memory "020" corresponding to the data "V".
1 ”and the related program tag number“ 5 ”are described.

【0099】なお、あるプログラマブルコントローラ
(PLC)から他のプログラマブルコントローラ(PL
C)に対して処理を依頼するときは、図16に示したプ
ログラム状態テーブル102−1の「処理するコード体
系」において書換えられる。
It should be noted that from one programmable controller (PLC) to another programmable controller (PL
When requesting the processing to C), it is rewritten in the "processing code system" of the program state table 102-1 shown in FIG.

【0100】例えば、図16に示したプログラム状態テ
ーブル102−1において、タグ番号「1」の処理を他
のプログラマブルコントローラ(PLC)に依頼する場
合は、入力データ「A」および「B」と出力データ
「C」を示す部分が「処理するコード体系」の中で書換
えられる。
For example, in the program state table 102-1 shown in FIG. 16, when requesting the processing of the tag number "1" to another programmable controller (PLC), input data "A" and "B" are output. The part indicating the data “C” is rewritten in the “code system to be processed”.

【0101】図18は、図1に示したプログラマブルコ
ントローラシステムにおける処理の依頼元のプログラマ
ブルコントローラ(PLC)の動作をフローチャートで
示したものである。
FIG. 18 is a flowchart showing the operation of the programmable controller (PLC) that is the request source of the processing in the programmable controller system shown in FIG.

【0102】図18において、まず、図1に示したラン
ダムアクセスメモリ(RAM)102に格納されている
処理依頼可能フラグ102−3を調べる(ステップ40
1)。ここで、処理依頼可能フラグ102−3がonの
場合は、自PLCの命令実行時間からネットワーク内の
平均命令実行時間を減算した値を「負荷」として求める
(ステップ402)。
In FIG. 18, first, the process request enable flag 102-3 stored in the random access memory (RAM) 102 shown in FIG. 1 is checked (step 40).
1). Here, when the process requestable flag 102-3 is on, a value obtained by subtracting the average instruction execution time in the network from the instruction execution time of the own PLC is obtained as the "load" (step 402).

【0103】次に、ステップ402で求めた「負荷」が
大か否かの判断を行う(ステップ403)。この「負
荷」が大か否かの判断は、具体的には、ステップ402
で求めた「負荷」が正か負かを調べることにより行われ
る。
Next, it is judged whether or not the "load" obtained in step 402 is large (step 403). Specifically, the determination as to whether or not this “load” is large is step 402.
This is done by checking whether the "load" obtained in step 1 is positive or negative.

【0104】すなわち、ステップ402で求めた「負
荷」が正の場合は、「負荷」が大と判断し(ステップ4
03でyes)、負の場合は、「負荷」が大でないと判
断する(ステップ403でno)。
That is, when the "load" obtained in step 402 is positive, it is judged that the "load" is large (step 4
If YES, the load is judged not to be large (NO at step 403).

【0105】ここで、「負荷」が大でないと判断される
と(ステップ403でno)、このプログラマブルコン
トローラ(PLC)は処理を他のプログラマブルコント
ローラ(PLC)に依頼することなくこの処理を終了す
る。
If it is determined that the "load" is not large (no in step 403), this programmable controller (PLC) ends this processing without requesting the processing to another programmable controller (PLC). .

【0106】また、ステップ403で「負荷」が大と判
断されると、まず「依頼する処理」を「なし」、「オー
バヘッド時間」を「最大」に設定する(ステップ40
4)。次に、プログラム状態テーブル102−1の「ス
テータス」を調べ、このプログラマブルコントローラ
(PLC)が「処理単位」の実行中か否かを調べる(ス
テップ405)。
If the "load" is determined to be large in step 403, the "request processing" is set to "none" and the "overhead time" is set to "maximum" (step 40).
4). Next, the "status" of the program status table 102-1 is checked to see if this programmable controller (PLC) is executing the "processing unit" (step 405).

【0107】ここで、このプログラマブルコントローラ
(PLC)が「処理単位」の実行中以外の場合は後述す
るステップ413に進む。
If the programmable controller (PLC) is not executing the "processing unit", the process proceeds to step 413 which will be described later.

【0108】また、ステップ405で、このプログラマ
ブルコントローラ(PLC)が「処理単位」の実行中で
ある場合は、時間(time)を“0”にセットし(ス
テップ406)、データが共有データテーブル102−
2に登録されているか否かを調べる(ステップ40
7)。
If the programmable controller (PLC) is executing the "processing unit" in step 405, the time (time) is set to "0" (step 406), and the data is shared data table 102. −
Check whether it is registered in No. 2 (step 40
7).

【0109】ステップ407で、データが共有データテ
ーブル102−2に登録されていない場合は(ステップ
407でno)、共有データテーブル102−2に該当
データを登録し(ステップ408)、時間(time)
にΔtを加算した(ステップ409)後、ステップ41
0に進む。なお、ここで、Δtは1つのデータを共有す
るのにかかるオーバヘッドである。
In step 407, if the data is not registered in the shared data table 102-2 (no in step 407), the corresponding data is registered in the shared data table 102-2 (step 408), and time (time) is entered.
Is added to Δt (step 409), and then step 41
Go to 0. Here, Δt is an overhead required to share one data.

【0110】また、ステップ407で、データが共有デ
ータテーブル102−2に登録されている場合は(ステ
ップ407でyes)、ステップ408、409の処理
を行うことなく、ステップ410に進む。
When the data is registered in the shared data table 102-2 in step 407 (yes in step 407), the process proceeds to step 410 without performing the processes of steps 408 and 409.

【0111】ステップ410では、全ての入出力データ
について繰り返すかを調べ(ステップ410)、全ての
入出力データについて繰り返す場合は(ステップ410
でyes)、ステップ407に戻り、全ての入出力デー
タについて繰り返さない場合は(ステップ410でn
o)、時間(time)とオーバヘッド時間を比較し、
time<オーバヘッド時間が成立するかを調べる(ス
テップ411)。
In step 410, it is checked whether or not to repeat for all input / output data (step 410), and if to repeat for all input / output data (step 410).
Yes in step 410, the process returns to step 407, and if not repeated for all input / output data (step 410, n
o), comparing the time with the overhead time,
It is checked whether time <overhead time is satisfied (step 411).

【0112】ステップ411で、time<オーバヘッ
ド時間が成立すると判断された場合は(ステップ411
でyes)、依頼する処理を該当処理に設定するととも
にオーバヘッド時間を時間(time)に設定し(ステ
ップ412)、ステップ413に進む。
If it is determined in step 411 that time <overhead time is satisfied (step 411
Yes), the requested process is set to the corresponding process, and the overhead time is set to time (time) (step 412), and the process proceeds to step 413.

【0113】なお、ステップ411で、time<オー
バヘッド時間が成立しないと判断された場合は(ステッ
プ411でno)、ステップ412の処理を行うことな
くステップ413に進む。
If it is determined in step 411 that time <overhead time is not satisfied (no in step 411), the process proceeds to step 413 without performing the process of step 412.

【0114】ステップ413では、処理単位分繰り返す
かを調べ、処理単位分繰り返す場合は(ステップ413
でyes)、ステップ405に戻り、処理単位分繰り返
さない場合は(ステップ413でno)、次に、依頼す
る処理が「なし」を調べる(ステップ414)。ここ
で、依頼する処理が「なし」の場合は(ステップ414
でyes)、処理可能フラグをoffにし(ステップ4
18)、この処理を終了する。
At step 413, it is checked whether the processing unit is repeated. If the processing unit is repeated (step 413).
Yes), the process returns to step 405, and if the processing unit is not repeated (no in step 413), then the requested process is checked for "none" (step 414). If the requested process is "none" (step 414)
Yes), and the processable flag is turned off (step 4
18) and this process ends.

【0115】また、ステップ414で、依頼する処理が
「なし」でないと判断された場合は(ステップ414で
no)、依頼先PLCをネットワーク内で一番負荷の少
ないPLCに設定し(ステップ415)、処理コード本
体の中の入出力に対応するコードを、依頼先PLCに送
信する(ステップ416)。
If it is determined in step 414 that the requested process is not "none" (no in step 414), the requested PLC is set to the least loaded PLC in the network (step 415). The code corresponding to the input / output in the processing code body is transmitted to the requested PLC (step 416).

【0116】そして、プログラム状態テーブル102−
1の「ステータス」を“依頼中”に設定し、この処理を
終了する。
Then, the program status table 102-
The "status" of 1 is set to "requesting", and this processing ends.

【0117】図19は、図1に示したプログラマブルコ
ントローラシステムにおける処理の依頼先のプログラマ
ブルコントローラ(PLC)の動作をフローチャートで
示したものである。すなわち、処理の依頼先のプログラ
マブルコントローラ(PLC)においては、依頼された
処理をプログラム状態テーブル102−1に登録する
(ステップ421)だけでこの処理を終了する。
FIG. 19 is a flow chart showing the operation of the programmable controller (PLC) to which the process is requested in the programmable controller system shown in FIG. That is, in the programmable controller (PLC) to which the process is requested, the requested process is simply registered in the program status table 102-1 (step 421), and this process is terminated.

【0118】[0118]

【発明の効果】以上説明したようにこの発明によれば、
ネットワークを介して複数台のプログラマブルコントロ
ーラを接続して構成したプログラマブルコントローラシ
ステムにおける負荷分散方法において、各プログラマブ
ルコントローラは自己の負荷をそれぞれ算出し、該算出
した負荷に対応して自己の処理の少なくとも一部を他の
プログラマブルコントローラに依頼するように構成した
ので、各プログラマブルコントローラの負荷状態に応じ
て各プログラマブルコントローラの負荷を自動的に分散
制御できるようようにしたプログラマブルコントローラ
システムにおける負荷分散装置および方法を提供するこ
とができるという効果を奏する。
As described above, according to the present invention,
In a load distribution method in a programmable controller system configured by connecting a plurality of programmable controllers via a network, each programmable controller calculates its own load, and at least one of its own processes corresponding to the calculated load. Since a part is configured to request another programmable controller, a load distribution device and method in a programmable controller system that can automatically distribute and control the load of each programmable controller according to the load state of each programmable controller. There is an effect that it can be provided.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明に係わる負荷分散装置および方法を適
用して構成したプログラマブルコントローラシステムの
一実施例の概略構成を示すブロック図。
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of a programmable controller system configured by applying a load balancing apparatus and method according to the present invention.

【図2】2台のプログラマブルコントローラを高速ネッ
トワークに接続したプログラマブルコントローラシステ
ムを示すブロック図。
FIG. 2 is a block diagram showing a programmable controller system in which two programmable controllers are connected to a high speed network.

【図3】図2に示したプログラマブルコントローラシス
テムにおいて、プログラマブルコントローラ1のラダー
プログラムの実行処理の負荷が非常に大きく、プログラ
マブルコントローラ2のラダープログラムの実行処理の
負荷が非常に小さい場合を示す図。
3 is a diagram showing a case where the load of execution processing of a ladder program of the programmable controller 1 is very large and the load of execution processing of a ladder program of the programmable controller 2 is very small in the programmable controller system shown in FIG.

【図4】図3に示した状態において、処理Aをプログラ
マブルコントローラ1からプログラマブルコントローラ
2に依頼した場合のプログラマブルコントローラ1およ
びプログラマブルコントローラ2による処理プログラム
を示した図。
FIG. 4 is a view showing a processing program by the programmable controller 1 and the programmable controller 2 when the programmable controller 1 requests the programmable controller 2 for processing A in the state shown in FIG. 3;

【図5】複数台のプログラマブルコントローラを高速ネ
ットワークに接続したプログラマブルコントローラシス
テムを示すブロック図。
FIG. 5 is a block diagram showing a programmable controller system in which a plurality of programmable controllers are connected to a high speed network.

【図6】この発明による複数台のプログラマブルコント
ローラを高速ネットワークに接続したプログラマブルコ
ントローラシステムにおける動的な負荷分散を可能にす
るための構成を示した図。
FIG. 6 is a diagram showing a configuration for enabling dynamic load distribution in a programmable controller system in which a plurality of programmable controllers according to the present invention are connected to a high-speed network.

【図7】この発明による各プログラマブルコントローラ
(PLC)における処理依頼時の処理を示すフローチャ
ート。
FIG. 7 is a flowchart showing a process at the time of requesting a process in each programmable controller (PLC) according to the present invention.

【図8】ラダープログラムにおける分割された処理単位
を示す図。
FIG. 8 is a diagram showing divided processing units in a ladder program.

【図9】ST言語における「逐次実行」の処理単位への
分割を説明する図。
FIG. 9 is a diagram for explaining division into processing units of “sequential execution” in the ST language.

【図10】ST言語における「逐次実行」の分割された
処理単位を示す図。
FIG. 10 is a diagram showing a divided processing unit of “sequential execution” in the ST language.

【図11】ST言語における「判断文」の処理を説明す
る図。
FIG. 11 is a diagram illustrating processing of a “judgment sentence” in the ST language.

【図12】ST言語における「判断文」の分割された処
理単位を示す図。
FIG. 12 is a diagram showing divided processing units of a “judgment sentence” in the ST language.

【図13】SFCにおける「TRANSITION」の
処理の分割された処理単位を示す図。
FIG. 13 is a diagram showing a divided processing unit of “TRANSITION” processing in SFC.

【図14】SFCにおける「STEP」内の「ACTI
ON」の処理の分割された処理単位を示す図。
FIG. 14: “ACTI” in “STEP” in SFC
The figure which shows the divided process unit of the process of "ON".

【図15】分割されたプログラムの処理をさらに細分化
する処理を示す図。
FIG. 15 is a diagram showing a process of further dividing the process of the divided program.

【図16】図1に示したプログラム状態テーブルの詳細
を示した図。
16 is a diagram showing details of a program state table shown in FIG.

【図17】図1に示した共有データテーブルの詳細を示
した図。
17 is a diagram showing details of the shared data table shown in FIG. 1. FIG.

【図18】図1に示したこの発明の一実施例おける処理
の依頼元のプログラマブルコントローラ(PLC)の動
作を説明するフローチャート。
FIG. 18 is a flowchart for explaining the operation of the programmable controller (PLC) that is the request source of the processing in the embodiment of the present invention shown in FIG.

【図19】図1に示したこの発明の一実施例おける処理
の依頼先のプログラマブルコントローラ(PLC)の動
作を説明するフローチャート。
FIG. 19 is a flowchart for explaining the operation of the programmable controller (PLC) to which the process is requested in the embodiment of the present invention shown in FIG.

【符号の説明】[Explanation of symbols]

100−1〜100−n プログラマブルコントロー
ラ(PLC) 101 リードオンリィメモリ(ROM) 102 ランダムアクセスメモリ(RAM) 102−1 プログラム状態テーブル 102−2 共有データテーブル 102−3 処理依頼可能フラグ 103 入出力メモリ(I/Oメモリ) 104 中央演算処理装置(CPU) 105 ネットワークインターフェース(I/F) 106 内部バス 200 ネットワーク 300 ネットワーク内グローバルメモリ
100-1 to 100-n Programmable controller (PLC) 101 Read only memory (ROM) 102 Random access memory (RAM) 102-1 Program status table 102-2 Shared data table 102-3 Process requestable flag 103 Input / output memory ( I / O memory) 104 Central processing unit (CPU) 105 Network interface (I / F) 106 Internal bus 200 Network 300 Global memory in network

Claims (23)

【特許請求の範囲】[Claims] 【請求項1】 ネットワークを介して複数台のプログラ
マブルコントローラを接続して構成したプログラマブル
コントローラシステムにおける負荷分散装置において、 上記各プログラマブルコントローラは、 自己の負荷をそれぞれ算出する負荷算出手段と、 上記負荷算出手段により算出された負荷に対応して自己
の処理の少なくとも一部を他のプログラマブルコントロ
ーラに依頼する処理依頼手段と、 具備することを特徴とする負荷分散装置。
1. A load distribution device in a programmable controller system configured by connecting a plurality of programmable controllers via a network, wherein each programmable controller calculates its own load, and the load calculation device. A load distribution apparatus comprising: a processing requesting unit that requests another programmable controller to perform at least a part of its own processing in accordance with the load calculated by the unit.
【請求項2】 上記プログラマブルコントローラは、 分割可能なラダープログラムを実行し、 上記処理依頼手段は、 分割された上記ラダープログラムの一部の処理を他のプ
ログラマブルコントローラに依頼することを特徴とする
請求項1記載の負荷分散装置。
2. The programmable controller executes a divisible ladder program, and the processing requesting unit requests a part of the divided ladder program to be processed by another programmable controller. Item 1. A load balancer according to item 1.
【請求項3】 上記処理依頼手段は、 上記ラダープログラムの作成後で、かつシステムの非稼
働時に上記処理の依頼を行うことを特徴とする請求項2
記載の負荷分散装置。
3. The processing requesting means requests the processing after the ladder program is created and when the system is not operating.
The load balancer described.
【請求項4】 上記処理依頼手段は、 上記ラダープログラムの作成後で、かつシステムの動作
時に上記処理の依頼を行うことを特徴とする請求項2記
載の負荷分散装置。
4. The load balancer according to claim 2, wherein the processing requesting means requests the processing after the ladder program is created and when the system is in operation.
【請求項5】 上記複数台のプログラマブルコントロー
ラで共有され、 各プログラマブルコントローラの命令実行時間、 全てのプログラマブルコントローラの平均命令実行時
間、 負荷が最小のプログラマブルコントローラ、 を記憶する共有記憶手段を更に具備し、 上記処理依頼手段は、 上記処理の依頼に際して、上記共有記憶手段に記憶され
た負荷が最小のプログラマブルコントローラを処理依頼
先プログラマブルコントローラとして選択することを特
徴とする請求項1記載の負荷分散装置。
5. The shared storage means is further shared by the plurality of programmable controllers, and stores a command execution time of each programmable controller, an average command execution time of all programmable controllers, and a programmable controller with a minimum load. The load balancer according to claim 1, wherein the processing requesting means selects a programmable controller having a minimum load stored in the shared storage means as a processing request destination programmable controller when requesting the processing.
【請求項6】 上記処理依頼手段は、 上記処理の依頼に際して、上記共有記憶手段に記憶され
た各プログラマブルコントローラの命令実行時間を所定
の順番で調べ、最初に発見された上記平均命令実行時間
より短い命令実行時間のプログラマブルコントローラを
処理依頼先プログラマブルコントローラとして選択する
ことを特徴とする請求項5記載の負荷分散装置。
6. The processing requesting means, when requesting the processing, checks the instruction execution time of each programmable controller stored in the shared storage means in a predetermined order, and from the first found average instruction execution time. The load balancing apparatus according to claim 5, wherein a programmable controller having a short instruction execution time is selected as a process request destination programmable controller.
【請求項7】 上記処理依頼手段は、 上記処理の依頼に際して、他の全てのプログラマブルコ
ントローラに対して処理依頼を行えるかどうかを問い合
わせるメッセージを発行し、処理依頼を行える旨のレス
ポンスが返送されたプログラマブルコントローラを処理
依頼先プログラマブルコントローラとして選択すること
を特徴とする請求項5記載の負荷分散装置。
7. The processing request means, when requesting the processing, issues a message inquiring to all other programmable controllers whether or not the processing request can be made, and a response indicating that the processing request can be made is returned. The load balancer according to claim 5, wherein the programmable controller is selected as a processing request destination programmable controller.
【請求項8】 上記処理依頼手段は、 自己の処理の少なくとも一部を他のプログラマブルコン
トローラに依頼するに際して生じるオーバヘッドが最小
になる処理を選択して上記他のプログラマブルコントロ
ーラに依頼することを特徴とする請求項1記載の負荷分
散装置。
8. The process requesting means selects a process that minimizes the overhead generated when requesting at least a part of its own process to another programmable controller and requests the other programmable controller. The load balancer according to claim 1.
【請求項9】 上記処理依頼手段は、 上記処理依頼に際して上記プログラマブルコントローラ
で新たに共有する必要が生じるデータが最小の処理を選
択することを特徴とする請求項8記載の負荷分散装置。
9. The load balancer according to claim 8, wherein the processing requesting means selects a processing which requires a minimum amount of data to be newly shared by the programmable controller when the processing request is issued.
【請求項10】 上記処理依頼手段は、 自己の処理の少なくとも一部を他のプログラマブルコン
トローラに依頼するに際して該処理の依頼に係わる入力
および出力を記述するプログラムコードを書換えるプロ
グラムコード書換手段を具備することを特徴とする請求
項1記載の負荷分散装置。
10. The processing requesting means comprises a program code rewriting means for rewriting a program code describing an input and an output related to the request of the processing when requesting at least a part of its own processing to another programmable controller. The load balancer according to claim 1, wherein
【請求項11】 上記各プログラマブルコントローラ
は、 上記分割された処理単位でのラダープログラムを管理す
るプログラム状態テーブルを具備し、 上記複数台のプログラマブルコントローラは、 上記複数台のプログラマブルコントローラで共有するデ
ータを管理する共有データテーブルを具備し、 各プログラマブルコントローラにおける実際の処理は上
記プログラム状態テーブルを参照して実行し、 上記処理の依頼は上記共有データテーブルを参照して実
行することを特徴とする請求項2記載の負荷分散装置。
11. Each of the programmable controllers includes a program status table that manages a ladder program in the divided processing units, and the plurality of programmable controllers stores data shared by the plurality of programmable controllers. A shared data table to be managed is provided, and actual processing in each programmable controller is executed by referring to the program status table, and the request for the processing is executed by referring to the shared data table. 2. The load balancer according to 2.
【請求項12】 上記プログラム状態テーブルは、 各処理単位で各処理を識別するための識別情報、 各処理単位に対して、該処理単位が実行中であるか、該
処理単位が他のプログラマブルコントローラに対して依
頼中であるか、該処理単位が他のプログラマブルコント
ローラから依頼中であるかを示すステータス情報、 各処理単位が必要とする入力データを示す入力データ情
報、 各処理単位が必要とする出力データを示す出力データ情
報、 各処理単位における実際の処理の内容を記述するコード
情報、 を格納することを特徴とする請求項11記載の負荷分散
装置。
12. The program status table is identification information for identifying each process in each process unit, for each process unit, the process unit is being executed, or the process unit is another programmable controller. Status information indicating whether or not the processing unit is being requested by another programmable controller, input data information indicating input data required by each processing unit, each processing unit requires The load distribution apparatus according to claim 11, wherein output data information indicating output data, code information describing the content of actual processing in each processing unit, are stored.
【請求項13】 上記共有データテーブルは、 上記複数台のプログラマブルコントローラで共有するデ
ータ、 上記共有するデータのアドレス、 上記共有するデータを利用している処理を識別するため
の識別情報を格納することを特徴とする請求項11記載
の負荷分散装置。
13. The shared data table stores data shared by the plurality of programmable controllers, an address of the shared data, and identification information for identifying a process using the shared data. The load balancer according to claim 11, wherein:
【請求項14】 ネットワークを介して複数台のプログ
ラマブルコントローラを接続して構成したプログラマブ
ルコントローラシステムにおける負荷分散方法におい
て、 上記各プログラマブルコントローラは自己の負荷をそれ
ぞれ算出し、 該算出した負荷に対応して自己の処理の少なくとも一部
を他のプログラマブルコントローラに依頼することを特
徴とする負荷分散方法。
14. A load distribution method in a programmable controller system configured by connecting a plurality of programmable controllers via a network, wherein each programmable controller calculates its own load and corresponds to the calculated load. A load balancing method, wherein at least a part of self processing is requested to another programmable controller.
【請求項15】 上記プログラマブルコントローラは、 分割可能なラダープログラムを実行し、 上記処理の依頼は分割されたラダープログラムの一部の
処理を他のプログラマブルコントローラに依頼すること
により行われることを特徴とする請求項14載の負荷分
散方法。
15. The programmable controller executes a divisible ladder program, and the request for the processing is made by requesting a part of processing of the divided ladder program to another programmable controller. 15. The load balancing method according to claim 14.
【請求項16】 上記処理の依頼は、 上記ラダープログラムの作成後で、かつシステムの非稼
働時に行われることを特徴とする請求項15記載の負荷
分散方法。
16. The load balancing method according to claim 15, wherein the request for the processing is made after the ladder program is created and when the system is not operating.
【請求項17】 上記処理の依頼は、 上記ラダープログラムの作成後で、かつシステムの動作
時に行われることを特徴とする請求項15記載の負荷分
散方法。
17. The load balancing method according to claim 15, wherein the processing request is made after the ladder program is created and when the system is in operation.
【請求項18】 上記複数台のプログラマブルコントロ
ーラ間で、 各プログラマブルコントローラの命令実行時間、 全てのプログラマブルコントローラの平均命令実行時
間、 負荷が最小のプログラマブルコントローラ、 を共有して記憶し、 上記処理の依頼は、 上記共有して記憶された負荷が最小のプログラマブルコ
ントローラに対して行われることを特徴とする請求項1
4記載の負荷分散方法。
18. The plurality of programmable controllers share and store the instruction execution time of each programmable controller, the average instruction execution time of all programmable controllers, and the programmable controller with the smallest load, and request the processing described above. Is performed on the programmable controller with the least shared and stored load.
4. The load balancing method described in 4.
【請求項19】 上記処理の依頼は、 上記共有して記憶された各プログラマブルコントローラ
の命令実行時間を所定の順番で調べ、最初に発見された
上記平均命令実行時間より短い命令実行時間のプログラ
マブルコントローラを処理依頼先プログラマブルコント
ローラとして選択することを特徴とする請求項18記載
の負荷分散方法。
19. The request for the processing is to check the instruction execution times of the respective programmable controllers stored in common in a predetermined order, and the programmable controller having an instruction execution time shorter than the average instruction execution time found first. 19. The load balancing method according to claim 18, wherein is selected as a processing request destination programmable controller.
【請求項20】 上記処理の依頼は、 上記他の全てのプログラマブルコントローラに対して処
理依頼を行えるかどうかを問い合わせるメッセージを発
行し、処理依頼を行える旨のレスポンスが返送されたプ
ログラマブルコントローラを処理依頼先プログラマブル
コントローラとして選択することを特徴とする請求項1
8記載の負荷分散方法。
20. The processing request issues a message inquiring to all the other programmable controllers whether or not the processing request can be made, and requests the programmable controller to which a response indicating that the processing request can be sent is returned. 2. The first programmable controller is selected as the first programmable controller.
8. The load balancing method according to item 8.
【請求項21】 上記処理の依頼は、 自己の処理の少なくとも一部を他のプログラマブルコン
トローラに依頼するに際して生じるオーバヘッドが最小
になる処理を選択して上記他のプログラマブルコントロ
ーラに依頼することを特徴とする請求項14記載の負荷
分散方法。
21. The request for the process is characterized in that a process that minimizes the overhead that occurs when requesting at least a part of its own process to another programmable controller is requested to the other programmable controller. The load balancing method according to claim 14.
【請求項22】 上記処理の依頼は、 上記処理依頼に際して上記プログラマブルコントローラ
で新たに共有する必要が生じるデータが最小の処理を選
択することを特徴とする請求項21記載の負荷分散方
法。
22. The load balancing method according to claim 21, wherein the request for the process selects a process that requires a minimum amount of data to be newly shared by the programmable controller when the process is requested.
【請求項23】 上記処理の依頼は、 自己の処理の少なくとも一部を他のプログラマブルコン
トローラに依頼するに際して該処理の依頼に係わる入力
および出力を記述するプログラムコードを書換えること
を特徴とする請求項14載の負荷分散方法。
23. The request for the processing is characterized in that, when requesting at least a part of its own processing to another programmable controller, a program code describing an input and an output relating to the request for the processing is rewritten. The load balancing method according to item 14.
JP24751795A 1995-09-26 1995-09-26 Load distribution apparatus and method Expired - Fee Related JP3368370B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24751795A JP3368370B2 (en) 1995-09-26 1995-09-26 Load distribution apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24751795A JP3368370B2 (en) 1995-09-26 1995-09-26 Load distribution apparatus and method

Publications (2)

Publication Number Publication Date
JPH0991011A true JPH0991011A (en) 1997-04-04
JP3368370B2 JP3368370B2 (en) 2003-01-20

Family

ID=17164669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24751795A Expired - Fee Related JP3368370B2 (en) 1995-09-26 1995-09-26 Load distribution apparatus and method

Country Status (1)

Country Link
JP (1) JP3368370B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001027701A1 (en) * 1999-10-15 2001-04-19 Omron Corporation Network system, control method, control apparatus, and multiprocessor
WO2007110953A1 (en) * 2006-03-29 2007-10-04 Mitsubishi Denki Kabushiki Kaisha Program creation supporting device, program creation supporting method, program for executing the method by a computer, and recording medium including the program recorded therein
JP2012118715A (en) * 2010-11-30 2012-06-21 Fuji Electric Co Ltd Plc system, development support device for the same, and program
JP2013246584A (en) * 2012-05-24 2013-12-09 Mitsubishi Electric Corp Control device, data output control unit, data input control unit, and control unit
JP2015215803A (en) * 2014-05-12 2015-12-03 株式会社東芝 Programmable controller and arithmetic processing system
WO2016076236A1 (en) * 2014-11-12 2016-05-19 株式会社東芝 Distributed control system, control device, control method, and program
JP6150956B1 (en) * 2016-02-15 2017-06-21 三菱電機株式会社 Load balancer

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001027701A1 (en) * 1999-10-15 2001-04-19 Omron Corporation Network system, control method, control apparatus, and multiprocessor
US7024463B1 (en) 1999-10-15 2006-04-04 Omron Corporation Network system, control method, control apparatus, and multiprocessor
WO2007110953A1 (en) * 2006-03-29 2007-10-04 Mitsubishi Denki Kabushiki Kaisha Program creation supporting device, program creation supporting method, program for executing the method by a computer, and recording medium including the program recorded therein
US8499277B2 (en) 2006-03-29 2013-07-30 Mitsubishi Electric Corporation Programming support apparatus, programming support method, program for causing computer to implement the method, and recording medium containing the program
JP2012118715A (en) * 2010-11-30 2012-06-21 Fuji Electric Co Ltd Plc system, development support device for the same, and program
JP2013246584A (en) * 2012-05-24 2013-12-09 Mitsubishi Electric Corp Control device, data output control unit, data input control unit, and control unit
JP2015215803A (en) * 2014-05-12 2015-12-03 株式会社東芝 Programmable controller and arithmetic processing system
WO2016076236A1 (en) * 2014-11-12 2016-05-19 株式会社東芝 Distributed control system, control device, control method, and program
JP2016095586A (en) * 2014-11-12 2016-05-26 株式会社東芝 Distribution control system, control device, control method, and program
CN106662856A (en) * 2014-11-12 2017-05-10 株式会社东芝 Distributed control system, control device, control method, and program
US10520935B2 (en) 2014-11-12 2019-12-31 Kabushiki Kaisha Toshiba Distributed control system, control device, control method, and computer program product
JP6150956B1 (en) * 2016-02-15 2017-06-21 三菱電機株式会社 Load balancer
WO2017141332A1 (en) * 2016-02-15 2017-08-24 三菱電機株式会社 Load balancing device

Also Published As

Publication number Publication date
JP3368370B2 (en) 2003-01-20

Similar Documents

Publication Publication Date Title
CN103593242B (en) Resource sharing control system based on Yarn frameworks
US5032975A (en) Controller for automatic assembling apparatus
US8214521B2 (en) Systems and methods for changing computational tasks on computation nodes to minimize processing time variation
CN100527119C (en) Information processing apparatus and information processing method
US6598108B1 (en) Integrated controller, integrated control system and transmission controller
JP7048638B2 (en) Control device
JP3368370B2 (en) Load distribution apparatus and method
EP3702852B1 (en) Control device, control method for control device, information processing program, and recording medium
JP2019096211A (en) Control unit, control method, and program
US5867383A (en) Programmable logic controller
WO2020075351A1 (en) Control device
US8090762B2 (en) Efficient super cluster implementation for solving connected problems in a distributed environment
US20240054002A1 (en) Vehicle-mounted computer, computer execution method, and computer program
JPH1139018A (en) Control system
EP4036670A1 (en) Control device
WO2007112315A1 (en) System and method to allow non-deterministic execution in a process control system
JP7294912B2 (en) control system
CN112825027A (en) Method for configuring memory cells of a computing unit
JP6857153B2 (en) Control device
JP2004199528A (en) Monitor control system
US7337095B2 (en) Method for planning and/or configuring a project
JPH08185377A (en) Distributed computer system
WO2018061537A1 (en) Control unit, data refreshing method, data refreshing program
WO2022049885A1 (en) Control device
JP7413169B2 (en) control device

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20021002

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071115

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081115

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081115

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091115

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101115

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101115

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111115

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121115

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121115

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131115

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees