JP3314885B2 - Software processing method in sequence controller system - Google Patents

Software processing method in sequence controller system

Info

Publication number
JP3314885B2
JP3314885B2 JP30495092A JP30495092A JP3314885B2 JP 3314885 B2 JP3314885 B2 JP 3314885B2 JP 30495092 A JP30495092 A JP 30495092A JP 30495092 A JP30495092 A JP 30495092A JP 3314885 B2 JP3314885 B2 JP 3314885B2
Authority
JP
Japan
Prior art keywords
message
input signal
cpu
output signal
devices
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
Application number
JP30495092A
Other languages
Japanese (ja)
Other versions
JPH06131017A (en
Inventor
敬誠 井上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP30495092A priority Critical patent/JP3314885B2/en
Publication of JPH06131017A publication Critical patent/JPH06131017A/en
Application granted granted Critical
Publication of JP3314885B2 publication Critical patent/JP3314885B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Hardware Redundancy (AREA)
  • Information Transfer Systems (AREA)
  • Computer And Data Communications (AREA)
  • Programmable Controllers (AREA)
  • Selective Calling Equipment (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、鉄鋼プラント、自動車
製造工場、等の製造現場に設置されるシーケンスコント
ローラシステムに関し、特にそのシステムの多重化、負
荷分散( 負荷の平準化) 、あるいはシーケンスコントロ
ーラの増設等を容易に実現できる、シーケンスコントロ
ーラシステムの物理構造に依存しないソフトウェアの処
理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sequence controller system installed at a manufacturing site such as a steel plant, an automobile manufacturing plant, etc., and more particularly, to multiplexing of the systems, load distribution (load leveling), or a sequence controller. The present invention relates to a software processing method that does not depend on the physical structure of a sequence controller system and that can easily realize an extension or the like.

【0002】[0002]

【従来の技術】従来、シーケンスコントローラシステム
の構成は、図10、図11のようになっている。図10
において、I/O装置6とI/O装置7は機械装置10
から信号を入力する。CPU装置4はその信号を通信線
2を経由して受信し、その信号に対してシーケンス処理
演算を行い、演算結果の信号を通信線2を経由してI/
O装置6とI/O装置7に送信する。I/O装置6とI
/O装置7はその信号を機械装置10に出力する。I/
O装置8とI/O装置9は機械装置10から信号を入力
する。CPU装置5はその信号を通信線3を経由して受
信し、その信号に対してシーケンス処理演算を行い、演
算結果の信号を通信線3を経由してI/O装置8とI/
O装置9に送信する。I/O装置8とI/O装置9はそ
の信号を機械装置10に出力する。図11において、I
/O装置17、I/O装置18、I/O装置19は機械
装置20から信号を入力する。IOP装置15はその信
号を通信線16を経由して受信する。CPU装置11、
CPU装置12、CPU装置13はバス信号線14を経
由してIOP装置15からその信号を入力する。CPU
装置11、CPU装置12、CPU装置13は同時に動
作し、その信号に対してシーケンス処理演算を行い、演
算結果の信号をバス信号線14を経由してIOP装置1
5に出力する。IOP装置15はその信号を通信線16
を経由してI/O装置17、I/O装置18、I/O装
置19に送信する。I/O装置17、I/O装置18、
I/O装置19はその信号を機械装置20に出力する。
2. Description of the Related Art Conventionally, the configuration of a sequence controller system is as shown in FIGS. FIG.
, The I / O device 6 and the I / O device 7
Input the signal from. The CPU device 4 receives the signal via the communication line 2, performs a sequence processing operation on the signal, and outputs a signal of the operation result via the communication line 2 to the I / O.
The data is transmitted to the O device 6 and the I / O device 7. I / O devices 6 and I
The / O device 7 outputs the signal to the mechanical device 10. I /
The O device 8 and the I / O device 9 receive signals from the mechanical device 10. The CPU device 5 receives the signal via the communication line 3, performs a sequence processing operation on the signal, and transmits a signal of the operation result to the I / O device 8 via the communication line 3.
It transmits to the O device 9. The I / O device 8 and the I / O device 9 output the signal to the mechanical device 10. In FIG.
The I / O device 17, the I / O device 18, and the I / O device 19 receive signals from the mechanical device 20. The IOP device 15 receives the signal via the communication line 16. CPU device 11,
The CPU device 12 and the CPU device 13 input the signal from the IOP device 15 via the bus signal line 14. CPU
The device 11, the CPU device 12, and the CPU device 13 operate simultaneously, perform a sequence processing operation on the signal, and transmit a signal of the operation result to the IOP device 1 via the bus signal line 14.
5 is output. The IOP device 15 transmits the signal to the communication line 16
To the I / O device 17, the I / O device 18, and the I / O device 19. I / O device 17, I / O device 18,
The I / O device 19 outputs the signal to the mechanical device 20.

【0003】[0003]

【発明が解決しようとしている課題】ところが、図10
のような従来のシステムでは、たとえばCPU装置4が
I/O装置8から直接信号を受信するようなことはでき
ない。もし受信しようとすればCPU装置4とCPU装
置5の間を別の通信線1で結び、I/O装置8−通信線
3−CPU装置5−通信線1−CPU装置4の経路で受
信することになり、余計な通信線を経由するために通信
効率が悪い。これは階層構成システムの欠点である。ま
た、図11のような従来のシステムでは、各CPU装置
は各I/O装置を共用することができ、またバス信号線
14を介して自由に交信することができる。このためC
PU装置の多重化を行うことが可能であるし、CPU装
置の負荷を分散することも可能であるが、IOP装置1
5が故障すれば、このシステムは全体が停止してしまう
という重大なウイークポイントがある。そこで、本発明
は、CPUの多重化、CPU間の負荷分散、システムの
拡張を容易にする方法を提供しようとするものである。
However, FIG.
In such a conventional system, for example, the CPU device 4 cannot directly receive a signal from the I / O device 8. If an attempt is made to receive, the CPU device 4 and the CPU device 5 are connected by another communication line 1 and received by the route of the I / O device 8-communication line 3-CPU device 5-communication line 1-CPU device 4. In other words, the communication efficiency is poor because the signal passes through an extra communication line. This is a drawback of the hierarchical system. Further, in the conventional system as shown in FIG. 11, each CPU device can share each I / O device, and can freely communicate via the bus signal line 14. For this reason C
Although it is possible to multiplex PU devices and to distribute the load on the CPU device, the IOP device 1
If 5 fails, there is a significant weak point that the system will stop working altogether. Accordingly, an object of the present invention is to provide a method that facilitates CPU multiplexing, load distribution between CPUs, and system expansion.

【0004】[0004]

【課題を解決するための手段】上記問題を解決するた
め、本発明による第1の手段は、複数のシーケンスプロ
グラムを内蔵し、論理演算を行う複数のCPU装置と、
制御対象である機械装置の信号のインタフェース処理を
行う複数のI/O装置とが通信線を介して結合され、メ
ッセージの交信は一斉放送通信で行い、前記各装置間で
定められた順序で各装置がトークンを授受するトークン
リング方式で前記メッセージの送信を行うようにしたシ
ーケンスコントローラシステムにおいて、全てのCPU
装置およびI/O装置が直接接続された1本の伝送ライ
ンと、各I/O装置に内蔵されたCPUと、全てのCP
U装置およびI/O装置に少なくとも1つ以上内蔵さ
れ、前記各I/O装置に属する入力信号メッセージおよ
び出力信号メッセージに含まれるデータを格納するデー
タ用バッファを有するソフトウェアモジュールと、前記
入力信号メッセージおよび前記出力信号メッセージに含
まれ、前記ソフトウェアモジュールが前記各メッセージ
の送信元を判断できる識別コードと、前記全てのCPU
装置およびI/O装置に内蔵され、1つのメッセージが
送信または受信されるとそのメッセージに対応する全て
のビットが1になるフラグビットから構成される入力信
号メッセージ用および出力信号メッセージ用同期フラグ
とを備え、各I/O装置は、前記入力信号メッセージ用
同期フラグが全て0になると前記機械装置から信号の入
力を開始し、各CPU装置は前記入力信号メッセージ用
同期フラグが全て1になると論理演算を開始し、各I/
O装置は、前記出力信号メッセージ用同期フラグが全て
1になると前記機械装置へ信号の出力を開始する。本発
明の第2手段は、第1の手段に、更に同一ソフトウェア
モジュールを複数のCPUに内蔵させ、各ソフトウェア
モジュールに対応する出力信号メッセージ用同期フラグ
が0である時のみ出力信号メッセージを送信する機能を
追加する。
In order to solve the above problems, a first means according to the present invention comprises a plurality of CPU devices which incorporate a plurality of sequence programs and perform a logical operation;
A plurality of I / O devices for performing interface processing of a signal of a mechanical device to be controlled are connected via a communication line, message communication is performed by broadcast communication, and each of the devices is transmitted in a predetermined order between the devices. In a sequence controller system in which a device transmits and receives the message in a token ring system in which a token is exchanged, all the CPUs
One transmission line to which the devices and I / O devices are directly connected, a CPU built in each I / O device, and all CPs
A software module which is built in at least one of a U device and an I / O device and has a data buffer for storing data included in an input signal message and an output signal message belonging to each of the I / O devices; And an identification code included in the output signal message so that the software module can determine the source of each message;
A synchronization flag for an input signal message and an output signal message, the flag being built in a device and an I / O device and comprising flag bits in which when a message is transmitted or received, all bits corresponding to the message become 1. Each I / O device starts inputting a signal from the mechanical device when the input signal message synchronization flag becomes all 0, and each CPU device outputs a logic signal when the input signal message synchronization flag becomes all 1 The operation is started and each I /
The O device starts outputting a signal to the mechanical device when the output signal message synchronization flag becomes all ones. The second means of the present invention further comprises the same software module incorporated in the plurality of CPUs in the first means, and transmits the output signal message only when the output signal message synchronization flag corresponding to each software module is 0. Add features.

【0005】[0005]

【作用】上記の手段により、I/O装置の通信線上の物
理的な位置が変更されても、CPU装置の設定変更やC
PU装置内のシーケンス処理プログラムの変更をする必
要がない。シーケンス処理プログラムが他のCPU装置
に移されたとしても、I/O装置の設定変更をする必要
がない。通信線上に新しいCPU装置やI/O装置が追
加されても、従来から存在するCPU装置の設定変更
や、CPU装置内のシーケンス処理プログラムの変更
や、I/O装置の設定変更をする必要がない。CPU装
置単位の多重化ではなく、シーケンス処理プログラム単
位の多重化が可能となり、きめ細かい多重化システムが
実現可能である。しかもシステム稼働開始後に必要なシ
ーケンスプログラムを多重化することも容易である。ま
た稼働開始後に負荷の大きい( 処理時間の長い) シーケ
ンス処理プログラムが発見された場合、そのプログラム
を負荷の軽いCPU装置にうつしても、他のプログラム
やハードウェアの設定を変更する必要がない。
According to the above-mentioned means, even if the physical position of the I / O device on the communication line is changed, the setting change of the CPU device and the change of the C device can be performed.
There is no need to change the sequence processing program in the PU device. Even if the sequence processing program is transferred to another CPU device, there is no need to change the setting of the I / O device. Even if a new CPU device or I / O device is added on the communication line, it is necessary to change the setting of the existing CPU device, change the sequence processing program in the CPU device, or change the setting of the I / O device. Absent. Instead of multiplexing in units of CPU devices, multiplexing in units of sequence processing programs becomes possible, and a detailed multiplexing system can be realized. In addition, it is easy to multiplex necessary sequence programs after the system operation starts. Further, if a sequence processing program with a large load (long processing time) is found after the start of operation, it is not necessary to change the settings of other programs or hardware even if the program is transferred to a CPU device with a light load.

【0006】[0006]

【実施例】以下、本発明の実施例を図に基づいて説明す
る。図1は、各CPU装置、各I/O装置を通信線に直
接接続した構成を持つ、シーケンスコントローラのシス
テム例で、おもにシステムの物理的な構成を説明する。
図1を参照すると、I/O1装置25は機械装置34か
らI1入力信号28を入力し、O1出力信号29を機械
装置34に出力する。I/O2装置26は機械装置34
からI2入力信号30を入力し、O2出力信号31を機
械装置34に出力する。I/O3装置27は機械装置3
4からI3入力信号32を入力し、O3出力信号33を
機械装置34に出力する。I/O1装置25、I/O2
装置26、I/O3装置27は、それぞれI1入力信号
28、I2入力信号30、I3入力信号32を通信線2
4を経由してCPU1装置21、CPU2装置22、C
PU3装置23に送信する。各CPU装置はその信号に
論理演算を行い、演算結果であるO1出力信号29、O
2出力信号31、O3出力信号33を、それぞれI/O
1装置25、I/O2装置26、I/O3装置27に通
信線24を経由して送信する。このように全CPU装置
と全I/O装置が一つの信号線に直接接続されているた
めシステム構成は、CPU装置間の交信はもとより、C
PU装置とI/O装置間の交信を自由に行うことや、各
CPU装置が複数のI/O装置を共用したり、CPU装
置を多重化したり、 あるいは既存のハードウェアとソフ
トウェアを変更することなく新たなCPU装置やI/O
装置を増設することができるようにするための前提とな
る。伝送ラインはシリアル通信線あるいはパラレル信号
バスでもよい。図2は、図1で示すシステムの論理的な
構成を説明するための図である。図2で用いられるソフ
トウェアモジュールについては図4で定義する。I/O
1装置25はI1入力信号を識別コードIM1とともに
入力信号メッセージ41の形でP1ソフトウェアモジュ
ール38に送信する。P1ソフトウェアモジュール38
はI1入力信号に対して論理演算を行い、その演算結果
としてのO1出力信号を識別コードOM1とともに出力
メッセージ42の形でI/O1装置25に送信する。I
/O2装置26はI2入力信号を識別コードIM2とと
もに入力信号メッセージ43の形でP2ソフトウェアモ
ジュール39に送信する。P2ソフトウェアモジュール
39はI2入力信号に対して論理演算を行い、その演算
結果としてのO2出力信号を識別コードOM2とともに
出力信号メッセージ44の形でI/O2装置26に送信
する。I/O3装置27はI3入力信号を識別コードI
M3とともに、入力信号メッセージ45の形でP3ソフ
トウェアモジュール40に送信する。P3ソフトウェア
モジュール40はI3入力信号に対して論理演算を行
い、その演算結果としてのO3出力信号を識別コードO
M3とともに出力メッセージ46の形でI/O3装置2
7に送信する。P1ソフトウェアモジュール38はCP
U1装置21内とCPU2装置22内に存在する。P2
ソフトウェアモジュール39はCPU1装置21、CP
U2装置22、およびCPU3装置23に存在する。P
3ソフトウェアモジュール40はCPU3装置23にの
み存在する。このように各ソフトウェアモジュールは複
数のCPU装置に重複して存在する。P1ソフトウェア
モジュール38はIM1入力信号メッセージ41のみに
応答する。P2ソフトウェアモジュール39はIM2入
力信号メッセージ43のみに応答する。P3ソフトウェ
アモジュール40はIM3入力信号メッセージ45のみ
に応答する。そしてソフトウェアモジュールとメッセー
ジの関係はその物理的容器であるCPU装置とは無関係
である。またI/O装置とCPU装置の間で交信される
メッセージは、物理的な通信アドレスを特定しない一斉
放送通信の形で行われる。従って、たとえばCPU1装
置21にあるP1ソフトウェアモジュール38をCPU
3装置23に移してもハードウェアやシステム構成に関
わるソフトウェアの変更をする必要がない。図3では,
I/O1装置25の機能構成を示す図である。I/O2
装置26と、I/O3装置27の機能構成もI/O1装
置と同様であるので、以下I/O1装置25についての
み説明する。図3において、25はI/O1装置、50
は通信インタフェース、51は制御プログラム、52は
マイクロプロセッサで制御プログラム51に従って動作
する。53はI/O装置からの入力信号および出力信号
の送出しのタイミングを判断するための同期フラグで、
図5で詳述する。55はソフトウェアモジュールで、I
B1入力信号バッファ56、OB1出力信号バッファ5
7およびシーケンスプログラム58とから構成されてい
る。次に動作について説明する。マイクロプロセッサ5
2は制御プログラム51に従って動作する。制御プログ
ラム51はI/O1装置25内の全体を制御するための
基本プログラムで、その詳細は図8の説明でふれる。マ
イクロプロセッサ52は入出力インターフェース54に
よって機械装置34からI1入力信号28を入力し、そ
の信号をIB1入力信号バッファ56に格納する。次に
IB1入力信号バッファ56内のI1入力信号を識別コ
ードIM1とともに入力信号メッセージ41の形で通信
インターフェース50によって通信線に送出する。逆
に、通信インターフェース50がO1出力信号と識別コ
ードOM1とを含む出力信号メッセージ42を受信する
と、マイクロプロセッサ52は出力信号メッセージ42
の中のO1出力信号をOB1出力信号バッファ57に格
納する。次にマイクロプロセッサはOB1出力信号バッ
ファ57の中のO1出力信号29を読み出し、入出力イ
ンターフェース54を介して機械装置34に出力する。
図4はCPU1装置21の機能構成を示す図である。C
PU2装置22、CPU3装置23の構成もCPU1装
置21と同じであるので、以下CPU1装置21につい
てのみ説明する。図4において、38、39は図2で説
明したように、CPU1装置に内蔵されているソフトウ
ェアモジュールで、その構成を、ソフトウェアモジュー
ル38についていうと、63はI1入力信号を格納する
IB1入力信号バッファ、64はO1出力信号を格納す
るOB1出力信号バッファ、65はシーケンスプログラ
ムである。次に動作について説明する。マイクロプロセ
ッサ70は制御プログラム71に従って動作する。制御
プログラム71はCPU1装置21内の全体を制御する
ための基本プログラムで、その詳細は図9の説明でふれ
る。通信インターフェース72が入力信号メッセージ4
1を受信すると、マイクロプロセッサ70は入力信号メ
ッセージ41の中のI1入力信号をP1ソフトウェアモ
ジュール38の中のIB1入力信号バッファ63に格納
する。通信インターフェース72が入力信号メッセージ
43を受信すると、マイクロプロセッサ70は入力信号
メッセージ43の中のI2入力信号をP2ソフトウェア
モジュール39の中のIB2入力信号バッファ66に格
納する。P1ソフトウェアモジュール38とP2ソフト
ウェアモジュール39が必要とするI1入力信号とI2
入力信号が揃うと、マイクロプロセッサ70はP1ソフ
トウェアモジュールのシーケンスプログラム65を実行
する。シーケンスプログラム65はI1入力信号に対す
る論理演算を行い、その演算結果であるO1出力信号を
OB1出力信号バッファ64に格納する。次にマイクロ
プロセッサ70はOB1出力信号バッファからO1信号
を読み出し、通信インターフェース72によって識別コ
ードOM1とともに出力信号メッセージ42の形で通信
線に送出する。続いてマイクロプロセッサ70はP2ソ
フトウェアモジュールのシーケンスプログラム68を実
行する。シーケンスプログラム68はI2入力信号に対
する論理演算を行い、その演算結果であるO2出力信号
をOB2出力信号バッファ67に格納する。次にマイク
ロプロセッサ70はOB2出力信号バッファからO2出
力信号を読み出し、通信インターフェース72によって
識別コードOM2とともに出力信号メッセージ44の形
で通信線に送出する。図5は図3の同期フラグ53や図
4の同期フラグ69の構成を示す図である。この同期フ
ラグは全てのCPU装置、全てのI/O装置が有し、同
じビット構成をしている。図5において、IF1フラグ
ビット77は、I/O1装置25がIM1入力信号メッ
セージ41を送信した時、および他の全ての装置(CP
U装置、I/O装置を含む)がIM1入力信号メッセー
ジ41を受信した時にそれぞれの装置の中で1になる。
IF2フラグビット78は、I/O2装置26がIM2
入力信号メッセージ43を送信した時、および他の全て
の装置がIM2入力信号メッセージ43を受信した時に
それぞれの装置の中で1になる。IF3フラグビット7
9は、I/O3装置27がIM3入力信号メッセージ4
5を送信した時、および他の全ての装置がIM3入力信
号メッセージ45を受信した時にそれぞれの装置の中で
1になる。OF1フラグビット80は、P1ソフトウェ
アモジュール38がOM1出力信号メッセージ42を送
信した時、および他の全ての装置がOM1出力信号メッ
セージ42を受信した時にそれぞれの装置の中で1にな
る。OF2フラグビット81は、P2ソフトウェアモジ
ュール39がOM2出力信号メッセージ44を送信した
時、および他の全ての装置がOM2出力信号メッセージ
44を受信した時にそれぞれの装置の中で1になる。O
F3フラグビット82は、P3ソフトウェアモジュール
40がOM3出力信号メッセージ46を送信した時、お
よび他の全ての装置がOM3出力信号メッセージ46を
受信した時にそれぞれの装置の中で1になる。同期フラ
グの働きについては図8、図9で詳述する。図6はI/
O装置とCPU装置がメッセージの送信権を獲得する順
番を示すもので、本発明ではトークンリング方式を用い
る。以下、最初I/O1装置が送信権を獲得していたと
して説明する。I/O1装置がIM1入力信号メッセー
ジを送信し終わると、続いて送信権をI/O2装置に譲
るためのトークンを送信する。I/O2装置はそのトー
クンを受信すると送信権を獲得したことになり、I/O
2装置はIM2入力信号メッセージを送信する。その送
信が終わると送信権をI/O3装置に譲るためのトーク
ンを送信する。以下同様にCPU1装置、CPU2装
置、CPU3装置と送信権が譲られていき、再びI/O
1装置が送信権を獲得する。このような動作がエンドレ
スで周期的に行われる。図7はシステム全体の動作をタ
イムチャートで表現したものである。図9の左端( 時間
的に古い方) から説明する。最初にI/O1装置25が
IM1入力信号メッセージ41を送信する。このメッセ
ージはI/O1装置以外の全装置が受信する。CPU1
装置21では図4のマイクロプロセッサ70はIM1入
力信号メッセージに応答するP1ソフトウェアモジュー
ル38が存在するので、受信したIM1入力信号メッセ
ージの中のI1入力信号をIB1入力信号バッファ63
に格納する。図2に示すように、CPU2装置22内に
もIM1入力信号メッセージに応答するP1ソフトウェ
アモジュール38が存在するため、CPU1装置21と
同様のことが起こる。つまりCPU2装置22のマイク
ロプロセッサは受信したIM1入力信号メッセージの中
のI1入力信号をP1ソフトウェアモジュールの入力信
号バッファに格納する。図2に示すようにCPU3装置
23内にはIM1入力信号メッセージに応答するP1ソ
フトウェアモジュールが存在しない。従ってCPU3装
置23内のマイクロプロセッサは受信したIM1入力信
号メッセージの中のI1入力信号は格納しない。次にI
/O2装置26がIM2入力信号メッセージ43を送信
する。このメッセージもI/O2装置以外の全装置が受
信する。図2に示すように各CPU装置の中にはIM2
入力信号メッセージに応答するP2ソフトウェアモジュ
ール39が存在するため、各CPU装置内のマイクロプ
ロセッサは受信したIM2入力信号メッセージの中のI
2入力信号をP2ソフトウェアモジュールの入力信号バ
ッファに格納する。次にI/O3装置がIM3入力信号
メッセージ45を送信する。このメッセージもI/O3
装置以外の全装置が受信する。図2に示すようにCPU
3装置23の中にはIM3入力信号メッセージに応答す
るP3ソフトウェアモジュールが存在するため、CPU
3装置23のマイクロプロセッサは受信したIM3入力
信号メッセージの中のI3入力信号をP3ソフトウェア
モジュールの入力信号バッファに格納する。CPU1装
置とCPU2装置の中にはIM3入力信号メッセージに
応答するプログラムが存在しないため、両CPU装置の
マイクロプロセッサは受信したIM3入力信号メッセー
ジの中のI3入力信号を格納しない。次に全I/O装置
はIM1入力信号メッセージ41、IM2入力信号メッ
セージ43、IM3入力信号メッセージ45の全メッセ
ージを送信完了すると一斉に機械装置からI1入力信号
86、I2入力信号87、I3入力信号88の各信号を
入力し、各I/O装置の入力信号バッファに格納する。
このとき入力した信号は次の周期で使用される。次に各
CPU装置ではIM1入力信号メッセージ41、IM2
入力信号メッセージ43、IM3入力信号メッセージ4
5の全メッセージを受信完了すると、各CPU装置のマ
イクロプロセッサはシーケンスプログラムの実行を一斉
に開始する。CPU1装置とCPU2装置では同一のシ
ーケンスプログラム65を同時に実行する(図89、9
0)。実行の結果CPU1装置はOM1出力信号メッセ
ージ42を送信する。しかし、CPU2装置はOM1出
力信号メッセージを送信しない。その理由は図6に示す
ようにCPU1装置の方が先に送信権を獲得し、OM1
出力信号メッセージを送信する(図の42)から、CP
U2装置はOM1出力信号メッセージを送信する必要が
ない。このあとCPU1装置とCPU2装置は同一のシ
ーケンスプログラム68の実行を開始する(図92、9
3)。ここでもしCPU1装置が故障していた場合はC
PU2装置がOM1メッセージをCPU1装置のかわり
に送信する、いわゆる多重化が容易に達成される。CP
U3装置はP3ソフトウェアモジュールの中のシーケン
スプログラムを実行しOM3出力信号メッセージを送信
する(図の46)。CPU3装置が続いてP2シーケン
スプログラムを実行する(図の94)。このP2シーケ
ンスプログラムの実行が終わった時、OM2出力信号メ
ッセージ44は他のCPU装置から送信されていないた
め、CPU3装置が送信する。この送信が終わった時C
PU1装置とCPU2装置ではまだP2シーケンスプロ
グラムを実行中であるが、この両CPU装置がOM2出
力信号メッセージ44を受信すると両CPU装置のマイ
クロプロセッサがP2シーケンスプログラムの実行を途
中で取りやめる。これが負荷の平準化の例である。最後
に全I/O装置はOM1出力信号メッセージ42、OM
2出力信号メッセージ44、OM3出力信号メッセージ
46の全メッセージを受信したということで、各I/O
装置の出力信号バッファの信号を機械装置に一斉に出力
する。その出力信号はO1出力信号98、O2出力信号
99、O3出力信号100である。以上で図1に示すシ
ーケンスコントローラシステムの1周期の動作が終わ
る。図8は図3に示すI/O1装置の制御プログラム5
1の処理内容を示す図である。図8において、処理内容
は処理1と処理2に分かれている。処理1は処理2に割
り込む形で実行される。処理1は通信インターフェース
が何かを受信した場合および何かを送信した場合に起動
される。処理2は処理1から起動される。まず、処理1
の内容を処理ステップの番号順に説明する。説明の中の
「n」は1、2、または3である。 101 処理1が起動されると、受信完了か送信完了か
を調べる。NOならば処理1は終わる。 102 トークンを受信したかどうかを調べる。 103 YESなら処理2を起動する。処理2はIMn
入力信号メッセージを送信する(ステップ117)。 104 IMn入力信号メッセージを受信または送信し
たかを調べる。 105 YESならIMn入力信号メッセージに対応す
るIFnフラグビットを1にする。 106 フラグビットIF1、IF2、IF3が全て1
がどうか調べる。 107 YESなら処理2を起動する。処理2は機械装
置から信号を入力する(ステップ120)。 108 OMn出力信号メッセージを受信したかどうか
を調べる。 109 YESならOFnフラグビットを1にする。 110 OMn出力信号メッセージが自分のI/O装置
で機械装置に出力すべきものであるかどうかを調べる。 111 YESならOMn出力信号メッセージの中のO
n出力信号をOBn出力信号バッファに格納する。 112 フラグビットOF1、OF2、OF3の全てが
1かどうか調べる。 113 YESなら処理2を起動する。処理2は機械装
置に信号を出力する(ステップ123)。次に処理2の
内容を説明する。 114 このI/O装置がスタートしたときに、最初に
機械装置からIn入力信号を入力し、それをIBn入力
信号バッファに格納する。 115 トークンを受信しているかどうかを調べる。 116 NOであれば処理1の103から起動されるま
で待つ。 117 YESであればIBn入力信号バッファからI
n入力信号を読み出し、それをIMn入力信号メッセー
ジの形で送信する。 119 フラグビットIF1、IF2、IF3が全て1
がどうか調べる。 118 NOであれば処理1の107から起動されるま
で待つ。 120 YESであれば114と同じ処理を行う。ここ
で入力された信号は次のサイクルで使用される。119
の目的は機械装置から信号を入力するタイミングを同期
化するためである。 121 フラグビットOF1、OF2、OF3の全てが
1かどうか調べる。 122 NOであれば処理1の113から起動されるま
で待つ。 123 YESであればOBn出力信号バッファのOn
信号を読み出し、そのOn信号を機械装置に出力する。
なお、121の目的は機械装置に信号を出力するタイミ
ングを同期化するためである。 124 次のサイクルの処理に備えて全ての同期フラグ
ビットを0にする。 図9は図4に示すCPU1装置の制御プログラム71の
処理内容を示す図である。図9において、処理内容は処
理1と処理2に分かれている。処理1は処理2に割り込
む形で実行される。処理1は通信インターフェースが何
かを受信した場合および何かを送信した場合に起動され
る。処理2は処理1から起動される。まず、処理1の内
容を説明する。以下図8と同様の方法で説明する。 125 処理1が起動されると、受信完了か送信完了か
を調べる。NOならば処理1は終わる。 126 IMn入力信号メッセージを受信したかを調べ
る。 127 YESならIMn入力信号メッセージに対応す
るIFnフラグビットを1にする。 128 IMn入力信号メッセージに応答すべきPnソ
フトウェアモジュールが自分のCPU装置内にあるかど
うかを調べる。 129 YESならIMn入力信号メッセージの中のI
n信号をPnソフトウェアモジュールのIBn入力信号
バッファに格納する。 130 フラグビットIF1、IF2、IF3が全て1
がどうか調べる。 131 YESなら処理2を起動する。処理2はプログ
ラムの実行を開始する。 132 トークンを受信しているかどうかを調べる。 133 YESなら処理2を起動する。処理2はプログ
ラムの実行結果であるOMn出力信号メッセージを送信
する。 134 OMnメッセージを受信または送信したかを調
べる。 135 YESならOFn同期フラグビットを1にす
る。 136 OFn同期フラグビットに対応するPnプログ
ラムが実行中かどうかを調べる。 137 YESであればPnプログラムを中断する。つ
まり処理2の143を強制的に終わらせる。 138 同期フラグビットOF1、OF2、OF3の全
てが1かどうか調べる。 139 YESなら処理2を起動する。次に処理2の内
容を説明する。 140 同期フラグビットIF1、IF2、IF3が全
て1かどうかを調べる。 141 NOなら処理1の131から起動されるまで待
つ。 142 いまから実行しようとするPnシーケンスプロ
グラムに対応するOFnフラグビットが1かどうかを調
べる。つまりPnシーケンスプログラムの処理結果であ
るOMn出力信号メッセージが他のCPU装置からすで
に送信されたかどうかを調べる。 143 NOならばPnシーケンスプログラムを実行す
る。 144 トークンを受信しているかどうかを調べる。 145 NOなら処理1の133から起動されるまで待
つ。 146 いま実行したPnシーケンスプログラムに対応
するOFnフラグビットが1かどうかを調べる。つまり
Pnシーケンスプログラムの処理結果であるOMn出力
信号メッセージが他のCPU装置からすでに送信された
かどうかを調べる。 147 NOならOMn出力信号メッセージを送信す
る。 148 このCPU装置内にある全プログラムを実行し
たかどうかを調べる。残りのプログラムがあれば処理2
の142にもどって実行する。 149 全てのプログラムの実行が終われば、同期フラ
グビットOF1、OF2、OF3の全てが1かどうか調
べる。 150 NOならば処理1の139が起動するまで待
つ。 151 YESなら全同期フラグビットを0にして、次
のサイクルに備える。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a system example of a sequence controller having a configuration in which each CPU device and each I / O device are directly connected to a communication line, and mainly describes a physical configuration of the system.
Referring to FIG. 1, an I / O1 device 25 receives an I1 input signal 28 from a mechanical device 34 and outputs an O1 output signal 29 to the mechanical device 34. The I / O2 device 26 is a mechanical device 34
Input the I2 input signal 30 and output the O2 output signal 31 to the mechanical device. The I / O3 device 27 is the mechanical device 3
4 to input an I3 input signal 32 and output an O3 output signal 33 to a mechanical device 34. I / O1 device 25, I / O2
The device 26 and the I / O3 device 27 transmit the I1 input signal 28, the I2 input signal 30, and the I3 input signal 32 to the communication line 2 respectively.
4, CPU1 device 21, CPU2 device 22, C
The data is transmitted to the PU3 device 23. Each CPU device performs a logical operation on the signal, and outputs O1 output signals 29 and O
2 output signal 31 and O3 output signal 33
The data is transmitted to the first device 25, the I / O2 device 26, and the I / O3 device 27 via the communication line 24. As described above, since all CPU devices and all I / O devices are directly connected to one signal line, the system configuration includes not only communication between CPU devices but also C
Free communication between PU devices and I / O devices, sharing of multiple I / O devices by each CPU device, multiplexing of CPU devices, or changing existing hardware and software New CPU device and I / O
This is a prerequisite to be able to add devices. The transmission line may be a serial communication line or a parallel signal bus. FIG. 2 is a diagram for explaining a logical configuration of the system shown in FIG. The software modules used in FIG. 2 are defined in FIG. I / O
One device 25 sends the I1 input signal together with the identification code IM1 to the P1 software module 38 in the form of an input signal message 41. P1 software module 38
Performs a logical operation on the I1 input signal, and transmits an O1 output signal as a result of the operation together with the identification code OM1 to the I / O1 device 25 in the form of an output message 42. I
The / O2 device 26 sends the I2 input signal together with the identification code IM2 to the P2 software module 39 in the form of an input signal message 43. The P2 software module 39 performs a logical operation on the I2 input signal, and transmits the O2 output signal as a result of the operation together with the identification code OM2 to the I / O2 device 26 in the form of an output signal message 44. The I / O3 device 27 converts the I3 input signal to an identification code I
Along with M3, an input signal message 45 is transmitted to the P3 software module 40. The P3 software module 40 performs a logical operation on the I3 input signal, and outputs the O3 output signal as the operation result as the identification code O.
I / O3 device 2 in the form of output message 46 with M3
7 P1 software module 38 is CP
It exists in the U1 device 21 and the CPU2 device 22. P2
The software module 39 includes the CPU 1 device 21 and the CP
It exists in the U2 device 22 and the CPU3 device 23. P
The 3 software module 40 exists only in the CPU 3 device 23. As described above, each software module exists in a plurality of CPU devices. P1 software module 38 responds to IM1 input signal messages 41 only. P2 software module 39 responds to IM2 input signal message 43 only. P3 software module 40 responds to IM3 input signal message 45 only. The relationship between the software module and the message is independent of the CPU device that is the physical container. A message exchanged between the I / O device and the CPU device is performed in the form of broadcast communication without specifying a physical communication address. Therefore, for example, the P1 software module 38 in the CPU 1
There is no need to change the hardware or software related to the system configuration even when transferring to the three devices 23. In FIG.
FIG. 2 is a diagram showing a functional configuration of an I / O1 device 25. I / O2
Since the functional configurations of the device 26 and the I / O3 device 27 are the same as those of the I / O1 device, only the I / O1 device 25 will be described below. In FIG. 3, 25 is an I / O1 device, 50
Is a communication interface, 51 is a control program, and 52 is a microprocessor that operates according to the control program 51. 53 is a synchronization flag for judging the timing of sending the input signal and the output signal from the I / O device,
This will be described in detail with reference to FIG. 55 is a software module, I
B1 input signal buffer 56, OB1 output signal buffer 5
7 and a sequence program 58. Next, the operation will be described. Microprocessor 5
2 operates according to the control program 51. The control program 51 is a basic program for controlling the entire inside of the I / O1 device 25, and its details will be described with reference to FIG. Microprocessor 52 receives I1 input signal 28 from machine 34 via input / output interface 54 and stores the signal in IB1 input signal buffer 56. Next, the I1 input signal in the IB1 input signal buffer 56 is transmitted to the communication line by the communication interface 50 in the form of the input signal message 41 together with the identification code IM1. Conversely, when the communication interface 50 receives the output signal message 42 including the O1 output signal and the identification code OM1, the microprocessor 52 outputs the output signal message 42.
Are stored in the OB1 output signal buffer 57. Next, the microprocessor reads the O1 output signal 29 in the OB1 output signal buffer 57 and outputs it to the mechanical device 34 via the input / output interface 54.
FIG. 4 is a diagram showing a functional configuration of the CPU 1 device 21. C
Since the configurations of the PU2 device 22 and the CPU3 device 23 are the same as those of the CPU1 device 21, only the CPU1 device 21 will be described below. In FIG. 4, reference numerals 38 and 39 denote software modules built in the CPU 1 as described with reference to FIG. 2. The configuration of the software module 38 is as follows. 63 is an IB1 input signal buffer for storing an I1 input signal. , 64 are an OB1 output signal buffer for storing the O1 output signal, and 65 is a sequence program. Next, the operation will be described. The microprocessor 70 operates according to the control program 71. The control program 71 is a basic program for controlling the whole of the inside of the CPU 1 device 21, and its details will be described in the description of FIG. Communication interface 72 receives input signal message 4
Upon receiving a 1, the microprocessor 70 stores the I1 input signal in the input signal message 41 in the IB1 input signal buffer 63 in the P1 software module 38. When the communication interface 72 receives the input signal message 43, the microprocessor 70 stores the I2 input signal in the input signal message 43 in the IB2 input signal buffer 66 in the P2 software module 39. I1 input signal and I2 required by P1 software module 38 and P2 software module 39
When the input signals are ready, the microprocessor 70 executes the sequence program 65 of the P1 software module. The sequence program 65 performs a logical operation on the I1 input signal, and stores the O1 output signal, which is the operation result, in the OB1 output signal buffer 64. Next, the microprocessor 70 reads the O1 signal from the OB1 output signal buffer, and sends the O1 signal together with the identification code OM1 to the communication line in the form of the output signal message 42 by the communication interface 72. Subsequently, the microprocessor 70 executes the sequence program 68 of the P2 software module. The sequence program 68 performs a logical operation on the I2 input signal, and stores the O2 output signal, which is the operation result, in the OB2 output signal buffer 67. Next, the microprocessor 70 reads the O2 output signal from the OB2 output signal buffer, and sends out the O2 output signal together with the identification code OM2 to the communication line in the form of the output signal message 44 by the communication interface 72. FIG. 5 is a diagram showing the configuration of the synchronization flag 53 of FIG. 3 and the synchronization flag 69 of FIG. This synchronization flag is possessed by all CPU devices and all I / O devices and has the same bit configuration. In FIG. 5, the IF1 flag bit 77 indicates when the I / O1 device 25 has transmitted the IM1 input signal message 41 and when all other devices (CP
U1 and I / O devices) receive an IM1 input signal message 41 and become 1 in each device.
IF2 flag bit 78 indicates that I / O2 device 26
Becomes 1 in each device when transmitting the input signal message 43 and when all other devices receive the IM2 input signal message 43. IF3 flag bit 7
9 indicates that the I / O3 device 27 sends the IM3 input signal message 4
5 in each device when it sends 5 and when all other devices receive the IM3 input signal message 45. The OF1 flag bit 80 will be 1 in each device when the P1 software module 38 sends the OM1 output signal message 42 and when all other devices receive the OM1 output signal message 42. The OF2 flag bit 81 becomes 1 in each device when the P2 software module 39 sends the OM2 output signal message 44 and when all other devices receive the OM2 output signal message 44. O
The F3 flag bit 82 becomes 1 in each device when the P3 software module 40 sends the OM3 output signal message 46 and when all other devices receive the OM3 output signal message 46. The operation of the synchronization flag will be described in detail with reference to FIGS. FIG.
This indicates the order in which the O device and the CPU device acquire the right to send a message. In the present invention, a token ring system is used. Hereinafter, a description will be given on the assumption that the I / O1 device has initially acquired the transmission right. When the I / O1 device finishes transmitting the IM1 input signal message, it subsequently sends a token for giving the transmission right to the I / O2 device. When the I / O2 device receives the token, it has acquired the transmission right,
The two devices send an IM2 input signal message. When the transmission is completed, a token for transferring the transmission right to the I / O3 device is transmitted. Similarly, the transmission right is transferred to the CPU 1, the CPU 2, and the CPU 3 in the same manner, and the I / O is performed again.
One device acquires the transmission right. Such an operation is performed endlessly and periodically. FIG. 7 is a time chart showing the operation of the entire system. The description starts from the left end of FIG. First, the I / O1 device 25 transmits the IM1 input signal message 41. This message is received by all devices except the I / O1 device. CPU1
In the device 21, the microprocessor 70 of FIG. 4 converts the I1 input signal in the received IM1 input signal message to the IB1 input signal buffer 63, because the P1 software module 38 is responsive to the IM1 input signal message.
To be stored. As shown in FIG. 2, the same thing as the CPU1 device 21 occurs because the P1 software module 38 that responds to the IM1 input signal message also exists in the CPU2 device 22. That is, the microprocessor of the CPU2 device 22 stores the I1 input signal in the received IM1 input signal message in the input signal buffer of the P1 software module. As shown in FIG. 2, there is no P1 software module in the CPU3 device 23 that responds to the IM1 input signal message. Therefore, the microprocessor in the CPU3 device 23 does not store the I1 input signal in the received IM1 input signal message. Then I
The / O2 device 26 sends an IM2 input signal message 43. This message is also received by all devices except the I / O2 device. As shown in FIG.
Due to the presence of the P2 software module 39 that responds to the input signal message, the microprocessor in each CPU unit will send the I2
2 Store the input signal in the input signal buffer of the P2 software module. Next, the I / O3 device transmits an IM3 input signal message 45. This message is also I / O3
All devices except the device receive. CPU as shown in FIG.
3 device 23 has a P3 software module that responds to the IM3 input signal message,
3 The microprocessor of the device 23 stores the I3 input signal in the received IM3 input signal message in the input signal buffer of the P3 software module. Since there is no program in the CPU1 device and the CPU2 device that responds to the IM3 input signal message, the microprocessors of both CPU devices do not store the I3 input signal in the received IM3 input signal message. Next, when the transmission of all the IM1 input signal message 41, the IM2 input signal message 43, and the IM3 input signal message 45 is completed, all the I / O devices simultaneously transmit the I1 input signal 86, the I2 input signal 87, the I3 input signal from the mechanical device. Each of the signals 88 is input and stored in an input signal buffer of each I / O device.
The signal input at this time is used in the next cycle. Next, in each CPU device, the IM1 input signal message 41, IM2
Input signal message 43, IM3 input signal message 4
Upon completion of receiving all the messages of No. 5, the microprocessors of the respective CPU units simultaneously start executing the sequence program. The CPU 1 device and the CPU 2 device simultaneously execute the same sequence program 65 (FIGS. 89 and 9).
0). As a result of the execution, the CPU1 device sends an OM1 output signal message 42. However, the CPU2 device does not send the OM1 output signal message. The reason is that as shown in FIG. 6, the CPU 1 acquires the transmission right first, and the OM 1
From the transmission of the output signal message (42 in the figure), the CP
The U2 device does not need to send an OM1 output signal message. Thereafter, the CPU1 device and the CPU2 device start executing the same sequence program 68 (FIGS. 92 and 9).
3). Here, if the CPU 1 device has failed, C
So-called multiplexing, in which the PU2 device transmits the OM1 message on behalf of the CPU1 device, is easily achieved. CP
The U3 device executes the sequence program in the P3 software module and sends an OM3 output signal message (46 in the figure). Subsequently, the CPU 3 executes the P2 sequence program (94 in the figure). When the execution of the P2 sequence program ends, the CPU3 device transmits the OM2 output signal message 44 because it has not been transmitted from another CPU device. When this transmission ends C
Although the PU1 device and the CPU2 device are still executing the P2 sequence program, when both CPU devices receive the OM2 output signal message 44, the microprocessors of both CPU devices stop executing the P2 sequence program halfway. This is an example of load leveling. Finally, all the I / O devices output the OM1 output signal message 42, OM
Since all of the 2 output signal messages 44 and the OM3 output signal message 46 have been received, each I / O
The signals of the output signal buffer of the device are simultaneously output to the mechanical device. The output signals are an O1 output signal 98, an O2 output signal 99, and an O3 output signal 100. Thus, one cycle of the operation of the sequence controller system shown in FIG. 1 is completed. FIG. 8 shows a control program 5 for the I / O1 device shown in FIG.
FIG. 3 is a diagram illustrating processing contents of No. 1; In FIG. 8, the processing content is divided into processing 1 and processing 2. The process 1 is executed in a manner interrupting the process 2. Process 1 is started when the communication interface receives something and sends something. Process 2 is started from process 1. First, processing 1
Will be described in the order of processing step numbers. “N” in the description is 1, 2, or 3. 101 When process 1 is started, it is checked whether reception is completed or transmission is completed. If NO, processing 1 ends. It checks whether a 102 token has been received. If YES, process 2 is started. Treatment 2 is IMn
An input signal message is transmitted (step 117). Check if 104 IMn input signal message was received or transmitted. If 105 YES, set the IFn flag bit corresponding to the IMn input signal message to 1. 106 Flag bits IF1, IF2, IF3 are all 1
Find out if If YES, process 2 is started. Process 2 receives a signal from a mechanical device (step 120). Check whether a 108 OMn output signal message has been received. 109 If YES, set the OFn flag bit to 1. Check to see if the 110OMn output signal message is to be output to the machine at your I / O device. 111 YES if O in OMn output signal message
The n output signal is stored in the OBn output signal buffer. 112 It is checked whether all of the flag bits OF1, OF2, OF3 are 1. If YES, process 2 is started. Process 2 outputs a signal to the mechanical device (step 123). Next, the content of the process 2 will be described. 114 When this I / O device starts, it first receives the In input signal from the mechanical device and stores it in the IBn input signal buffer. Check whether the token has been received. If NO, the process waits until the process 1 is started from 103. 117 If YES, the IBn input signal buffer
Read the n input signal and send it in IMn input signal message. 119 Flag bits IF1, IF2, IF3 are all 1
Find out if If NO in step 118, the process waits until the process 1 is started from 107. If YES, the same process as 114 is performed. The signal input here is used in the next cycle. 119
Is to synchronize the timing of inputting a signal from a mechanical device. 121 Check whether all of the flag bits OF1, OF2, OF3 are 1. If 122 is NO, the process waits until the process 1 is started from 113. 123 If YES, OBn output signal buffer On
Read the signal and output the On signal to the mechanical device.
The purpose of 121 is to synchronize the timing of outputting a signal to the mechanical device. 124 All synchronization flag bits are set to 0 in preparation for processing in the next cycle. FIG. 9 is a diagram showing the processing content of the control program 71 of the CPU 1 device shown in FIG. In FIG. 9, the processing contents are divided into processing 1 and processing 2. The process 1 is executed in a manner interrupting the process 2. Process 1 is started when the communication interface receives something and sends something. Process 2 is started from process 1. First, the contents of the process 1 will be described. Hereinafter, description will be made in the same manner as in FIG. 125 When process 1 is started, it is checked whether reception is completed or transmission is completed. If NO, processing 1 ends. Check to see if a 126 IMn input signal message has been received. If YES, set the IFn flag bit corresponding to the IMn input signal message to 1. Check if there is a Pn software module in your CPU device to respond to the 128 IMn input signal message. 129 If YES, then I in the IMn input signal message
Store the n signal in the IBn input signal buffer of the Pn software module. 130 Flag bits IF1, IF2, IF3 are all 1
Find out if If YES, the process 2 is started. Process 2 starts the execution of the program. Check if 132 token has been received. 133: If YES, start processing 2. Process 2 transmits an OMn output signal message, which is the execution result of the program. Check whether the 134 OMn message has been received or transmitted. 135 If YES, the OFn synchronization flag bit is set to 1. 136 It is checked whether the Pn program corresponding to the OFn synchronization flag bit is being executed. 137 If YES, the Pn program is interrupted. That is, 143 of process 2 is forcibly ended. 138 Check whether all of the synchronization flag bits OF1, OF2, OF3 are 1. 139 If YES, the process 2 is started. Next, the content of the process 2 will be described. 140 Check whether the synchronization flag bits IF1, IF2, IF3 are all 1; If NO, the process waits until the process is started from 131 of process 1. 142 It is checked whether the OFn flag bit corresponding to the Pn sequence program to be executed is 1 or not. That is, it is checked whether the OMn output signal message, which is the processing result of the Pn sequence program, has already been transmitted from another CPU device. 143 If NO, execute the Pn sequence program. Check to see if a 144 token has been received. If 145 NO, the process waits until it is started from 133 in process 1. 146 It is checked whether the OFn flag bit corresponding to the currently executed Pn sequence program is “1”. That is, it is checked whether the OMn output signal message, which is the processing result of the Pn sequence program, has already been transmitted from another CPU device. If 147 NO, send an OMn output signal message. 148 It is checked whether all the programs in the CPU device have been executed. Process 2 if there are remaining programs
Return to step 142 and execute. 149 When all the programs have been executed, it is checked whether or not all of the synchronization flag bits OF1, OF2, OF3 are 1. If NO, the process waits until 139 of process 1 is activated. 151 If YES, set all synchronization flag bits to 0 to prepare for the next cycle.

【0007】[0007]

【発明の効果】以上説明したように、従来のシーケンス
コントローラシステムでは、ソフトウェアがシステムの
物理構造に依存していたため、CPU装置の多重化の困
難さ、CPU装置間の負荷の平準化の困難さ、システム
の拡張に伴うソフトウェアの変更の困難さ等があった
が、本発明により、ソフトウェアをシステムの物理構造
から独立させることによって、ソフトウェアの柔軟性を
増し、それらの困難さを解消し、今後必要性が高まるフ
レキスブルなシステムを容易に実現することが可能にな
る。すなわち、I/O装置の通信線上の物理的な位置が
変更されても、CPU装置の設定変更やCPU装置内の
シーケンス処理プログラムの変更をする必要がない。シ
ーケンス処理プログラムが他のCPU装置に移されたと
しても、I/O装置の設定変更をする必要がない。通信
線上に新しいCPU装置やI/O装置が追加されても、
従来から存在するCPU装置の設定変更や、CPU装置
内のシーケンス処理プログラムの変更や、I/O装置の
設定変更をする必要がない。CPU装置単位の多重化で
はなく、シーケンス処理プログラム単位の多重化が可能
となり、きめ細かい多重化システムが実現可能である。
しかもシステム稼働開始後に必要なシーケンスプログラ
ムを多重化することも容易である。また稼働開始後に負
荷の大きい( 処理時間の長い) シーケンス処理プログラ
ムが発見された場合、そのプログラムを負荷の軽いCP
U装置にうつしても、他のプログラムやハードウェアの
設定を変更する必要がない。
As described above, in the conventional sequence controller system, since the software depends on the physical structure of the system, it is difficult to multiplex the CPU devices and to level the load between the CPU devices. However, the present invention has made it difficult to change software due to the expansion of the system. However, by making the software independent of the physical structure of the system, the flexibility of the software has been increased, and these difficulties have been solved. Flexible systems with increasing needs can be easily realized. That is, even if the physical position of the I / O device on the communication line is changed, there is no need to change the setting of the CPU device or change the sequence processing program in the CPU device. Even if the sequence processing program is transferred to another CPU device, there is no need to change the setting of the I / O device. Even if a new CPU device or I / O device is added on the communication line,
There is no need to change the settings of the CPU device, change the sequence processing program in the CPU device, or change the settings of the I / O device, which exist conventionally. Instead of multiplexing in units of CPU devices, multiplexing in units of sequence processing programs becomes possible, and a detailed multiplexing system can be realized.
In addition, it is easy to multiplex necessary sequence programs after the system operation starts. If a sequence processing program with a large load (long processing time) is found after the start of operation,
There is no need to change the settings of other programs or hardware even if you transfer to the U device.

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

【図1】本発明によるシーケンスコントローラシステム
の実施例で、物理的構成を示す図。
FIG. 1 is a diagram showing a physical configuration in an embodiment of a sequence controller system according to the present invention.

【図2】本発明によるシーケンスコントローラシステム
の実施例で、論理的構成を示す図。
FIG. 2 is a diagram showing a logical configuration in an embodiment of a sequence controller system according to the present invention.

【図3】本発明によるI/O装置の構成図。FIG. 3 is a configuration diagram of an I / O device according to the present invention.

【図4】本発明によるCPU装置の構成図。FIG. 4 is a configuration diagram of a CPU device according to the present invention.

【図5】本発明によるCPU装置、I/O装置間の同期
をとるための同期フラグの構成図。
FIG. 5 is a configuration diagram of a synchronization flag for establishing synchronization between a CPU device and an I / O device according to the present invention.

【図6】CPU装置、I/O装置の送信権の巡回順序を
示す図。
FIG. 6 is a diagram showing a circulation order of transmission rights of a CPU device and an I / O device.

【図7】本発明によるシステム全体の動作を示す図。FIG. 7 is a diagram showing the operation of the entire system according to the present invention.

【図8】本発明によるI/O装置の制御プログラムの処
理を示す図。
FIG. 8 is a diagram showing processing of a control program for an I / O device according to the present invention.

【図9】本発明によるCPU装置の制御プログラムの処
理を示す図。
FIG. 9 is a diagram showing processing of a control program of the CPU device according to the present invention.

【図10】従来のシーケンスコントローラシステムの構
成例を示す図。
FIG. 10 is a diagram showing a configuration example of a conventional sequence controller system.

【図11】従来のシーケンスコントローラシステムの構
成例を示す図。
FIG. 11 is a diagram showing a configuration example of a conventional sequence controller system.

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

21 CPU1装置 22 CPU2装置 23 CPU3装置 24 通信線 25 I/O1装置 26 I/O2装置 27 I/O3装置 34 機械装置 38 P1ソフトウェアモジュール 39 P2ソフトウェアモジュール 40 P3ソフトウェアモジュール 41、43、45 入力信号メッセージ 42、44、46 出力信号メッセージ 50、72 通信インタフェース 51、71 制御プログラム 52、70 マイクロプロセッサ 53、69 同期フラグ 54 ソフトウェアモジュール 21 CPU1 device 22 CPU2 device 23 CPU3 device 24 Communication line 25 I / O1 device 26 I / O2 device 27 I / O3 device 34 Machine device 38 P1 software module 39 P2 software module 40 P3 software module 41, 43, 45 Input signal message 42, 44, 46 Output signal message 50, 72 Communication interface 51, 71 Control program 52, 70 Microprocessor 53, 69 Synchronization flag 54 Software module

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のシーケンスプログラムを内蔵し、
論理演算を行う複数のCPU装置と、制御対象である機
械装置の信号のインタフェース処理を行う複数のI/O
装置とが通信線を介して結合され、メッセージの交信は
一斉放送通信で行い、前記各装置間で定められた順序で
各装置がトークンを授受するトークンリング方式で前記
メッセージの送信を行うようにしたシーケンスコントロ
ーラシステムにおいて、 全てのCPU装置およびI/O装置が直接接続された1
本の伝送ラインと、 各I/O装置に内蔵されたCPUと、 全てのCPU装置およびI/O装置に少なくとも1つ以
上内蔵され、前記各I/O装置に属する入力信号メッセ
ージおよび出力信号メッセージに含まれるデータを格納
するデータ用バッファを有するソフトウェアモジュール
と、 前記入力信号メッセージおよび前記出力信号メッセージ
に含まれ、前記ソフトウェアモジュールが前記各メッセ
ージの送信元を判断できる識別コードと、 前記全てのCPU装置およびI/O装置に内蔵され、1
つのメッセージが送信または受信されるとそのメッセー
ジに対応する全てのビットが1になるフラグビットから
構成される入力信号メッセージ用および出力信号メッセ
ージ用同期フラグとを備え、 各I/O装置は、前記入力信号メッセージ用同期フラグ
が全て0になると前記機械装置から信号の入力を開始
し、 各CPU装置は前記入力信号メッセージ用同期フラグが
全て1になると論理演算を開始し、 各I/O装置は、前記出力信号メッセージ用同期フラグ
が全て1になると前記機械装置へ信号の出力を開始する
ようにしたシーケンスコントローラシステムにおけるソ
フトウェア処理方法。
A plurality of sequence programs;
A plurality of CPU devices for performing a logical operation and a plurality of I / Os for performing interface processing of signals of a mechanical device to be controlled
The device is connected via a communication line, message communication is performed by broadcast communication, and each device transmits the message in a token ring system in which tokens are exchanged in a predetermined order between the devices. In this sequence controller system, all CPU devices and I / O devices are directly connected.
A transmission line, a CPU built in each I / O device, and at least one or more input signal messages and output signal messages that are built in at least one of all CPU devices and I / O devices and belong to each of the I / O devices. A software module having a data buffer for storing data included in the input signal message and the output signal message, and an identification code that enables the software module to determine the source of each message; and all the CPUs Device and I / O device,
When one message is transmitted or received, all the bits corresponding to the message are set to 1 and a synchronization flag for an input signal message and a synchronization flag for an output signal message are provided. When the synchronization flag for the input signal message becomes all 0, the input of the signal from the mechanical device is started. When the synchronization flag for the input signal message becomes all 1, the CPU starts the logical operation. A software processing method in a sequence controller system, wherein the output of a signal to the mechanical device is started when all of the output signal message synchronization flags become 1.
【請求項2】 同一ソフトウェアモジュールを複数のC
PUに内蔵させ、各ソフトウェアモジュールに対応する
出力信号メッセージ用同期フラグが0である時のみ出力
信号メッセージを送信するようにした請求項1記載のシ
ーケンスコントローラシステムにおけるソフトウェア処
理方法。
2. The same software module is connected to a plurality of C
2. The software processing method in the sequence controller system according to claim 1, wherein the output signal message is transmitted only when the output signal message synchronization flag corresponding to each software module is 0, which is built in the PU.
JP30495092A 1992-10-15 1992-10-15 Software processing method in sequence controller system Expired - Fee Related JP3314885B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30495092A JP3314885B2 (en) 1992-10-15 1992-10-15 Software processing method in sequence controller system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30495092A JP3314885B2 (en) 1992-10-15 1992-10-15 Software processing method in sequence controller system

Publications (2)

Publication Number Publication Date
JPH06131017A JPH06131017A (en) 1994-05-13
JP3314885B2 true JP3314885B2 (en) 2002-08-19

Family

ID=17939268

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30495092A Expired - Fee Related JP3314885B2 (en) 1992-10-15 1992-10-15 Software processing method in sequence controller system

Country Status (1)

Country Link
JP (1) JP3314885B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003162305A (en) * 2001-11-27 2003-06-06 Toshiba Corp Control system
WO2013186889A1 (en) * 2012-06-14 2013-12-19 三菱電機株式会社 I/o device, programmable logic controller, and arithmetic processing method
US10073431B2 (en) 2014-04-24 2018-09-11 Mitsubishi Electric Corporation PLC unit and programmable logic controller

Also Published As

Publication number Publication date
JPH06131017A (en) 1994-05-13

Similar Documents

Publication Publication Date Title
US4866664A (en) Intercomputer communication control apparatus & method
US5010477A (en) Method and apparatus for transferring vector data between parallel processing system with registers & logic for inter-processor data communication independents of processing operations
US6094532A (en) Multiprocessor distributed memory system and board and methods therefor
AU714681B2 (en) Parallel processor with redundancy of processor pairs
US20020065972A1 (en) Bus system for use with information processing apparatus
EP0602906B1 (en) Synchronous processing method and apparatus for a plurality of processors executing a plurality of programs in parallel
JP3314885B2 (en) Software processing method in sequence controller system
JPH0668053A (en) Parallel computer
WO1989009967A1 (en) Computing machine with hybrid communication architecture
EP0502215B1 (en) Message control system in a data communication system
JPH0750661A (en) Data transmitting method and device and asynchronization control system
JP2578773B2 (en) Serial data transfer device
JP2705955B2 (en) Parallel information processing device
JP3466728B2 (en) Information processing system and method
JP2000347712A (en) Programmable controller
JPH05342172A (en) Multiprocessor system
WO1992005489A1 (en) Method of nonsynchronous access to shared memory
JP2812265B2 (en) Network management method for information processing system
JPH11149382A (en) Information processor and interruption controller for microprocessor
JP3466727B2 (en) Information processing system and method
JPH0713907A (en) Data transferring device
JPH0520783B2 (en)
Szabados INDUSTRIAL LAN USING DISTRIBUTED MICROPROCESSORS
JPH03196247A (en) Data processing system
JPH09231188A (en) Multicluster information processing system

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080607

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090607

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees