JPH0139123B2 - - Google Patents

Info

Publication number
JPH0139123B2
JPH0139123B2 JP56106011A JP10601181A JPH0139123B2 JP H0139123 B2 JPH0139123 B2 JP H0139123B2 JP 56106011 A JP56106011 A JP 56106011A JP 10601181 A JP10601181 A JP 10601181A JP H0139123 B2 JPH0139123 B2 JP H0139123B2
Authority
JP
Japan
Prior art keywords
machine
input
output
plc
memory
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
Application number
JP56106011A
Other languages
Japanese (ja)
Other versions
JPS588307A (en
Inventor
Akihiro Yamada
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 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 Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP56106011A priority Critical patent/JPS588307A/en
Publication of JPS588307A publication Critical patent/JPS588307A/en
Publication of JPH0139123B2 publication Critical patent/JPH0139123B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/04Program control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1159Image table, memory
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/13Plc programming
    • G05B2219/13085Plc controls several machines in sequence

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Advance Control (AREA)
  • Multi Processors (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 この発明は、プログラム分散・直列実行式のプ
ログラマブル・ロジツク・コントローラシステム
に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a programmable logic controller system with distributed programs and serial execution.

プログラマブル・ロジツク・コントローラ(以
下PLCという)を使用してシーケンス制御を行
なう場合、応答速度等PLCの能力から、取扱え
る入力点数および出力点数は、一定量以下に制限
されることは周知の通りである。
It is well known that when performing sequence control using a programmable logic controller (hereinafter referred to as PLC), the number of input points and output points that can be handled is limited to a certain amount or less due to the response speed and other capabilities of the PLC. be.

他方、一般のシーケンス制御システムの中に
は、通常PLCが備える量の入出力点数よりも多
くの入出力点数を必要とするものも、ときには存
在する。このような大規模なシステムに対して
は、まず第1にはPLC自体の能力の高い大型
PLCを用意することが考えられる。ところが、
大型PLCは一般に市場性がなく、故に量産効果
が発揮されず、システムコストが上がつてしま
う。
On the other hand, some general sequence control systems sometimes require more input/output points than a normal PLC has. For such a large-scale system, the first thing to do is to use a large-scale PLC with high capacity.
It is possible to prepare a PLC. However,
Large PLCs generally have no marketability, so mass production is not effective and system costs increase.

更にこのように一台のPLCによつて大量の入
出力点数を取り扱おうとすると、そのPLCが故
障した場合には全ての制御が同時に不能となつて
しまい、危険を分散させる上にも好ましくないと
言う問題がある。
Furthermore, if a single PLC handles a large number of input/output points in this way, if that PLC breaks down, all controls will become unavailable at the same time, which is not desirable in terms of dispersing risks. There is a problem.

第2の方策としては、中型乃至小型のPLCを
複数台並列に動作させ、全体として大規模なシス
テムを制御することが考えられ、実施されてい
る。
As a second measure, it has been considered and implemented to operate a plurality of medium-sized to small-sized PLCs in parallel to control a large-scale system as a whole.

ところが、複数台のPLCを並列動作させる従
来のものにあつては、各PLCを関連づけるべく、
あるコントローラの特定入出力の状態を、他のコ
ントローラに伝える場合には、上記あるコントロ
ーラはそのプログラムにより、上記特定入出力の
状態を自己の外部出力端子に印加し、他方上記他
のコントローラは、上記外部出力端とワイヤ結線
されている自己の外部出力端子より該当信号を取
り込む構成を採用している。すなわち、本来外部
機器の制御用に設けられる外部入力および出力端
子を、入出力データの授受用に流用しているので
ある。
However, in conventional systems that operate multiple PLCs in parallel, in order to associate each PLC,
When transmitting the state of a specific input/output of a certain controller to another controller, the certain controller applies the state of the specific input/output to its own external output terminal according to its program, and the other controller A configuration is adopted in which the corresponding signal is taken in from its own external output terminal, which is wire-connected to the above-mentioned external output terminal. In other words, external input and output terminals originally provided for controlling external devices are used for sending and receiving input/output data.

従つて、互いの「関連付」のために相当数の外
部入出力端子を使つてしまい、実際に使用できる
外部入出力端子が少くなり、コントローラの台数
を増加する割には、システム規模の拡張性が向上
しない。また、複雑な「関連付」を行なうと、上
記入出力間の配線が複雑となり、配線チエツク等
が非常に面倒な作業となる他、「関連付」の変更
も容易ではない。
Therefore, a considerable number of external input/output terminals are used to "associate" each other, and the number of external input/output terminals that can actually be used decreases, making it difficult to expand the system scale even though the number of controllers increases. Sexuality does not improve. Furthermore, if a complicated "association" is performed, the wiring between the input and output becomes complicated, making checking the wiring extremely troublesome, and changing the "association" is also not easy.

そこで、本出願人は、先に上述した特定入出力
の状態を他のコントローラに伝える手段として、
専用のデータ入出力バスライン(以下これをリン
クバスと言う)を用い、かつ各PLCには、前記
リンクバスに対する接続手段を備えた新規な
PLCを提案している。このPLCによれば、他の
PLCに対して入出力データを転送するに際して、
外部入出力端子を使用することが不要となり、シ
ステムの拡張性が一段と向上する。
Therefore, the present applicant proposed the following as a means of transmitting the above-mentioned specific input/output status to other controllers.
A dedicated data input/output bus line (hereinafter referred to as the link bus) is used, and each PLC is equipped with a new
We are proposing PLC. According to this PLC, other
When transferring input/output data to the PLC,
It becomes unnecessary to use external input/output terminals, further improving system expandability.

本発明の基本的な目的とするところは、上述し
たリンクバスを備えるPLCに於けるプログラム
実行速度を増加させ、かつ所謂レーシングの問題
を解決することにある。すなわち、この種のリン
クバスを備えたPLCにおける最大の利点は、自
機の入出力メモリの内容ばかりでなく、他機の入
出力メモリの内容をも参照して、ユーザプログラ
ムを実行させることができると言う点にある。具
体的には、自機と他機との間において、互いの入
出力データを参照してインターロツク回路を構成
することができるとうことである。
A basic object of the present invention is to increase the program execution speed in a PLC equipped with the above-mentioned link bus and to solve the problem of so-called racing. In other words, the biggest advantage of a PLC equipped with this type of link bus is that it can execute a user program by referring not only to the contents of its own input/output memory, but also to the contents of the input/output memory of other devices. The point is that it can be done. Specifically, it is possible to construct an interlock circuit between one's own machine and another machine by referring to each other's input/output data.

しかしながら、このように自機と他機との間に
おいて、インターロツク回路を構成した場合にお
いては、ユーザプログラムの中に他機の入出力メ
モリの内容を参照すべき命令が存在するたびに、
リンクバスを介して他機の入出力メモリをアクセ
スする必要が生ずる。従つて、ユーザプログラム
の中に、他機の入出力メモリの内容を参照すべき
命令の数が増加すると、自機の入出力メモリの内
容だけを参照してプログラムを実行する場合に比
べて、他機の入出力メモリをアクセスするための
遅延時間等のために、大幅な処理時間の増大を招
くという問題がある。
However, when an interlock circuit is configured between the own machine and another machine in this way, each time there is an instruction in the user program that refers to the contents of the input/output memory of the other machine.
It becomes necessary to access the input/output memory of another device via the link bus. Therefore, when the number of instructions that refer to the contents of the input/output memory of other devices increases in the user program, compared to when the program is executed by referring only to the contents of the input/output memory of the own device, There is a problem in that processing time is significantly increased due to the delay time required to access the input/output memory of another device.

そこで、本出願人は先に、各PLCの入出力メ
モリの容量を増大させ、自機の入出力回路に対応
する容量に加えて、他機の入出力回路に対応する
容量までをも備え、ユーザプログラムの実行に先
だつて、他機の入出力メモリの内容を自機の入出
力メモリの他機用の記憶エリアに取り込み、これ
によりユーザプログラムの実行に際して、他機の
入出力データを参照すべき命令が呼び出されるた
びに、その都度他機の入出力メモリをアクセスす
ることを不要とし、プログラム処理速度を高速化
したPLCを提供している。
Therefore, the applicant first increased the capacity of the input/output memory of each PLC, and in addition to the capacity corresponding to its own input/output circuit, it also had the capacity to correspond to the input/output circuit of other machines. Prior to execution of a user program, the contents of the input/output memory of another machine are imported into the storage area of the input/output memory of the own machine for the other machine, so that when executing the user program, the input/output data of the other machine can be referenced. The company provides a PLC that speeds up program processing by eliminating the need to access the input/output memory of other machines each time an instruction to be executed is called.

このPLCによれば、ユーザプログラムの中に、
他機の入出力メモリを参照すべき命令が存在する
たびに、その都度他機の入出力メモリをアクセス
する必要はなくなるが、その反面、一命令実行サ
イクル内においては、各機器の入出力メモリの内
容はそれぞれ独立に変化するため、例えば自機の
出力リレーの補助接点を、他機の出力リレーの通
電路に直列介挿し、かつ他機の出力リレーのB接
点を、前記自機の出力リレーの通電路に直列介挿
して、前記両出力リレーが必ず交互にオンまたは
オフするようなインターロツク回路を構成したよ
うな場合においては、自機の出力リレーが動作し
そのB接点がオフしても、その状態は一命令実行
サイクルが終了しないと、他機の入出力メモリに
伝わらないため、本来交互にオンオフすべき各出
力リレーは、同時にオンまたはオフしてしまうと
いう所謂レーシングの問題が生ずる。すなわち、
自機の入出力メモリ内に、自機の入出力回路に対
応する自機エリアに加えて、他機の入出力回路に
対応する他機エリアを備え、各ユーザプログラム
の実行サイクルに先だつて、他機の入出力メモリ
の内容を全て自機の入出力メモリ内の他機エリア
に取り込むことによつて、ユーザプログラムの実
行中に、他機の入出力メモリを参照すべき命令が
読出されるたびに、その都度他機の入出力メモリ
をアクセスすることを不要とした御陰で、他機の
入出力メモリをアクセスする遅延時間に起因する
プログラム実行速度の遅れは解消できるが、その
反面、命令実行中に他機の入出力メモリを参照す
べき命令が読出されるたびにその都度他機の入出
力メモリをアクセスすれば問題とならなかつた欠
点、つまり他機の入出力メモリ内の変化が少くと
も一命令実行サイクル遅れて、自機の入出力メモ
リの他機エリアに伝わり、これが原因でレーシン
グが発生するという問題が生ずる。
According to this PLC, in the user program,
There is no need to access the input/output memory of another device each time there is an instruction that requires reference to the input/output memory of another device, but on the other hand, within one instruction execution cycle, the input/output memory of each device Since the contents of each of In the case where an interlock circuit is configured in which both output relays are always turned on or off alternately by inserting the relay in series in the energized path, the output relay of the own machine operates and its B contact turns off. However, the status is not transmitted to the input/output memory of other machines until one instruction execution cycle is completed, so there is a so-called racing problem in which each output relay, which should normally be turned on and off alternately, ends up turning on and off at the same time. arise. That is,
In the input/output memory of the own machine, in addition to the own machine area corresponding to the own machine's input/output circuit, there is also an other machine area corresponding to the other machine's input/output circuit, and prior to the execution cycle of each user program, By importing all the contents of the other machine's input/output memory into the other machine's area in the own machine's input/output memory, instructions that refer to the other machine's input/output memory can be read while the user program is running. By eliminating the need to access the input/output memory of other machines each time, it is possible to eliminate delays in program execution speed caused by the delay time of accessing the input/output memory of other machines. The drawback is that there are fewer changes in the input/output memory of other machines, which would not be a problem if the input/output memory of the other machine was accessed each time an instruction that referred to the input/output memory of another machine was read during execution. In both cases, the instruction is transmitted to the input/output memory area of the other machine with a delay of one instruction execution cycle, and this causes a problem in that racing occurs.

この発明は、上記の問題を解決するためになさ
れたもので、その目的とするところは、複数の
PLCを用いて多くの入出力点数を制御する場合
に、各機内で入出力データを伝送のために、各機
器の外部入出力端子を使用することを不要とし、
また各PLCがユーザプログラムを実行している
間に、その都度他機の入出力メモリをアクセスす
る必要を不要とし、更に自機と他機との間におい
て、前述したようなインターロツク回路を構成し
ても、レーシングが発生しないようにすることに
ある。
This invention was made to solve the above problem, and its purpose is to
When controlling a large number of input/output points using a PLC, it is no longer necessary to use the external input/output terminals of each device to transmit input/output data within each machine.
In addition, while each PLC is executing a user program, there is no need to access the input/output memory of other machines each time, and an interlock circuit as described above can be configured between the PLC and other machines. However, the goal is to prevent racing from occurring.

すなわち、このは発明に係わるプログラム分
散・直列実行式プログラマブル・ロジツク・コン
トローラシステムは、リンクバスを介して、互い
に入出力メモリの内容を交換可能に接続された複
数機のPLCで構成されたるPLCシステムであつ
て; 各PLCには、当該PLCの機番順位を設定する
ための機番設定手段と; ユーザプログラムが格納されるユーザプログラ
ムメモリと; 外部入力信号が与えられる入力回路と; 外部出力信号を送出する出力回路と; 自機の入出力回路に対応する自機エリアに加え
て、他機の入出力回路に対応する他機エリアを備
えた入出力メモリと; 前記機番設定手段によつて、当該PLCの機番
順位が最上位に設定された場合には、ユーザプロ
グラムの実行に先だつて、他機と同期して、自機
の入出力メモリの他機エリアに、各他機から転送
されてくる当該他機用の入出力データを書込み、
かつ当該PLCの機番順位が最上位以外に設定さ
れた場合には、ユーザプログラムの実行に先だつ
て、他機と同期して、自機の入出力メモリの自機
エリアの入出力データを、最上位に設定された
PLCへと転送する入力転送手段と; 機番順位において、1つ上位のPLCから転送
されてくる当該PLCの入出力メモリの全入出力
データを、自機の入出力メモリに書込むととも
に、この入出力データを参照して、自機のユーザ
プログラムを実行し、その実行結果で自機の入出
力メモリの内容を書替え、更にその書替えられた
入出力メモリの内容を機番順位において1つ下位
のPLCへ転送するプログラム実行手段と; 前記機番設定手段によつて、当該PLCの機番
順位が最下位に設定された場合には、入出力リフ
レツシユに先だつて、当該PLCのユーザプログ
ラムの実行により書替えられた各他機用の出力エ
リアの内容を、それぞれ対応する他機のPLCに
転送し、かつ前記機番設定手段によつて、当該機
番順位が最下位以外に設定された場合には、入出
力リフレツシユに先だつて、最下位のPLCから
転送されてくる自機用の出力データを、自機の入
出力メモリの自機用出力エリアに書込む出力転送
手段と; 前記機番設定手段によつて、当該PLCの機番
順位が最下位に設定された場合には、当該PLC
のユーザプログラムの実行により書替えられた自
機の入出力メモリの自機用出力エリアの内容を、
自機の出力回路に転送するとともに、自機の入力
回路からの入力データを自機の入力メモリの自機
用入力エリアに書込み、かつ前記機番設定手段に
よつて、当該PLCの機番順位が最下位以外に設
定された場合には、前記出力転送手段により書替
えられた自機の入出力メモリの自機用出力エリア
の内容を、自機の出力回路に転送するとともに、
自機の入力回路からの入力データを自機の入出力
メモリの入力エリアに書込む入出力リフレツシユ
手段と; を設けたことを特徴とするものである。
In other words, the program distributed/serial execution type programmable logic controller system according to this invention is a PLC system consisting of a plurality of PLCs connected to each other via a link bus so that the contents of input/output memory can be exchanged. Each PLC includes a machine number setting means for setting the machine number order of the PLC; a user program memory in which a user program is stored; an input circuit to which an external input signal is applied; an external output signal an input/output memory having an own machine area corresponding to the own machine's input/output circuit and an other machine area corresponding to the other machine's input/output circuit; Therefore, if the machine number order of the relevant PLC is set to the highest, prior to execution of the user program, synchronized with other machines, data from each other machine is stored in the input/output memory area of the own machine. Write the transferred input/output data for the other machine,
If the machine number order of the PLC is set to a value other than the highest, the input/output data in the own machine area of the own machine's input/output memory is synchronized with other machines before execution of the user program. set to top level
Input transfer means for transferring to the PLC: Writes all input/output data in the input/output memory of the PLC transferred from the next higher PLC in the machine number order to the input/output memory of the own machine, and Refers to the input/output data, executes the user program of the own machine, rewrites the contents of the own machine's input/output memory with the execution result, and then moves the rewritten contents of the input/output memory one level lower in the machine number order. a program execution means for transferring the program to the PLC of the PLC; if the machine number setting of the PLC is set to the lowest by the machine number setting means, execution of the user program of the PLC is executed prior to the input/output refresh; When the contents of the output area for each other machine rewritten by are transferred to the PLC of the corresponding other machine, and the machine number ranking is set to other than the lowest by the machine number setting means, is an output transfer means for writing the output data for own machine transferred from the lowest PLC into the own machine output area of the input/output memory of the own machine prior to the input/output refresh; the above machine number setting; If the machine number ranking of the PLC is set to the lowest by any means, the PLC
The contents of the own machine's output area of the own machine's input/output memory that have been rewritten by the execution of the user program are
At the same time, the input data from the input circuit of the own machine is written to the own input area of the input memory of the own machine, and the machine number setting means sets the machine number order of the PLC. is set to a value other than the lowest level, the contents of the own device output area of the own device's input/output memory rewritten by the output transfer means are transferred to the own device's output circuit, and
The present invention is characterized by the following: an input/output refresh means for writing input data from an input circuit of the own machine into an input area of an input/output memory of the own machine;

以下に、この発明の好適な一実施例を添付図面
に従つて詳細に説明する。
Hereinafter, a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings.

第1図は、この発明に係わるプログラム分散・
直列実行式プログラマブル・ロジツク・コントロ
ーラシステムの電気的な構成を示すブロツク図で
ある。同図に示す如く、このPLCシステムは複
数台のPLCを、互いにリンクバス1、リンクバ
スインターフエイス10を介して接続して構成さ
れている。各PLCは、ユーザプログラムが格納
されるユーザプログラムメモリ2と、外部入力信
号が伝えられる入力回路3と、外部出力信号を送
出する出力回路4と、上記入出力回路3,4の容
量よりも充分大きな容量を有する入出力メモリ5
と、上記ユーザプログラムメモリ2の命令を順次
高速に実行し、上記入出力メモリ5のデータに基
づいて論理演算を行なうとともに、その演算結果
を上記入出力メモリ5に書込む命令実行手段と、
上記入力回路3の入力データを上記入出力メモリ
5の所定エリアに書込むとともに、上記入出力メ
モリ5の所定エリアの出力データを上記出力回路
4に伝達する入出力更新手段とから構成されてい
る。また、上述した命令実行手段および入出力更
新手段は、マイクロプロセツサおよびROMを主
体とするCPU6によつて構成されている。
Figure 1 shows the program distribution and
1 is a block diagram showing the electrical configuration of a serially executed programmable logic controller system. FIG. As shown in the figure, this PLC system is constructed by connecting a plurality of PLCs to each other via a link bus 1 and a link bus interface 10. Each PLC has a user program memory 2 in which a user program is stored, an input circuit 3 to which an external input signal is transmitted, an output circuit 4 to send an external output signal, and a capacity larger than that of the input/output circuits 3 and 4. Input/output memory with large capacity 5
and an instruction execution means for sequentially executing the instructions in the user program memory 2 at high speed, performing a logical operation based on the data in the input/output memory 5, and writing the operation result in the input/output memory 5;
The input/output updating means writes the input data of the input circuit 3 to a predetermined area of the input/output memory 5, and transmits the output data of the predetermined area of the input/output memory 5 to the output circuit 4. . Further, the above-mentioned instruction execution means and input/output updating means are constituted by a CPU 6 mainly composed of a microprocessor and a ROM.

スイツチインターフエイス7を介したCPU6
に接続された機番設定スイツチ8は、後述する如
く各PLCをホストあるいはゲストとして動作さ
せる際に、そのいずれに設定するかあるいは機番
順位を設定するために使用される。ワーキングメ
モリ9内には、第2図に示す如く自号機レジスタ
と他機状態レジスタとが設けられている。これら
のレジスタは、後述する如く各PLCをゲストあ
るいはホストとして設定する場合に、その設定さ
れた状態を記憶するもので、自号機レジスタには
各PLCの機番が記憶され、また他機状態レジス
タには本システムを構成する全てのPLCの機番
順位が記憶される。
CPU6 via switch interface 7
The machine number setting switch 8 connected to the machine number setting switch 8 is used to set the machine number order or set the machine number order when each PLC is operated as a host or a guest as described later. In the working memory 9, as shown in FIG. 2, there are provided an own machine register and an other machine status register. These registers are used to store the set status when each PLC is set as a guest or host, as described later.The own machine register stores the machine number of each PLC, and the other machine status register The machine number order of all the PLCs that make up this system is stored.

入出力メモリ5内には、第3図に示す如く自機
の入力回路3および出力回路4に対応する入出力
エリアの他に、他機の入出力回路にそれぞれ対応
する入出力エリアが設けられている。なお、第2
図および第3図に示すものは、本システムを3台
のPLCによつて構成した場合であり、各入出力
メモリ内に示される#1,#2,#3はそれぞ
れ、#1号機、#2号機、#3号機の入出力回路
にそれぞれ対応する入出力エリアである。
In the input/output memory 5, as shown in FIG. 3, in addition to input/output areas corresponding to the input circuit 3 and output circuit 4 of the own machine, input/output areas corresponding to the input/output circuits of other machines are provided. ing. In addition, the second
What is shown in the figure and Fig. 3 is the case where this system is configured with three PLCs, and #1, #2, and #3 shown in each input/output memory are #1 machine and #3, respectively. These are input/output areas corresponding to the input/output circuits of #2 and #3 machines, respectively.

次に、第4図は本PLCシステムの動作を制御
するために、各PLCのCPU内のROMに記憶され
た、システムプログラムの一部を示すものであ
る。また、第5図は第4図に示すシステムプログ
ラムの実行にともななつて、ワーキングメモリ内
の各レジスタの内容が変化する様子および各入出
力メモリ内のデータの変化状態を示す状態遷移図
である。
Next, FIG. 4 shows a part of the system program stored in the ROM in the CPU of each PLC in order to control the operation of this PLC system. Furthermore, FIG. 5 is a state transition diagram showing how the contents of each register in the working memory change and the state of change of data in each input/output memory as the system program shown in FIG. 4 is executed. be.

これら第4図および第5図に従つて、本PLC
システムの動作を系統的に説明する。なお、以下
の説明においては、3台のPLCによつて本シス
テムが構成されているものとする。
According to these figures 4 and 5, this PLC
Systematically explain the operation of the system. In the following description, it is assumed that this system is configured by three PLCs.

本発明に係わるPLCの動作は、イニシヤルサ
イクル、1Nサイクル、実行サイクル、OUTサイ
クルおよびI/Oリフレツシユサイクルからなる
5つのサイクルによつて大きく構成される。
The operation of the PLC according to the present invention is largely comprised of five cycles: an initial cycle, a 1N cycle, an execution cycle, an OUT cycle, and an I/O refresh cycle.

ホスト機およびゲスト機において、それぞれイ
ニシヤル処理ステツプ1A,1Bが実行される
と、第5図の(1)に示す如く、イニシヤルサイクル
が実行される。このイニシヤルサイクルは、まず
各PLCにおいて、機番設定スイツチ8の内容を、
インターフエイス7を介してCPU6に取り込み、
次いで各自号機レジスタ内にその内容を記憶させ
る。次いで、各号機の自号機レジスタに記憶され
た内容は、ホスト機(#1)の他機状態レジスタ
内に順次取り込まれ、機番順位に従つて配列され
る。次いで、ホスト機の他機状態レジスタの内容
は、#1,#3号機の他機状態レジスタへと順次
転送される。この結果イニシヤルサイクルが終了
すると、各号機の他機状態レジスタの内容は全て
同一となる。
When initial processing steps 1A and 1B are executed in the host machine and the guest machine, respectively, an initial cycle is executed as shown in (1) of FIG. This initial cycle first sets the contents of machine number setting switch 8 in each PLC.
Imported into CPU 6 via interface 7,
Then, the contents are stored in the register of each machine. Next, the contents stored in the own machine register of each machine are sequentially taken into the other machine status register of the host machine (#1) and arranged in accordance with the machine number order. Next, the contents of the other machine status register of the host machine are sequentially transferred to the other machine status registers of machines #1 and #3. As a result, when the initial cycle ends, the contents of the other machine status registers of each machine become the same.

次いで、ホスト機において、ステツプ2A,3
A,4Aが実行され、またゲスト機において、ス
テツプ2B,3B,4Bが実行されると、本シス
テムのINサイクルが行なわれる。このINサイク
ルにおいては、第5図(2)に示す如く、#2,#3
号機の各自機用の入出力エリアの内容だけが、
#1号機の該当するエリアへと転送される。すな
わち、#2号機の#2入出力エリアおよび#3号
機の#3入出力エリアが、#1号機のそれぞれ該
当するエリアへと転送されるのである。
Next, steps 2A and 3 are performed on the host machine.
When steps A and 4A are executed and steps 2B, 3B, and 4B are executed on the guest machine, the IN cycle of the system is executed. In this IN cycle, as shown in Figure 5 (2), #2, #3
Only the contents of the input/output area for each machine are
Transferred to the corresponding area of #1 machine. That is, the #2 input/output area of the #2 machine and the #3 input/output area of the #3 machine are transferred to the respective corresponding areas of the #1 machine.

次に、ホスト機において、ステツプ5A,6
A,7A,8Aおよび9Aが実行され、かつゲス
ト機においてステツプ7B,8B,9B,10
B,11B,12B,13Bおよび14Bが実行
されると、本システムの実行サイクルが行なわれ
る。この実行サイクルにおいて、前記INサイク
ルにおいて、取り込まれた各入出力データの内容
に基づいて、まず#1号機においてユーザプログ
ラムが順次実行される。そして、#1号機の実行
が完了すると、その時点の入出力メモリの内容は
#2号機へと転送され、次いで#2号機において
はこの#1号機から転送された入出力データの内
容に基づいてユーザプログラムの実行が行なわれ
る。#2号機において、同様にしてユーザプログ
ラムの実行が完了すると、その実行結果である入
出力メモリの内容は次いで、#3号機へと転送さ
れる。そして、#3号機においては、#2号から
転送された入出力データの内容に基づいて、同様
にしてユーザプログラムの実行が行なわれ、その
実行が完了すると、#3号機の入出力メモリの内
容は#1号機へと再び転送されることとなる。
Next, on the host machine, step 5A, 6
A, 7A, 8A and 9A are executed and steps 7B, 8B, 9B, 10 are executed on the guest machine.
When B, 11B, 12B, 13B and 14B are executed, the execution cycle of the system is completed. In this execution cycle, the user program is first sequentially executed in machine #1 based on the contents of each input/output data taken in in the IN cycle. When the execution of machine #1 is completed, the contents of the input/output memory at that time are transferred to machine #2, and machine #2 then uses the contents of the input/output data transferred from machine #1. The user program is executed. When the execution of the user program is completed in the #2 machine in the same manner, the contents of the input/output memory which are the execution results are then transferred to the #3 machine. Then, in the #3 machine, the user program is executed in the same way based on the contents of the input/output data transferred from the #2 machine, and when the execution is completed, the contents of the input/output memory of the #3 machine are executed. will be transferred again to machine #1.

次に、ホスト機においてステツプ15A,16
Aおよび17Aが実行され、かつゲスト機におい
て、ステツプ15B,16B,17B,18Bお
よび19Bが実行されると、第5図(4)に示す如く
アウトサイクルが行なわれる。このアウトサイク
ルにおいては、最終機である#3号機の入出力デ
ータの内容が、#1および#2号機へと順次転送
される。なお、この例においては、#3号機から
各#1、#2号機への入出力データの転送に際し
て、それぞれ号機に必要な入出力データエリアだ
けを転送するようにしている。すなわち、#3号
機から#1号機への転送に際しては、前述の実行
サイクルの終了時に行なわれているので、これら
の入出力データの転送は行なわない、これに対し
て#3号機から#2号機へいする入出力データの
転送に際しては、#2号機の分だけのエリアの転
送が行なわれる。
Next, steps 15A and 16 are performed on the host machine.
When steps A and 17A are executed and steps 15B, 16B, 17B, 18B and 19B are executed in the guest machine, an outcycle is performed as shown in FIG. 5(4). In this outcycle, the contents of the input/output data of the #3 machine, which is the final machine, are sequentially transferred to the #1 and #2 machines. In this example, when transferring input/output data from machine #3 to machines #1 and #2, only the input/output data area necessary for each machine is transferred. In other words, when transferring from machine #3 to machine #1, since it is done at the end of the aforementioned execution cycle, these input/output data are not transferred.On the other hand, from machine #3 to machine #2 When transferring the input/output data to the destination, the area corresponding to the #2 machine is transferred.

次に、ホスト機において、ステツプ20Aが実
行され、かつホスト機において、ステツプ20B
が実行されると、第5図(5)に示す如くI/Oリフ
レツシユサイクルが行なわれる。このI/Oリフ
レツシユサイクルの開始においては、各号機の出
力メモリの自号機分のエリアの内容は、常に最新
の状態となつている。この結果、I/Oリフレツ
シユサイクルにおいて、自号機分のエリアの入出
力エリアの内容を出力回路4へと転送してやれ
ば、前述したレーシングの問題は生ずることがな
い。すなわち、このPLCシステムにあつては、
各号機において、ユーザプログラムの実行が終了
するたびに、その入出力メモリのないようを次号
機へと順次転送し、各次の号機においてはその転
送された入出力データに基づいてユーザプログラ
ムを実行するようにしているため、PLCシステ
ム全体としては、恰も1台のPLCによつて全て
のユーザプログラムの実行が行われているのと同
じこととなり、従来の複数機を備えたPLCシス
テムにおいて問題となつた、ユーザプログラムの
実行に際してその基となるI/Oデータが不一致
となるという問題を解決し、これにより複数号機
間に於けるインターロツク回路を構成しても、レ
ーシングが生ずるということがないわけである。
Next, step 20A is executed in the host machine, and step 20B is executed in the host machine.
When this is executed, an I/O refresh cycle is performed as shown in FIG. 5(5). At the start of this I/O refresh cycle, the contents of the area for the own machine in the output memory of each machine are always in the latest state. As a result, if the contents of the input/output area of the area for the own machine are transferred to the output circuit 4 in the I/O refresh cycle, the above-mentioned racing problem will not occur. In other words, for this PLC system,
Each time a user program finishes executing on each machine, the input/output memory is transferred to the next machine, and each next machine executes the user program based on the transferred input/output data. Therefore, for the entire PLC system, it is the same as if all user programs were executed by one PLC, which is a problem in conventional PLC systems equipped with multiple devices. This solves the problem that the underlying I/O data becomes inconsistent when a user program is executed, and as a result, even if an interlock circuit is configured between multiple machines, racing will not occur. That's why.

以上の実施例の説明でも明らかなように、この
発明に係わるプログラム分散・直列実行式プログ
ラマブル・ロジツク・コントローラシステムは、
リンクバスを介して、互いに入出力メモリの内容
を交換可能に接続された複数機のPLCで構成さ
れたるPLCシステムであつて; 各PLCには、当該PLCの機番順位を設定する
ための機番吹定手段と; ユーザプログラムが格納されるユーザプログラ
ムメモリと; 外部入力信号が与えられる入力回路と; 外部出力信号を送出する出力回路と; 自機の入出力回路に対応する自機エリアに加え
て、他機の入出力回路に対応する他機エリアを備
えた入出力メモリと; 前記機番設定手段によつて、当該PLCの機番
順位が最上位に設定された場合には、ユーザプロ
グラムの実行に先だつて、他機と同期して、自機
の入出力メモリの他機エリアに、各他機から転送
されてくる当該他機用の入出力データを書込み、
かつ当該PLCの機番順位が最上位以外に設定さ
れた場合には、ユーザプログラムの実行に先だつ
て、他機と同期して、自機の入出力メモリの自機
エリアの入出力データを、最上位に設定された
PLCへと転送する入力転送手段と; 機番順位において、1つ上位のPLCから転送
されてくる当該PLCの入出力メモリの全入出力
データを、自機の入出力メモリに書込むととも
に、この入出力データを参照して、自機のユーザ
プログラムを実行し、その実行結果で自機の入出
力メモリの内容を書替え、更にその書替えられた
入出力メモリの内容を機番順位において1つ下位
のPLCへ転送するプログラム実行手段と; 前記機番設定手段によつて、当該PLCの機番
順位が最下位に設定された場合には、入出力リフ
レツシユに先だつて、当該PLCのユーザプログ
ラムの実行により書替えられた各他機用の出力エ
リアの内容を、それぞれ対応する他機のPLCに
転送し、かつ前記機番設定手段によつて、当該機
番順位が最下位以外に設定された場合には、入出
力リフレツシユに先だつて、最下位のPLCから
転送されてくる自機用の出力データを、自機の入
出力メモリの自機用出力エリアに書込む出力転送
手段と; 前記機番設定手段によて、当該PLCの機番順
位が最下位に設定された場合には、当該PLCの
ユーザプログラムの実行により書替えられた自機
の入出力メモリの自機用出力エリアの内容を、自
機の出力回路に転送するとともに、自機の入力回
路からの入力データを自機の入力メモリの自機用
入力エリアに書込み、かつ前記機番設定手段によ
つて、当該PLCの機番順位が最下位以外に設定
された場合には、前記出力転送手段により書替え
られた自機の入出力メモリの自機用出力エリアの
内容を、自機の出力回路に転送するとともに、自
機の入力回路からの入力データの自機の入出力メ
モリの入力エリアに書込む入出力リフレツシユ手
段と; を設けたことを特徴とするものであるから、従来
の複数台のPLCによつて構成されたシステムに
比べて、各号機間において、入出力データ転送す
るに際して、外部入出力端子を占有することが不
要となるとともに、他機の入出力データを参照す
るに際して、その都度他機の入出力メモリをアク
セスすることも不要となつて、プログラム実行時
間を短縮化することができ、更に自機と他機との
間において、インターロツク回路を構成したよう
な場合においても、レーシングの発生がない等の
優れた特徴と有するものである。
As is clear from the above description of the embodiments, the program distributed/serial execution type programmable logic controller system according to the present invention has the following features:
A PLC system consisting of a plurality of PLCs connected to each other via a link bus so that the contents of input/output memory can be exchanged; each PLC has a function for setting the machine number order of the PLC. A program setting means; A user program memory in which a user program is stored; An input circuit to which an external input signal is applied; An output circuit to send an external output signal; An area corresponding to the input/output circuit of the own machine In addition, an input/output memory including an other device area corresponding to the input/output circuit of another device; Prior to executing the program, synchronize with other machines, write the input/output data for the other machine transferred from each other machine to the other machine area of the own machine's input/output memory,
If the machine number order of the PLC is set to a value other than the highest, the input/output data in the own machine area of the own machine's input/output memory is synchronized with other machines before execution of the user program. set to top level
Input transfer means for transferring to the PLC: Writes all input/output data in the input/output memory of the PLC transferred from the next higher PLC in the machine number order to the input/output memory of the own machine, and Refers to the input/output data, executes the user program of the own machine, rewrites the contents of the own machine's input/output memory with the execution result, and then moves the rewritten contents of the input/output memory one level lower in the machine number order. a program execution means for transferring the program to the PLC of the PLC; if the machine number setting of the PLC is set to the lowest by the machine number setting means, execution of the user program of the PLC is executed prior to the input/output refresh; When the contents of the output area for each other machine rewritten by are transferred to the PLC of the corresponding other machine, and the machine number ranking is set to other than the lowest by the machine number setting means, is an output transfer means for writing the output data for own machine transferred from the lowest PLC into the own machine output area of the input/output memory of the own machine prior to the input/output refresh; the above machine number setting; If the machine number ranking of the PLC is set to the lowest by the means, the contents of the own machine's output area of the own machine's input/output memory that have been rewritten by the execution of the user program of the relevant PLC are automatically At the same time, the input data from the input circuit of the PLC is written to the own input area of the input memory of the own machine, and the machine number setting means sets the machine number order of the PLC. If it is set to other than the lowest level, the contents of the output area of the own machine's input/output memory rewritten by the output transfer means are transferred to the own machine's output circuit, and the contents of the own machine's output area of the own machine's input/output memory are transferred to the own machine's input circuit. The present invention is characterized by the following: input/output refresh means for writing input data from the machine into the input area of its own input/output memory; In comparison, when transferring input/output data between each machine, there is no need to occupy external input/output terminals, and when referring to input/output data of other machines, the input/output memory of the other machine can be accessed each time. Program execution time can be shortened since there is no need to do this, and even when an interlock circuit is configured between the own machine and another machine, there are advantages such as no racing occurring. It has the following characteristics.

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

第1図は、本発明システムの電気的な構成を示
すブロツク図、第2図は、第1図のワーキングメ
モリ内に示される自号機レジスタおよび他機状態
レジスタの内容を示す図、第3図は、入出力メモ
リ内の構成を示すブロツク図、第4図は、本シス
テムの動作を規定するシステムプログラムの内容
を示すフローチヤート、第5図は、第4図に示す
フローチヤートの実行にともないワーキングメモ
リ内の自号機レジスタ、他機状態レジスタおよび
入出力メモリ内の各号機用エリアの内容が変化す
る状態を示す状態遷移図である。 1……リンクバス、2……ユーザプログラムメ
モリ、3……入力回路、4……出力回路、5……
入出力メモリ、6……CPU、7……スイツチイ
ンターフエイス、8……機番設定用スイツチ、9
……ワーキングメモリ、10……リンクバスイン
ターフエイス。
FIG. 1 is a block diagram showing the electrical configuration of the system of the present invention, FIG. 2 is a diagram showing the contents of the own machine register and other machine status register shown in the working memory of FIG. 1, and FIG. is a block diagram showing the configuration in the input/output memory, FIG. 4 is a flowchart showing the contents of the system program that defines the operation of this system, and FIG. 5 is a flowchart showing the contents of the system program that defines the operation of this system. FIG. 4 is a state transition diagram showing a state in which the contents of the own machine register in the working memory, the other machine status register, and the area for each machine in the input/output memory change. 1... Link bus, 2... User program memory, 3... Input circuit, 4... Output circuit, 5...
Input/output memory, 6... CPU, 7... Switch interface, 8... Machine number setting switch, 9
... Working memory, 10... Link bus interface.

Claims (1)

【特許請求の範囲】 1 リンクバスを介して、互いに入出力メモリの
内容を交換可能に接続された複数機のPLCで構
成されたるPLCシステムであつて、; 各PLCには、当該PLCの機番順位を設定する
ための機番設定手段と; ユーザプログラムが格納されるユーザプログラ
ムメモリと; 外部入力信号が与えられる入力回路と; 外部出力信号を送出する出力回路と; 自機の入出力回路に対応する自機エリアに加え
て、他機の入出力回路に対応する他機エリアを備
えた入出力メモリと; 前記機番設定手段によつて、当該PLCの機番
順位が最上位に設定された場合には、ユーザプロ
グラムの実行に先だつて、他機と同期して、自機
の入出力メモリの他機エリアに、各他機から転送
されてくる当該他機用の入出力データを書込み、
かつ当該PLCの機番順位が最上位以外に設定さ
れた場合には、ユーザプログラムの実行に先だつ
て、他機と同期して、自機の入出力メモリの自機
エリアの入出力データを、最上位に設定された
PLCへと転送する入力転送手段と; 機番順位において、1つ上位のPLCから転送
されてくる当該PLCの入出力メモリの全入出力
データを、自機の入出力メモリに書込むととも
に、この入出力データを参照して、自機のユーザ
プログラムを実行し、その実行結果で自機の入出
力メモリの内容を書替え、更にその書替えられた
入出力メモリの内容を機番順位において1つ下位
のPLCへ転送するプログラム実行手段と; 前記機番設定手段によつて、当該PLCの機番
順位が最下位に設定された場合には、入出力リフ
レツシユに先だつて、当該PLCのユーザプログ
ラムの実行により書替えられた各他機用の出力エ
リアの内容を、それぞれ対応する他機のPLCに
転送し、かつ前記機番設定手段によつて、当該機
番順位が最下位以外に設定された場合には、入出
力リフレツシユに先だつて、最下位のPLCから
転送されてくる自機用の出力データを、自機の入
出力メモリの自機用出力エリアに書込む出力転送
手段と; 前記機番設定手段によつて、当該PLCの機番
順位が最下位に設定された場合には、当該PLC
のユーザプログラムの実行により書替えられた自
機の入出力メモリの自機用出力エリアの内容を、
自機の出力回路に転送するとともに、自機の入力
回路からの入力データを自機の入力メモリの自機
用入力エリアに書込み、かつ前記機番設定手段に
よつて、当該PLCの機番順位が最下位以外に設
定された場合には、前記出力転送手段により書替
えられた自機の入出力メモリの自機用出力エリア
の内容を、自機の出力回路に転送するとともに、
自機の入力回路からの入力データを自機の入出力
メモリの入力エリアに書込む入出力リフレツシユ
手段と; を設けたことを特徴とするプログラム分散・直列
実行式プログラマブル・ロジツク・コントローラ
システム。
[Claims] 1. A PLC system consisting of a plurality of PLCs connected to each other via a link bus so that the contents of their input/output memories can be exchanged; machine number setting means for setting the machine number order; a user program memory in which a user program is stored; an input circuit to which an external input signal is applied; an output circuit to send an external output signal; an input/output circuit of the own machine. In addition to the own machine area corresponding to the own machine area, the input/output memory has an other machine area corresponding to the input/output circuit of the other machine; and the machine number setting means sets the machine number order of the PLC to the highest. If the user program is executed, the input/output data for the other machine, which is transferred from each other machine, is synchronized with the other machine and transferred to the other machine area of the own machine's input/output memory. writing,
If the machine number order of the PLC is set to a value other than the highest, the input/output data in the own machine area of the own machine's input/output memory is synchronized with other machines before execution of the user program. set to top level
Input transfer means for transferring to the PLC: Writes all input/output data in the input/output memory of the PLC transferred from the next higher PLC in the machine number order to the input/output memory of the own machine, and Refers to the input/output data, executes the user program of the own machine, rewrites the contents of the own machine's input/output memory with the execution result, and then moves the rewritten contents of the input/output memory one level lower in the machine number order. a program execution means for transferring the program to the PLC of the PLC; if the machine number setting of the PLC is set to the lowest by the machine number setting means, execution of the user program of the PLC is executed prior to the input/output refresh; When the contents of the output area for each other machine rewritten by are transferred to the PLC of the corresponding other machine, and the machine number ranking is set to other than the lowest by the machine number setting means, is an output transfer means for writing the output data for own machine transferred from the lowest PLC into the own machine output area of the input/output memory of the own machine prior to the input/output refresh; the above machine number setting; If the machine number ranking of the PLC is set to the lowest by any means, the PLC
The contents of the own machine's output area of the own machine's input/output memory that have been rewritten by the execution of the user program are
At the same time, the input data from the input circuit of the own machine is written to the own input area of the input memory of the own machine, and the machine number setting means sets the machine number order of the PLC. is set to a value other than the lowest level, the contents of the own device output area of the own device's input/output memory rewritten by the output transfer means are transferred to the own device's output circuit, and
A program distributed/serial execution type programmable logic controller system comprising: an input/output refresh means for writing input data from an input circuit of the own machine into an input area of an input/output memory of the own machine; and;
JP56106011A 1981-07-07 1981-07-07 Program decentralized serial execution type programmable logic controller system Granted JPS588307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56106011A JPS588307A (en) 1981-07-07 1981-07-07 Program decentralized serial execution type programmable logic controller system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56106011A JPS588307A (en) 1981-07-07 1981-07-07 Program decentralized serial execution type programmable logic controller system

Publications (2)

Publication Number Publication Date
JPS588307A JPS588307A (en) 1983-01-18
JPH0139123B2 true JPH0139123B2 (en) 1989-08-18

Family

ID=14422720

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56106011A Granted JPS588307A (en) 1981-07-07 1981-07-07 Program decentralized serial execution type programmable logic controller system

Country Status (1)

Country Link
JP (1) JPS588307A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000000903A1 (en) * 1998-06-30 2000-01-06 Mitsubishi Denki Kabushiki Kaisha Multiple cpu unit

Also Published As

Publication number Publication date
JPS588307A (en) 1983-01-18

Similar Documents

Publication Publication Date Title
JPS5914778B2 (en) data processing equipment
JPS6224801B2 (en)
KR920008448B1 (en) Data processor
US4095268A (en) System for stopping and restarting the operation of a data processor
US4032898A (en) Interface control unit for transferring sets of characters between a peripheral unit and a computer memory
JPH0139123B2 (en)
JPS6232483B2 (en)
JPH03668B2 (en)
US3387280A (en) Automatic packing and unpacking of esi transfers
JPH0139122B2 (en)
JPS6190204A (en) Linking method of programmable controller
JP2522412B2 (en) Communication method between programmable controller and input / output device
JPS6048504A (en) Sequence controller connection method
JP2573251B2 (en) How to specify the transmission of the programmable controller
JP3020776B2 (en) Process instrumentation system
JP2000029508A (en) Programmable controller
JPH0261749A (en) Data transfer device
JPS6022383B2 (en) input/output control device
JPS5866112A (en) Computer system
JP2792491B2 (en) Emulation device
JPH03214275A (en) Semiconductor integrated circuit
JP2001084173A (en) Memory device
JPS62276663A (en) Program transfer method
JP2002297209A (en) Sequence program storage method in sequence control device
JPH02236741A (en) Logic simulator