JPS6160443B2 - - Google Patents

Info

Publication number
JPS6160443B2
JPS6160443B2 JP56082093A JP8209381A JPS6160443B2 JP S6160443 B2 JPS6160443 B2 JP S6160443B2 JP 56082093 A JP56082093 A JP 56082093A JP 8209381 A JP8209381 A JP 8209381A JP S6160443 B2 JPS6160443 B2 JP S6160443B2
Authority
JP
Japan
Prior art keywords
subunit
input
output
address
data
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
JP56082093A
Other languages
Japanese (ja)
Other versions
JPS57197609A (en
Inventor
Kenji Nishikido
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 JP8209381A priority Critical patent/JPS57197609A/en
Publication of JPS57197609A publication Critical patent/JPS57197609A/en
Publication of JPS6160443B2 publication Critical patent/JPS6160443B2/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/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme 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
    • G05B19/056Programming the PLC
    • 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/13153Modification, change of program in real time

Description

【発明の詳細な説明】 この発明は、プログラマブル・ロジツク・コン
トローラ(以下これをPLCという)に係わり、特
にPLCを構成する入出力回路を複数のメインユニ
ツトにユニツト構成し、かつ各メインユニツトを
それぞれ一定点数の入力または出力を扱う入出力
サブユニツトにユニツト構成して、ユーザ側の制
御仕様に応じて入出力回路をサブユニツト単位あ
るいはメインユニツト単位で増減または変更でき
るようにしたPLCに関する。
[Detailed Description of the Invention] The present invention relates to a programmable logic controller (hereinafter referred to as PLC), and particularly relates to a programmable logic controller (PLC) in which the input/output circuits constituting the PLC are configured as a unit in a plurality of main units, and each main unit is This invention relates to a PLC that is structured into input/output subunits that handle a fixed number of inputs or outputs, and that allows the input/output circuits to be increased, decreased, or changed in subunit or main unit units according to the user's control specifications.

周知のように、一般のPLCは、入力回路から得
られる入力データを入出力メモリに書込むととも
に、この入出力メモリに記憶された出力データを
読出して出力回路に転送する入出力更新手段と、
前記入出力メモリの記憶データを、任意に設定さ
れるユーザプログラムに従つて演算処理し、その
処理結果に基づいて前記入出力メモリのデータを
書換えるプログラム実行手段とから基本的に構成
され、入出力更新動作とプログラム実行動作とを
交互に繰り返すものである。
As is well known, a general PLC includes an input/output updating means that writes input data obtained from an input circuit to an input/output memory, reads output data stored in the input/output memory, and transfers it to the output circuit;
The input/output memory basically consists of a program execution means for processing the data stored in the input/output memory according to an arbitrarily set user program, and rewriting the data in the input/output memory based on the processing results. The output update operation and program execution operation are alternately repeated.

ところで、この種のPLCのセールスポイントの
一つに、ユーザの制御仕様に対して如何に柔軟に
応えることができるかという点がある。すなわ
ち、ユーザ毎に入力点数と出力点数の割合及びこ
れらのトータル点数を如何に柔軟に変更できるか
によつて、この種PLCの市場性は大きく影響を受
けるのである。
By the way, one of the selling points of this type of PLC is how flexibly it can respond to the user's control specifications. That is, the marketability of this type of PLC is greatly influenced by how flexibly the ratio of input points to output points and the total number of these points can be changed for each user.

第1図は、本出願人が上記要望に応えるべく開
発しているユニツト型のPLCの一例を示すもので
ある。
FIG. 1 shows an example of a unit-type PLC developed by the applicant to meet the above-mentioned demands.

このPLCは、一台の装置に対して最大に4台の
メインユニツトMU−0〜MU−3が接続可能に
構成されている。
This PLC is configured so that a maximum of four main units MU-0 to MU-3 can be connected to one device.

コントローラ本体ユニツトCUは、プログラム
メモリPMと、入出力イメージメモリIMと、中央
処理装置CPUとから構成されている。そして、
中央処理装置CPUは、入出力イメージメモリIM
に記憶された入出力データに基づいて、プログラ
ムメモリPMに記憶されたユーザプログラムを実
行し、その実行結果を入出力イメージメモリIM
の出力データエリアに書込むとともに、一定のサ
イクルで入出力イメージメモリIMの出力データ
エリアに記憶されたデータを、外部データバス
DBMを介して各メインユニツトMU―0〜MU―
3へと転送し、また各メインユニツトMU―0〜
MU―3から取込まれる入力データを、入出力イ
メージメモリIMの入力データエリアに書込むよ
うに構成されている。
The controller main unit CU is composed of a program memory PM, an input/output image memory IM, and a central processing unit CPU. and,
The central processing unit CPU has input/output image memory IM
The user program stored in the program memory PM is executed based on the input/output data stored in the input/output image memory IM, and the execution results are transferred to the input/output image memory IM.
At the same time, the data stored in the output data area of the input/output image memory IM is written to the external data bus
Each main unit MU-0~MU- through DBM
3, and each main unit MU-0~
It is configured to write the input data taken in from the MU-3 into the input data area of the input/output image memory IM.

中央処理装置CPUからは2本のバスライン
(サブユニツトアドレス用のバスラインADS、外
部データ用のバスラインDBM)が延設され、サ
ブユニツトアドレス用のバスラインADS上には
4個のコネクタ(第1のコネクタ群)CN10〜
CN―13が設けられており、また外部データバ
スラインDBM上にも4個のコネクク(第2のコ
ネクタ群)CN―20〜CN―23が設けられてい
る。そして、前述のメインユニツトMU―0〜
MU―3は、それぞれ各コネクタ(CN―10,
CN―20)〜(コネクタCN―13、CN―2
3)に対して、自由に接続可能なように構成され
ている。また、コネクタCN―10〜コネクタCN
―13には、コントローラ本体ユニツトCU内に
設けられたデコーダDEC1の各デコードライン
US0〜US3が、バスラインADSとともに供給さ
れている。また、各メインユニツトMU―0〜
MU―3内には、内部データバスDBSが設けられ
ており、この内部データバスDBSは、コネクタ
CN―20〜コネクタCN―23をそれぞれ介し
て、前述のコントローラ本体ユニツトCUへ通ず
る外部データバスラインDBMへと接続されてい
る。そして、内部データバスラインDBS上には、
4個のコネクタCN―30〜CN―33が設けられ
ており、これらのコネクタCNにはサブユニツト
SU―0〜SU―3が接続可能に構成されている。
サブユニツトSU―0〜SU―3は、それぞれ8個
の外部端子Tを扱うように構成されている。ま
た、サブユニツトSU(OUT)は、出力サブユニ
ツトとして構成され、サブユニツトSU(IN)
は、入力サブユニツトとして構成されている。こ
こで、出力サブユニツトとは、いわゆる出力デー
タラツチ回路等によつて構成されたインターフエ
イス回路であり、また入力サブユニツトとは、い
わゆるI/Vコンバータとその出力側に設けられ
たゲート回路等によつて構成されるものである。
そして、各コネクタCN―30〜CN―33には、
コネクタCN―10〜CN―13に接続されたデコ
ーダDEC2の各デコードラインIS0〜IS3が供
給されている。
Two bus lines (bus line ADS for subunit address, bus line DBM for external data) are extended from the central processing unit CPU, and four connectors ( 1st connector group) CN10~
CN-13 is provided, and four connectors (second connector group) CN-20 to CN-23 are also provided on the external data bus line DBM. And the aforementioned main unit MU-0~
MU-3 has each connector (CN-10,
CN-20) ~ (Connector CN-13, CN-2
3), it is configured so that it can be freely connected. In addition, connector CN-10 to connector CN
-13 indicates each decode line of the decoder DEC1 installed in the controller main unit CU.
US0 to US3 are supplied together with the bus line ADS. In addition, each main unit MU-0~
An internal data bus DBS is provided in the MU-3, and this internal data bus DBS is connected to the connector.
It is connected to the external data bus line DBM leading to the controller main unit CU mentioned above via the connectors CN-20 to CN-23, respectively. And on the internal data bus line DBS,
Four connectors CN-30 to CN-33 are provided, and these connectors CN are connected to subunits.
SU-0 to SU-3 are configured to be connectable.
Each of the subunits SU-0 to SU-3 is configured to handle eight external terminals T. Also, subunit SU(OUT) is configured as an output subunit, and subunit SU(IN)
is configured as an input subunit. Here, the output subunit is an interface circuit composed of a so-called output data latch circuit, etc., and the input subunit is a so-called I/V converter and a gate circuit provided on its output side. It is composed of
And for each connector CN-30 to CN-33,
Each decode line IS0 to IS3 of the decoder DEC2 connected to the connectors CN-10 to CN-13 is supplied.

かくして、コネクタCN―10〜CN―13は、
前述したように、コントローラ本体ユニツトCU
内のデコーダDEC1の出力によつてアドレス割
り当てされており、また各コネクタCN―30〜
CN―33は、各メインユニツトMU内に内蔵さ
れたデコーダDEC2の各デコードラインIS0〜
IS3によつてアドレス割り当てがなされている訳
である。
Thus, connectors CN-10 to CN-13 are
As mentioned above, the controller main unit CU
Addresses are assigned by the output of decoder DEC1 in the connector CN-30~
CN-33 connects each decode line IS0 to IS0 of the decoder DEC2 built in each main unit MU.
Address assignment is done by IS3.

また、この例ではサブユニツトアドレス用のバ
スラインADSは、中央処理装置CPUから出力さ
れるラインA0〜A3の上位2ビツトのラインA
0,A1によつて構成されており、また外部デー
タバスラインDBMは、中央処理装置CPUから出
力されるラインD0〜D7によつて構成されてい
る。更に、ラインA0〜A3の下位2ビツトライ
ンA2,A3は、前述の如くデコーダDEC1に
よつてデコードされ、デコーダDEC1の出力側
に設けられたデコードラインUS0〜US3を択一
的に駆動することになる。
In this example, the subunit address bus line ADS is the upper two bits of lines A0 to A3 output from the central processing unit CPU.
The external data bus line DBM is composed of lines D0 to D7 output from the central processing unit CPU. Further, the lower two bit lines A2 and A3 of lines A0 to A3 are decoded by the decoder DEC1 as described above, and selectively drive the decode lines US0 to US3 provided on the output side of the decoder DEC1. .

以上の構成によれば、中央処理装置CPUから
出力されるラインA2,A3によつてラインUS
0〜US3の一つが駆動されると、当該ラインUS
によつて指定されたコネクタCN―10〜CN―1
3に接続されたデコーダDEC2が能動化され
る。デコーダDEC2が能動かされると、その時
点においてサブユニツトアドレス用のバスライン
ADSに送出されているサブユニツトアドレス信
号は、デコーダDEC2によつてデコードされ、
この結果デコードラインIS0〜IS3の一つが択一
的に駆動される。このようにして、ラインIS0〜
IS3が択一的に駆動されると、当該駆動されたラ
インISに対応するコネクタCN―30〜CN―33
に接続されたサブユニツトSU―0〜サブユニツ
トSU―3の一つが択一的に能動化される。この
結果、当該能動化されたサブユニツトSUが出力
サブユニツトであつた場合には、当該サブユニツ
トSUに接続される8個の外部端子Tに対して、
入出力イメージメモリIMに記憶されている出力
データがバスラインDBM,DBSを介して転送さ
れる。これに対して、当該能動化されたサブユニ
ツトが入力サブユニツトであつた場合には、当該
サブユニツトSUに接続された8個の外部端子T
からのデータは、バスラインDBS,DBMを介し
て入出力イメージメモリIM内の該当する入力エ
リアに書込まれることになる。
According to the above configuration, the line US
When one of 0 to US3 is driven, the corresponding line US
Connectors CN-10 to CN-1 specified by
The decoder DEC2 connected to 3 is activated. When the decoder DEC2 is activated, at that moment the bus line for the subunit address
The subunit address signal sent to ADS is decoded by decoder DEC2,
As a result, one of the decode lines IS0 to IS3 is selectively driven. In this way, the line IS0~
When IS3 is driven alternatively, connectors CN-30 to CN-33 corresponding to the driven line IS
One of the subunits SU-0 to SU-3 connected to the subunit SU-0 to SU-3 is alternatively activated. As a result, if the activated subunit SU is an output subunit, for the eight external terminals T connected to the subunit SU,
Output data stored in the input/output image memory IM is transferred via bus lines DBM and DBS. On the other hand, if the activated subunit is an input subunit, the eight external terminals T connected to the subunit SU
The data is written to the corresponding input area in the input/output image memory IM via the bus lines DBS and DBM.

このようにして、このPLCによれば入出力点数
が32点を越えた場合についてはメインユニツト
MUの数を増設することによつて応えることがで
き、また各メインユニツトMU内における出力点
数と入力点数との割合を変更したい場合には、サ
ブユニツトSUの数あるいは種類を出力サブユニ
ツトSU(OUT)、入力サブユニツトSU(IN)に
変更するかによつて自在に対応することができる
のである。
In this way, according to this PLC, when the number of input/output points exceeds 32, the main unit
This can be achieved by increasing the number of MUs, or if you want to change the ratio between the number of output points and the number of input points within each main unit MU, you can change the number or type of subunit SUs by changing the number or type of subunit SU (OUT). This can be handled freely by changing the input subunit SU(IN).

また、このPLCにおいては、コネクタCN―1
0〜CN―13及びコネクタCN―30〜CN―3
3に対して、ラインUS0〜US3あるいはライン
IS0〜IS3を介してアドレス割り当てをするよう
に構成しているため、各サブユニツトSUあるい
は各メインユニツトMUの内部に、個有のコード
設定機やコード一致判別回路等を設けずとも各ユ
ニツトに対するアドレツシング動作を行なうこと
ができる。この結果、サブユニツトSUあるいは
メインユニツトMUとしては、予め同一構成のも
のを多数用意しておくことが可能となり、量産効
果によるコストダウンも期待することができる等
のメーカー側より見た様々な利点が有る。
Also, in this PLC, connector CN-1
0~CN-13 and connector CN-30~CN-3
3, line US0 to US3 or line
Since the configuration is such that addresses are assigned via IS0 to IS3, addressing for each unit can be done without installing a unique code setting machine or code matching judgment circuit inside each subunit SU or each main unit MU. can perform actions. As a result, it is possible to prepare many subunits SU or main unit MU with the same configuration in advance, which has various advantages from the manufacturer's point of view, such as the possibility of cost reduction due to mass production effects. Yes.

ところが、このPLCをユーザ側から見た場合に
は、次のような不都合がある。今仮に、第1図に
示す如く、サブユニツト用のアドレスバスライン
ADS及び外部データバスラインDBM上に、それ
ぞれ4個のコネクタCN―10〜CN―13、コネ
クタCN―20〜CN―23が設けられており、す
なわち4台のメインユニツトMU―0〜MU―3
が量大接続できるものとする。そして、非制御対
象が例えば第1号機から第4号機等のように4つ
の機器に分割されており、各機器毎にメインユニ
ツトMU―0〜MU―3を割り当てるものとす
る。このような場合、メインユニツトMU―0〜
MU―3には、それぞれ32個の入出力点数の接続
が可能であるが、各機器に対しては必ずしも全て
の入出力点数が必要であるとは限らない。そこ
で、今仮に第1図に示す如く、メインユニツト
MU―0に対応する機器が入出力点数を16Uが必
要としないものとすると、サブユニツトSU―
2、SU―3は接続されないこととなる。また、
メインユニツトMU―2に対応する機器が未だ設
置されていないような場合には、コネクタCN―
12、コネクタCN―22には何も接続されな
い、いわゆる空きの状態となるのである。
However, when this PLC is viewed from the user's side, it has the following disadvantages. For example, as shown in Figure 1, address bus lines for subunits
Four connectors CN-10 to CN-13 and four connectors CN-20 to CN-23 are provided on the ADS and external data bus line DBM, respectively, which means four main units MU-0 to MU-3.
It is assumed that a large number of connections can be made. Assume that the non-controlled objects are divided into four devices, such as the first to fourth devices, and main units MU-0 to MU-3 are assigned to each device. In such a case, main unit MU-0~
Each MU-3 can be connected with 32 input/output points, but not all input/output points are necessarily required for each device. Therefore, as shown in Figure 1, the main unit
Assuming that the equipment corresponding to MU-0 does not require 16U input/output points, the subunit SU-
2. SU-3 will not be connected. Also,
If a device compatible with main unit MU-2 is not yet installed, connect connector CN-
12. Nothing is connected to the connector CN-22, which is what is called an empty state.

一方、このPLCにおいては、入出力イメージメ
モリIMとして例えば1ワード8ビツトのメモリ
が使用されており、また第2図に示す如く、各潜
在的外部端子T0〜T127は、入出力イメージ
メモリIMの先頭アドレスより1バイドずつ順次
対応するように予めアドレス割り当てされてい
る。この結果、前述の如く外部端子T16〜T3
6、外部端子T64〜T95に対応するコネクタ
が空の状態であると、入出力イメージメモリIM
内におけるデータ配列は第2図に示す如く、当該
一連の外部端子Tに対応する領域は空の状態とな
つてしまう。
On the other hand, in this PLC, a memory of 8 bits per word, for example, is used as the input/output image memory IM, and as shown in FIG. 2, each potential external terminal T0 to T127 is connected to the input/output image memory IM. Addresses are allocated in advance so as to correspond sequentially one byte at a time starting from the first address. As a result, as mentioned above, the external terminals T16 to T3
6. If the connectors corresponding to external terminals T64 to T95 are empty, the input/output image memory IM
As shown in FIG. 2, the area corresponding to the series of external terminals T becomes empty.

また、この種PLCにおける入出力イメージメモ
リIMのアドレスとは、通常ユーザプログラムに
おいて使用される入力命令に付される数値に直接
対応されている。従つて、前述の如く外部端子T
16〜T31、外部端子T61〜T95が空の状
態であるということは、すなわちユーザプログラ
ムにおいて使用される外部入出力番号が不連続に
なるということを意味するのである。
Further, the address of the input/output image memory IM in this type of PLC directly corresponds to a numerical value attached to an input command normally used in a user program. Therefore, as mentioned above, the external terminal T
16 to T31 and external terminals T61 to T95 are empty, which means that the external input/output numbers used in the user program are discontinuous.

ところで、この種のPLCにおいてプログラミン
グを行なう場合には、外部入出力番号と内部入力
番号(内部リレーの番号)とは、それぞれ連続番
号であることが好ましく、このように外部出力あ
るいは入力番号が不連続であるとユーザプログラ
ムの設計に際してプログラミングミスを発生させ
る原因になるのである。
By the way, when programming in this type of PLC, it is preferable that the external input/output number and the internal input number (internal relay number) are consecutive numbers, and in this way, the external output or input number is If they are continuous, programming errors may occur when designing a user program.

この発明は、上記の問題を解決するためになさ
れたもので、その目的とするところは、ユーザ側
の広範な使用に対して柔軟に応えることができる
とともに、ユーザ側においては外部端子に外部機
器が不連続に接続されている場合にも、ユーザ命
令においては入出力番号の配列が連続番号となる
ようにしたPLCを提供することにある。
This invention was made in order to solve the above problem, and its purpose is to be able to flexibly respond to a wide range of uses by users, and to allow users to connect external devices to external terminals. The object of the present invention is to provide a PLC in which the input/output numbers are arranged in consecutive numbers according to user instructions even when the PLCs are connected discontinuously.

すなわち、この発明は入力回路から得られる入
力データを入出力メモリに書込むとともに、この
入出力メモリに記憶された出力データを読出して
出力回路に供給する入出力更新手段と、前記入出
力メモリの記憶データを任意に設定されるユーザ
プログラムに従つて演算処理し、その処理結果に
基づいて前記入出力メモリのデータを書換えるプ
ログラム実行手段とを備えるもので; 前記入力回路及び出力回路は、それぞれ一定点
数の入力又は出力を扱う入力サブユニツト又は出
力サブユニツトを双方含めて一定のサブユニツト
数だけ扱うメインユニツトにユニツト構成され; 前記メインユニツト内には、内部データバスラ
インとサブユニツト用のアドレスデコーダとが設
けられ; 前記メインユニツト内のアドレスデコーダは、
コントローラ本体のサブユニツト用アドレスライ
ン上に、各別にアドレス割当てされて設けられた
第1のコネクタ群に、位置指定を受けることなく
任意に接続でき; 前記メインユニツト内の内部データバスライン
は、コントローラ本体の外部データバスライン上
に設けられた第2のコネクタ群に任意に接続で
き; 前記メインユニツト内の各サブユニツトは、前
記内部データバスライン上に、前記アドレスデコ
ーダの出力で各別にアドレス割当てされて設けら
れた第3のコネクタ群に位置指定を受けることな
く任意に接続でき; 前記入出力更新手段は、前記各第1のコネクタ
をアドレス指定し、かつ該第1のコネクタを介し
て前記第3のコネクタをアドレス指定して、前記
各入力サブユニツトから前記入出力メモリへの入
力データの書込みが、あるいは前記入出力メモリ
から前記各出力サブユニツトへの出力データの読
出しかを実行するように構成されたプログラマブ
ル・ロジツク・コントローラにおいて; 前記各メインユニツト側に、当該メインユニツ
ト内の各サブユニツトが、入力サブユニツト、出
力サブユニツトあるいはサブユニツトが接続され
ていないかを表わすサブユニツト識別データを出
力するサブユニツト識別回路を、前記内部データ
バスラインに接続して設けるとともに; コントローラ本体から送出される切替信号に応
答して、前記内部データバスラインをサブユニツ
ト側か、あるいはサブユニツト識別回路側かに切
替接続する接続切替回路を設け; かつ、前記コントローラ本体側には、各メイン
ユニツトから内部及び外部データバスラインを介
して取込まれる前記サブユニツト識別データを所
定フオーマツトで記憶するための識別データメモ
リと; 前記入出力更新に前以て前記各メインユニツト
を順次アドレス順に走査すると同時に、各メイン
ユニツトに切替信号を送出して、切替接続回路を
サブユニツト識別回路側に切替え、各サブユニツ
ト識別データを内部及び外部データバスを介して
コントローラ本体側に取込み、これを識別データ
メモリに書込むサブユニツト構成走査手段とを設
け; 前記入出力更新手段で、前記入出力メモリの各
記憶エリアをサブユニツト単位で順次アクセスす
るとき、各エリア毎に前記識別データメモリに記
憶された各サブユニツト識別データを一定のアド
レス順にサブユニツト単位で検索し、その検索に
よつて順次検出されるサブユニツト識別データが
「出力サブユニツト」を示しているサブユニツト
のアドレスに関しては、前記入出力メモリの当該
アクセスされているエリアのデータを読出して前
記検出されたアドレスのサブユニツトに転送し; 前記検索によつて順次検出されるサブユニツト
識別データが「入力サブユニツト」を示している
サブユニツトのアドレスに関しては、前記検出さ
れたサブユニツトのアドレスからのデータを前記
入出力メモリの当該アクセスされているエリアに
書込むように構成したことを特徴とするものであ
る。
That is, the present invention includes an input/output updating means for writing input data obtained from an input circuit into an input/output memory, reading out output data stored in the input/output memory, and supplying the output data to the output circuit; and program execution means for performing arithmetic processing on stored data according to an arbitrarily set user program and rewriting data in the input/output memory based on the processing results; the input circuit and the output circuit each have The unit consists of a main unit that handles only a fixed number of subunits, including both input subunits and output subunits that handle a fixed number of inputs or outputs; the main unit is provided with an internal data bus line and an address decoder for the subunits. The address decoder in the main unit is
The internal data bus lines in the main unit can be connected to the first group of connectors, each of which is individually assigned an address, on the address line for the subunits of the controller body without having to specify the position; can be arbitrarily connected to a second group of connectors provided on an external data bus line of the main unit; each subunit in the main unit is individually assigned an address on the internal data bus line by the output of the address decoder; The input/output updating means can be arbitrarily connected to the provided third connector group without receiving position designation; is configured to address a connector of said input subunit to write input data to said input/output memory, or read output data from said input/output memory to said respective output subunit. In the programmable logic controller: Each of the main units includes a subunit identification circuit that outputs subunit identification data indicating whether each subunit in the main unit is connected to an input subunit, an output subunit, or no subunit. A connection switching circuit is provided to be connected to the internal data bus line, and to switch the internal data bus line to either the subunit side or the subunit identification circuit side in response to a switching signal sent from the controller main body; and, on the controller main body side, an identification data memory for storing the subunit identification data taken in from each main unit via internal and external data bus lines in a predetermined format; While scanning each of the main units in address order, at the same time sending a switching signal to each main unit, switching the switching connection circuit to the subunit identification circuit side, and transmitting each subunit identification data to the controller main body side via the internal and external data bus. and subunit configuration scanning means for reading the identification data into the identification data memory; and when the input/output updating means sequentially accesses each storage area of the input/output memory in units of subunits, the identification data is scanned for each area. Each subunit identification data stored in memory is searched for each subunit in a fixed address order, and for the address of a subunit whose subunit identification data sequentially detected by the search indicates an "output subunit", the input/output Read the data in the accessed area of the memory and transfer it to the subunit at the detected address; Regarding the address of the subunit whose subunit identification data sequentially detected by the search indicates "input subunit" , the data from the address of the detected subunit is written into the accessed area of the input/output memory.

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

第3図は、この発明に係わるPLCの電気的な構
成を示すブロツク図である。なお、同図におい
て、第1図の従来例と同一構成の部分について
は、同符号を付して説明は省略する。
FIG. 3 is a block diagram showing the electrical configuration of the PLC according to the present invention. In addition, in this figure, the same reference numerals are given to the parts having the same configuration as those of the conventional example shown in FIG. 1, and the explanation thereof will be omitted.

同図に示す如く、この発明のPLCのハードウエ
アとしての特徴は次のようになる。
As shown in the figure, the hardware features of the PLC of this invention are as follows.

まず、各メインユニツトMU内には、当該メイ
ンユニツトMU内のサブユニツトSUの構成、す
なわち数及び種類を表わすデータを設定するため
のコード設定器CODEが設けられていること、及
びこのコード設定器CODEはインターフエイス回
路IFCを介して、内部データバスDBSに接続され
ていること、及びコントローラ本体ユニツトCU
のデコーダDEC1から出力されるデコードライ
ンUSを、コントローラ本体ユニツトCUから送出
される切替信号RES2に応答してインターフエ
イス回路IFC側、あるいはデコーダDEC2側に切
替える切替回路が設けられていること及び、前記
コントローラ本体ユニツトCUから送出される切
替信号は各サブユニツトSUへ非能動化信号とし
て供給されていることにある。
First, each main unit MU is provided with a code setter CODE for setting data representing the configuration, ie, number and type, of subunits SU within the main unit MU, and this code setter CODE is connected to the internal data bus DBS via the interface circuit IFC, and the controller main unit CU
A switching circuit is provided for switching the decode line US outputted from the decoder DEC1 of the controller unit CU to the interface circuit IFC side or the decoder DEC2 side in response to a switching signal RES2 sent from the controller main unit CU; The switching signal sent from the controller main unit CU is supplied to each subunit SU as a deactivation signal.

コントローラ本体ユニツトCU側には、前記切
替信号を信号ラインRES2に送出するための、
切替信号送出回路が設けられている。この切替信
号送出回路は、電源投入検出回路PRESと、オア
ゲートORとにより構成されており、これらの回
路の動作を第6図のタイミングチヤートに示す。
On the controller main unit CU side, for sending the switching signal to the signal line RES2,
A switching signal sending circuit is provided. This switching signal sending circuit is composed of a power-on detection circuit PRES and an OR gate, and the operation of these circuits is shown in the timing chart of FIG.

他方、前述のメインユニツトMU内のコード設
定器CODEの各ビツトの内容は次のように決定さ
れている。
On the other hand, the contents of each bit of the code setter CODE in the main unit MU mentioned above are determined as follows.

UNT;オンでユニツト有り、オフでユニツト
なし。
UNT: When on, there is a unit; when off, there is no unit.

INU;オンで入力サブユニツト、オフで出力サ
ブユニツトを表わす。
INU: On indicates input subunit, off indicates output subunit.

MIX;オンで出力サブユニツト、入力サブユニ
ツトの混合ユニツトを表わす。但し、本実施例で
は、割合ユニツトは出力ユニツト数と入力ユニツ
ト数は同等とし、出力サブユニツトは常に各メイ
ンユニツトMU内の先に接続されるようになされ
ている。
MIX: When on, indicates a mixed unit of output subunit and input subunit. However, in this embodiment, the proportion units have the same number of output units and input units, and the output subunits are always connected first in each main unit MU.

N1;オンでメインユニツトの中に8点のサブ
ユニツトSUが1ユニツトあることを示す。
N1: On indicates that there is one 8-point subunit SU in the main unit.

N2;オンでメインユニツトMUの中に8点のサ
ブユニツトSUが2ユニツトあることを示す。
N2: On indicates that there are two 8-point subunits SU in the main unit MU.

N3;オンでメインユニツトMUの中に8点のサ
ブユニツトSUが3ユニツトあることを示す。
N3: On indicates that there are 3 8-point subunits SU in the main unit MU.

N4;オンでメインユニツトMUの中に8点のサ
ブユニツトSUが4ユニツトあることを示す。
N4: On indicates that there are 4 8-point subunits SU in the main unit MU.

他方、コントローラ本体ユニツトCUを構成す
る中央処理装置CPU内のワーキングエリアに
は、第4図に示すごときテーブルメモリが設けら
れている。同図に示す如く、このテーブルメモリ
は0番地から7番地までの8個のアドレスエリア
を有する。そして、相連続する2個のアドレスに
は、各メインユニツトMU内のサブユニツトSU
の構成を示すデータが記憶される。すなわち、テ
ーブルメモリ内の0〜1,2〜3,4〜5,6〜
7の各番地には、メインユニツトMU―0〜MU
―3内の各サブユニツトSUの構成を表すデータ
が記憶される。そして、各連続する2個のアドレ
スの先のアドレスには、当該メインユニツトMU
内に入力出力多分のサブユニツトが存在すると
き、各メインユニツトMU内に存在する出力サブ
ユニツトSU(OUT)に関するデータが記憶さ
れ、また後のアドレスには、各メインユニツト
MU内に存在する入力サブユニツトSU(IN)に
関するデータが記憶される。
On the other hand, a table memory as shown in FIG. 4 is provided in the working area of the central processing unit CPU constituting the controller main unit CU. As shown in the figure, this table memory has eight address areas from address 0 to address 7. Then, two consecutive addresses are assigned to the subunit SU in each main unit MU.
Data indicating the configuration of is stored. That is, 0-1, 2-3, 4-5, 6- in the table memory
At each address of 7, there are main units MU-0 to MU.
-3, data representing the configuration of each subunit SU is stored. Then, the address after each two consecutive addresses contains the main unit MU.
When there are subunits with multiple inputs and outputs within each main unit MU, the data regarding the output subunit SU (OUT) that exists within each main unit MU is stored, and the later address contains the data for each main unit MU.
Data regarding the input subunit SU(IN) present within the MU is stored.

また、テーブルメモリの各アドレスは、先頭
IMアドレス記憶欄、ユニツト数記憶欄、I/O
記憶欄及びSU有無記憶欄からなる4つの欄に区
画されている。先頭IMアドレス記憶欄には、各
メインユニツトMU内に存在する出力サブユニツ
トSU(OUT)群、または入力サブユニツトSU
(IN)群の中で、各群の最初のサブユニツトSUの
データが対応されるべき入出力イメージメモリ
IM内のアドレスが記憶される。ユニツト数記憶
欄には、前記入力または出力サブユニツトSU群
を構成する全サブユニツトSUの数が入出力サブ
ユニツト別に記憶される。I/O記憶欄には、当
該サブユニツトSU群が入力サブユニツトあるい
は出力サブユニツトのいずれであるかを示すデー
タが記憶される。SU有無記憶欄には、各サブユ
ニツトSUに対応するコネクタCN―30〜CN―
33に、サブユニツトSUが接続されているか否
かを示すデータが記憶される。
Also, each address of the table memory is
IM address storage field, unit number storage field, I/O
It is divided into four columns consisting of a memory column and a SU presence/absence memory column. The first IM address storage column contains the output subunit SU (OUT) group or input subunit SU existing in each main unit MU.
(IN) In the group, the input/output image memory to which the data of the first subunit SU of each group is to be corresponded.
The address in IM will be remembered. In the unit number storage column, the number of all subunits SU constituting the input or output subunit SU group is stored for each input/output subunit. The I/O storage column stores data indicating whether the subunit SU group is an input subunit or an output subunit. The SU presence/absence memory column shows the connectors CN-30 to CN- corresponding to each subunit SU.
33 stores data indicating whether or not the subunit SU is connected.

次に、第7図はこの発明に係わるPLCの動作を
説明するためのフローチヤートである。このフロ
ーチヤートを構成する各ステツプの内容を順次列
挙すると次のようになる。
Next, FIG. 7 is a flowchart for explaining the operation of the PLC according to the present invention. The contents of each step constituting this flowchart are enumerated in sequence as follows.

ステツプ(1);入出力イメージメモリIMに記憶
された入出力データに基づいて、プログラムメモ
リPMに記憶されたユーザプログラムを実行し、
その実行結果を再び入出力イメージメモリIMの
出力データエリアに記憶する。
Step (1); Based on the input/output data stored in the input/output image memory IM, execute the user program stored in the program memory PM,
The execution result is stored again in the output data area of the input/output image memory IM.

ステツプ(2);テーブルメモリ用のアドレスレジ
スタの内容を0にセツトする。
Step (2): Set the contents of the address register for table memory to 0.

ステツプ(3);テーブルメモリ用のアドレスレジ
スタで指定されるアドレスの内容を、テーブルメ
モリから読み出す。
Step (3): Read the contents of the address specified by the table memory address register from the table memory.

ステツプ(4);ステツプ(3)で読み出されたデータ
のSU有無欄に、“1”が存在するか否かを判定
し、その判定結果がYESの場合にはステツプ(5)
に進み、NOの場合にはステツプ(17)へ進む。
Step (4): Determine whether "1" exists in the SU presence/absence column of the data read in step (3), and if the determination result is YES, proceed to step (5).
If NO, proceed to step (17).

ステツプ(5);入出力イメージメモリIM用のア
ドレスレジスタに、ステツプ(3)で読み出されたデ
ータの先頭IMアドレス欄の内容をセツトする。
Step (5): Set the contents of the first IM address column of the data read in step (3) in the address register for input/output image memory IM.

ステツプ(6);所定のユニツト数記憶用のレジス
タに、前記ステツプ(3)で読み出されたデータのユ
ニツト数記憶欄の内容をセツトする。
Step (6): Set the contents of the unit number storage column of the data read in step (3) in a predetermined unit number storage register.

ステツプ(7);その時点におけるテーブルメモリ
用のアドレスレジスタの記憶内容に基づいて、
US番号を求め、これを所定のレジスタに記憶さ
せる。
Step (7); Based on the contents of the address register for table memory at that time,
Determine the US number and store it in a designated register.

ステツプ(8);テーブルメモリ用のアドレスレジ
スタの記憶内容が偶数であるか否かを判定し、そ
の判定結果がYESの場合にはステツプ(9)へ進
み、NOの場合にはステツプ(10)へ進む。
Step (8): Determine whether the contents of the table memory address register are even numbers. If the determination result is YES, proceed to step (9); if NO, proceed to step (10). Proceed to.

ステツプ(9);IS番号用のレジスタの内容を0に
セツトする。
Step (9): Set the contents of the IS number register to 0.

ステツプ(10);前記ステツプ(3)で読み出されたデ
ータのI/O記憶欄に、“1”があるか否かを判
定し、その判定結果をがYESの場合にはステツ
プ(11)へ進み、NOの場合にはステツプ(12)へ進む。
Step (10): Determine whether "1" is present in the I/O storage column of the data read in step (3), and if the determination result is YES, proceed to step (11). If NO, proceed to step (12).

ステツプ(11);その時点における入出力イメージ
メモリIM用のアドレスレジスタの内容に基づい
て、入出力イメージメモリIMをアドレス指定
し、当該アドレス指定された記憶エリア内に、そ
の時のUS番号及びIS番号で指定される入力サブ
ユニツトSUからの入力データを取り込む。
Step (11): Address the input/output image memory IM based on the contents of the address register for the input/output image memory IM at that time, and store the current US number and IS number in the designated storage area. Retrieves input data from the input subunit SU specified by .

ステツプ(12);その時の入出力イメージメモリ
IM用のアドレスレジスタの内容に基づいて、入
出力イメージメモリIMをアドレス指定し、当該
アドレスの記憶内容を、その時のUS番号とIS番
号とにより指定される出力サブユニツトSUへと
転送する。
Step (12); Input/output image memory at that time
The input/output image memory IM is addressed based on the contents of the address register for IM, and the stored contents of the address are transferred to the output subunit SU specified by the US number and IS number at that time.

ステツプ(13);入出力イメージメモリIM用
のアドレスレジスタの内容を一つ更新する。
Step (13): Update one content of the address register for input/output image memory IM.

ステツプ(14);IS番号用のアドレスレジスタ
の内容を一つ更新する。
Step (14): Update one content of the address register for IS number.

ステツプ(15);ユニツト数記憶用レジスタの
内容から1を減算する。
Step (15): Subtract 1 from the contents of the unit number storage register.

ステツプ(16);ユニツト数記憶用レジスタの
内容が0になつたか否かを判定し、その判定結果
がYESの場合にはステツプ(17)へ進み、NOの
場合にはステツプ(10)へ戻る。
Step (16): Determine whether the contents of the unit number storage register have become 0 or not. If the determination result is YES, proceed to step (17); if NO, return to step (10). .

ステツプ(17);テーブルメモリ用のアドレス
レジスタの内容を一つ更新する。
Step (17): Update one content of the address register for table memory.

ステツプ(18);テーブルメモリが最終アドレ
スまで読み出されたか否かを判定し、その判定結
果がYESの場合にはステツプ(1)へ戻り、NOの場
合にはステツプ(3)へと戻る。
Step (18): Determine whether the table memory has been read to the final address. If the determination result is YES, return to step (1); if NO, return to step (3).

次に、以上の構成よりなるPLCの動作を第5図
及び第7図のフローチヤートに基づいて系統的に
説明する。
Next, the operation of the PLC having the above configuration will be systematically explained based on the flowcharts of FIGS. 5 and 7.

商用電源ACがコントローラ本体ユニツトCUと
電源投入検出回路PRESに投入されると、電源投
入検出回路PRESは信号ラインRESO上に所望の
リセツト信号を第4図に示す如く所定の時間出力
する。この信号は中央処理装置CPUのリセツト
入力及びオアゲートORに入力される。信号ライ
ンRESO上の信号が解除されると、中央処理装置
CPUはイニシヤル処理を開始し、ただちに信号
ラインRES1を介して、オアゲートORに信号を
入力する。従つて、オアゲートORの出力信号ラ
インRES2上の信号は継続して能動状態とな
る。信号ラインRES2上の信号が能動状態にな
ると、アンドゲートAND1は能動条件となり、
アンドゲートAND2は反転ゲートNOT1の出力
信号により非能動状態となる。又、信号ライン
RES2上の信号により各メインユニツトMUの中
のサブユニツトSUは初期リセツトされる。
When commercial power AC is applied to the controller main unit CU and the power-on detection circuit PRES, the power-on detection circuit PRES outputs a desired reset signal on the signal line RESO for a predetermined period of time as shown in FIG. This signal is input to the reset input of the central processing unit CPU and to the OR gate OR. When the signal on signal line RESO is released, the central processing unit
The CPU starts initial processing and immediately inputs a signal to the OR gate OR via the signal line RES1. Therefore, the signal on the output signal line RES2 of the OR gate OR remains active. When the signal on the signal line RES2 becomes active, the AND gate AND1 becomes an active condition;
The AND gate AND2 becomes inactive due to the output signal of the inverting gate NOT1. Also, signal line
The subunit SU in each main unit MU is initially reset by the signal on RES2.

中央処理装置CPUはイニシヤル処理の中で、
ラインA2A3を介してアドレス信号をデコーダ
DEC1に出力し、メインユニツトMU―0〜メイ
ンユニツトMU―3の順で選択するようにする。
During the initial processing, the central processing unit CPU
Decoder address signals via lines A2A3
Output to DEC1 and select in the order of main unit MU-0 to main unit MU-3.

まず、ラインUSO上に信号が出力されメイン
ユニツトMU―0が選択されると、メインユニツ
トMU―0に配置される第1ユニツトのアンドゲ
ートAND1の出力は能動となり、インターフエ
イス回路IFCを能動状態にする。インターフエイ
ス回路IFCが能動になると、コード設定器CODE
の設定内容がラインD0〜D7にのつて中央処理
装置CPUに取込まれる。
First, when a signal is output on line USO and main unit MU-0 is selected, the output of the AND gate AND1 of the first unit placed in main unit MU-0 becomes active, and the interface circuit IFC is activated. Make it. When the interface circuit IFC becomes active, the code setter CODE
The setting contents are taken into the central processing unit CPU along lines D0 to D7.

メインユニツトMU―0に配置されている第1
ユニツトの例では、UNT(オン)、MIX(オ
ン)、N2(オン)となつており、それ以外のビ
ツトは全てオフされている。すなわち、入力及び
出力サブユニツトSUが混合されている6点の混
合ユニツトを表している。
The first unit located in main unit MU-0
In the unit example, UNT (on), MIX (on), and N2 (on) are set, and all other bits are turned off. That is, it represents a six-point mixing unit in which input and output subunits SU are mixed.

次に、コントローラ本体ユニツトCUはライン
US1を選択し、同様にメインユニツトMU―1
に配置されている第2ユニツトのコード設定器
CODEの内容を中央処理装置CPUに取込む。
Next, the controller main unit CU is
Select US1, and similarly select main unit MU-1.
The code setting device of the second unit located in
Load the contents of CODE into the central processing unit CPU.

同様にして、順次メインユニツトMU―3に配
置されている第3ユニツトまでコード設定器
CODEの内容が中央処理装置CPUに取込まれ
る。
In the same way, the code setting devices are sequentially installed up to the third unit located in main unit MU-3.
The contents of CODE are taken into the central processing unit CPU.

そして、全ユニツトのコード設定器CODEの出
力が中央処理装置CPUに取込まれると、信号ラ
インRES1上の信号をT時間後能動にし、ユー
ザプログラムの実行に入る。なお、上述の過程で
中央処理装置CPUに取込まれた各コード設定器
CODEからのデータは、中央処理装置CPU内の
ワーキングエリアにおいて所定の編集が行なわ
れ、最終的に第4図に示すごとく表となつてテー
ブルメモリ内に記憶される。
Then, when the outputs of the code setters CODE of all units are taken in by the central processing unit CPU, the signal on the signal line RES1 is made active after a time T, and the execution of the user program is started. In addition, each code setting device taken into the central processing unit CPU in the above process
The data from CODE is subjected to predetermined editing in a working area within the central processing unit CPU, and is finally stored in a table memory in the form of a table as shown in FIG.

先ず、電源が投入されると、プログラムの実行
に先だつて、第5図の基本フローチヤートに示す
如くイニシヤル処理が実行される。このイニシヤ
ル処理によつて、第6図に示す如く各メインユニ
ツトMU内のサブユニツトSUは順次走査され、
当該走査されたタイミングにおいて、ライン
UNT及びラインINUを介して各コネクタCN―3
0〜CN―33にサブユニツトSUが接続されてい
るか否か、及び接続されたサブユニツトSUが入
力サブユニツトであるか、あるいは出力サブユニ
ツトであるかを示すデータが順次中央処理装置
CPUに取り込まれる。次いで、取り込まれた各
データは中央処理装置CPU内のワーキングエリ
アにおいて編集されて、最終的に第4図に示す如
く、テーブルメモリ内の各アドレスエリアへと記
憶されることになる。
First, when the power is turned on, initial processing is executed as shown in the basic flowchart of FIG. 5, prior to program execution. Through this initial processing, the subunits SU within each main unit MU are sequentially scanned as shown in FIG.
At the scanned timing, the line
Each connector CN-3 through UNT and line INU
Data indicating whether a subunit SU is connected to 0 to CN-33 and whether the connected subunit SU is an input subunit or an output subunit is sequentially sent to the central processing unit.
captured by the CPU. Next, each piece of data taken in is edited in a working area within the central processing unit CPU, and finally stored in each address area within the table memory, as shown in FIG.

次いで、第7図に示すステツプ(1)が実行される
と、その時点の入出力イメージメモリIMの入出
力データに基づいて、プログラムメモリPM内に
記憶されたユーザプログラムが順次実行され、そ
の実行結果は再び入出力イメージメモリIMの出
力エリアへと格納される。
Next, when step (1) shown in FIG. 7 is executed, the user programs stored in the program memory PM are sequentially executed based on the input/output data of the input/output image memory IM at that time. The result is stored again in the output area of the input/output image memory IM.

次いで、ステツプ(2)および(3)が順次実行される
と、中央処理装置CPU内にテーブルメモリの0
番地の内容が取り込まれる。この取り込まれたデ
ータのSU有無欄には“1”が記憶されているた
め、ステツプ(4)の実行結果はYESとなり、続い
てステツプ(5)が実行されて、テーブルメモリから
取込まれたデータの先頭IMアドレス欄の内容に
基づいて、入出力イメージメモリIMの0番地が
アドレス指定される。
Next, when steps (2) and (3) are executed sequentially, 0 of the table memory is stored in the central processing unit CPU.
The contents of the address are imported. Since "1" is stored in the SU presence/absence column of this imported data, the execution result of step (4) is YES, and then step (5) is executed and the data is imported from table memory. Address 0 of the input/output image memory IM is specified based on the contents of the first IM address field of the data.

次いで、ステツプ(6)が実行されると、中央処理
装置CPU内の所定のユニツト数記憶用レジスタ
には、テーブルメモリの0番地のユニツト数記憶
欄に記憶された数値1がセツトされる。
Next, when step (6) is executed, the predetermined unit number storage register in the central processing unit CPU is set to the numerical value 1 stored in the unit number storage column at address 0 of the table memory.

次いで、ステツプ(7)が実行されると、テーブル
メモリの0番地に対応してUS番号の0が特定さ
れる。またこのとき、テーブルメモリのアドレス
0は偶数であるから、ステツプ(8)の実行結果は
YESとなり、続いてステツプ(9)が実行されて、
IS番号は0にセツトされる。以上によつて、入出
力イメージメモリIMの0番地がアドレス指定さ
れ、かつテーブルメモリにおいては0番地がアド
レス指定され、更にメインユニツトMU―0内の
SU−0がアドレス指定される。
Next, when step (7) is executed, US number 0 is specified corresponding to address 0 of the table memory. Also, at this time, since address 0 of the table memory is an even number, the execution result of step (8) is
YES, step (9) is executed,
The IS number is set to 0. As described above, address 0 of the input/output image memory IM is addressed, address 0 is addressed in the table memory, and furthermore, address 0 of the input/output image memory IM is addressed, and
SU-0 is addressed.

次いで、ステツプ(10)が実行されると、ステツプ
(3)で読み出されたテーブルメモリの0番地のI/
O記憶欄の内容が“1”であるか否かが判定され
る。この場合、ステツプ(10)の判定結果はNOとな
るから、ステツプ(12)が実行される。ステツプ(12)が
実行されると、入出力イメージメモリIMの0番
地に記憶されたD0〜D7のデータは、外部デー
タバスラインDBM及び内部データバスライン
DBSを介してサブユニツトSU―0へと送出さ
れ、外部端子T0〜T7から出力される。
Then, when step (10) is executed, step
I/I at address 0 of the table memory read in (3)
It is determined whether the contents of the O storage column are "1". In this case, the determination result in step (10) is NO, so step (12) is executed. When step (12) is executed, the data D0 to D7 stored at address 0 of the input/output image memory IM are transferred to the external data bus line DBM and the internal data bus line
It is sent to subunit SU-0 via DBS and output from external terminals T0 to T7.

次いで、ステツプ(13)及びステツプ(14)が
実行されると、入出力イメージメモリIM用のア
ドレスレジスタの内容は1にセツトされ、またIS
番号用のアドレスレジスタも1にセツトされる。
Next, when step (13) and step (14) are executed, the contents of the address register for the input/output image memory IM are set to 1, and the contents of the address register for the input/output image memory IM are set to 1.
The address register for the number is also set to one.

次いで、ステツプ(15)が実行されると前述の
ユニツト数記憶用レジスタの内容から1が減算さ
れる。この場合、減算結果は0になるから、ステ
ツプ(16)の実行結果はYESとなり、続いてス
テツプ(17)が実行されて、テーブルメモリ用の
アドレスレジスタは1にセツトされる。続いて、
ステツプ(17)が実行されるが、この場合、未だ
テーブルメモリのアドレスは終了していないか
ら、その実行結果はNOとなり、再びステツプ(3)
が実行されて、テーブルメモリの1番地の内容が
中央処理装置CPUへと取り込まれる。テーブル
メモリの1番地のSU有無記憶欄には、“1”が記
憶されているから、ステツプ(4)の実行結果は
YESとなる。そして、ステツプ(5)が実行され
て、入出力イメージメモリIM用のアドレスジス
タには、テーブルメモリの1番地の先頭IMアド
レス記憶欄に格納された数値1がセツトされる。
Next, when step (15) is executed, 1 is subtracted from the contents of the above-mentioned unit number storage register. In this case, the result of the subtraction is 0, so the execution result of step (16) is YES, and then step (17) is executed and the address register for table memory is set to 1. continue,
Step (17) is executed, but in this case, the table memory address has not yet been completed, so the execution result is NO, and step (3) is executed again.
is executed, and the contents of address 1 of the table memory are taken into the central processing unit CPU. Since “1” is stored in the SU presence/absence storage column at address 1 of the table memory, the execution result of step (4) is
YES. Then, step (5) is executed, and the value 1 stored in the first IM address storage column at address 1 of the table memory is set in the address register for the input/output image memory IM.

次いで、ステツプ(6)が実行されると、ユニツト
数記憶用のレジスタには、テーブルメモリの1番
地のユニツト数記憶欄に記憶された数値1がセツ
トされる。
Next, when step (6) is executed, the number 1 stored in the unit number storage column at address 1 of the table memory is set in the unit number storage register.

次いで、ステツプ(7)が実行されると、その時点
のテーブルメモリのアドレスである1番地に対応
してUS番号の0が特定される。
Next, when step (7) is executed, the US number 0 is specified corresponding to address 1, which is the address of the table memory at that time.

次いで、ステツプ(8)が実行されると、この場合
テーブルメモリのアドレスは1番地で奇数である
から、ステツプ(8)の実行結果はNOとなり、ステ
ツプ(10)が実行される。
Next, when step (8) is executed, the address of the table memory is 1 and an odd number, so the execution result of step (8) is NO, and step (10) is executed.

次いで、ステツプ(10)が実行されると、テーブル
メモリの1番地のI/O記憶欄に“1”が存在す
るか否かが判定される。この場合、“1”が存在
するためその判定結果はYESとなり、ステツプ
(11)が実行される。ステツプ(11)が実行されると、そ
の時点のUS番号である0と、その時のIS番号で
ある1とに基づいて、メインユニツトMU―0内
の入力サブユニツトSU―1がアドレス指定さ
れ、この入力サブユニツトSU―1から取り込ま
れた入力データは、第8図に示く如く入出力イメ
ージメモリIMの1番地へと格納される。
Next, when step (10) is executed, it is determined whether "1" exists in the I/O storage column at address 1 of the table memory. In this case, since “1” exists, the judgment result is YES, and the step
(11) is executed. When step (11) is executed, the input subunit SU-1 in the main unit MU-0 is addressed based on the current US number 0 and the current IS number 1. The input data fetched from the input subunit SU-1 is stored at address 1 of the input/output image memory IM as shown in FIG.

次いで、ステツプ(13)およびステツプ(14)
が実行されると、入出力イメージメモリIM用の
アドレスレジスタ及びIS番号用のアドレスレジス
タには、共に数値2がセツトされる。次いで、ス
テツプ(15)が実行されると、ユニツト数記憶用
レジスタの内容から1が減算され、この減算結果
は0となるから、ステツプ(16)の実行に続いて
ステツプ(17)が実行され、テーブルメモリ用の
アドレスレジスタには、数値2がセツトされる。
この場合、テーブルメモリのアドレスは未だ終了
していないから、ステツプ(18)の実行結果は再
びNOとなり、ステツプ(3)へ戻る。そして、ステ
ツプ(3)が実行されると、テーブルメモリの2番地
の内容が中央処理装置CPUに取り込まれる。テ
ーブルメモリの2番地のSU有無記憶欄には
“1”が記憶されているから、ステツプ(4)の実行
結果はYESとなつて、続いてステツプ(5)及びス
テツプ(6)が実行され、入出力イメージメモリIM
用のアドレスレジスタの内容は2にセツトされ、
またユニツト数記憶用のレジスタの内容は4にセ
ツトされる。
Then step (13) and step (14)
When this is executed, the value 2 is set in both the address register for the input/output image memory IM and the address register for the IS number. Next, when step (15) is executed, 1 is subtracted from the contents of the unit number storage register, and the result of this subtraction becomes 0, so step (17) is executed following execution of step (16). , the value 2 is set in the table memory address register.
In this case, since the address of the table memory has not yet been completed, the execution result of step (18) is NO again, and the process returns to step (3). Then, when step (3) is executed, the contents of address 2 of the table memory are taken into the central processing unit CPU. Since "1" is stored in the SU presence/absence storage column at address 2 of the table memory, the execution result of step (4) is YES, and then step (5) and step (6) are executed. Input/output image memory IM
The contents of the address register for
Also, the contents of the register for storing the number of units are set to 4.

次いで、ステツプ(7)が実行されると、その時点
のテーブルメモリのアドレスである2番地に対応
して、US番号の1が特定される。
Next, when step (7) is executed, US number 1 is specified corresponding to address 2, which is the address of the table memory at that time.

次いで、ステツプ(8)が実行されると、そのとき
のテーブルメモリのアドレスは偶数であるからス
テツプ(9)が実行され、IS番号は0に特定される。
Next, when step (8) is executed, since the address of the table memory at that time is an even number, step (9) is executed and the IS number is specified as 0.

次いで、ステツプ(10)が実行されると、テーブル
メモリの2番地のI/O記憶欄の内容が“1”で
あるか否かが判定され、その判定結果がNOとな
ることからステツプ(12)が実行される。ステツプ(12)
が実行されると、入出力イメージメモリIMの2
番地に記憶されている出力データは、そのときの
US番号1とIS番号0とで指定されるメインユニ
ツトMU―1内のサブユニツトSU―0へと転送
され、外部端子T32〜T39へと出力される。
Next, when step (10) is executed, it is determined whether the contents of the I/O storage column at address 2 of the table memory is "1", and since the determination result is NO, step (12) is executed. ) is executed. Step(12)
When executed, the input/output image memory IM 2
The output data stored at the address is
It is transferred to subunit SU-0 in main unit MU-1 designated by US number 1 and IS number 0, and output to external terminals T32 to T39.

次いで、ステツプ(13),(14)が順次実行され
ると、入出力イメージメモリIM用のアドレスレ
ジスタには数値3がセツトされ、同時にIS番号用
のレジスタには、数値1がセツトされる。
Next, when steps (13) and (14) are executed in sequence, the number 3 is set in the address register for the input/output image memory IM, and at the same time, the number 1 is set in the register for the IS number.

次いで、ステツプ(15)が実行されると、前述
のユニツト数記憶用レジスタに記憶された数値4
から1が減算されて、ユニツト数記憶用レジスタ
の内容は3となり、この結果ステツプ(16)の実
行結果はNOとなつてステツプ(10)へ戻る。
Next, when step (15) is executed, the numerical value 4 stored in the above-mentioned unit number storage register is
1 is subtracted from , and the contents of the unit number storage register become 3. As a result, the execution result of step (16) becomes NO and the process returns to step (10).

このようにして、ステツプ(10)からステツプ
(16)がその後3回繰り返され、その結果第8図
に示す如く、メインユニツトMU―1の外部端子
T32〜T63からは、入出力イメージメモリ
IMの2番地から5番地までに記憶された出力デ
ータが順次出力されることになる。
In this way, steps (10) to (16) are repeated three times, and as a result, as shown in FIG.
The output data stored in addresses 2 to 5 of the IM will be sequentially output.

次いで、テーブルメモリ用のアドレスレジスタ
の内容が3から5に増加する間においては、ステ
ツプ(4)の実行結果はいずれもNOとなり、この結
果、入出力イメージメモリIMのアドレスの歩進
は停止状態に維持される。
Next, while the contents of the table memory address register increase from 3 to 5, the execution result of step (4) becomes NO, and as a result, the incrementation of the address of the input/output image memory IM is stopped. will be maintained.

次いで、テーブルメモリ用のアドレスレジスタ
の内容が、ステツプ(17)の実行により6になる
と、再びステツプ(4)の実行結果はYESとなつ
て、入出力イメージメモリIM用のアドレスレジ
スタの内容は、それまでの5番地から1つ増加し
て6番地となる。これと同時に、ユニツト数記憶
用のレジスタには、テーブルメモリの6番地のユ
ニツト数記憶欄に記憶された数値4がセツトされ
る。
Next, when the contents of the address register for the table memory become 6 by executing step (17), the execution result of step (4) becomes YES again, and the contents of the address register for the input/output image memory IM become 6. It is now address 6, an increase of one from the previous address 5. At the same time, the numerical value 4 stored in the unit number storage column at address 6 of the table memory is set in the unit number storage register.

次いで、ステツプ(7)が実行されると、その時の
テーブルメモリのアドレスである6番地に基づい
て、US番号は3に特定される。そして、以後前
述と同様にしてステツプ(8)の実行結果はYESと
なり、続いてステツプ(9)が実行されて、IS番号は
0に特定される。次いで、ステツプ(10)が実行され
ると、テーブルメモリの6番地のI/O記憶欄の
内容に基づいてステツプ(12)が実行されて、第8図
に示す如く入出力イメージメモリIMの6番地の
記憶データは、メインユニツトMU内のサブユニ
ツトSU―0へと転送される。
Next, when step (7) is executed, the US number is specified as 3 based on address 6, which is the address of the table memory at that time. Thereafter, in the same way as described above, the execution result of step (8) becomes YES, and then step (9) is executed and the IS number is specified as 0. Next, when step (10) is executed, step (12) is executed based on the contents of the I/O storage column at address 6 of the table memory, and as shown in FIG. The stored data at the address is transferred to subunit SU-0 within main unit MU.

次いで、ステツプ(13),(14),(15)が順次実
行されると、入出力イメージメモリIM用のアド
レスレジスタの内容及びIS番号用レジスタの内容
は、それぞれ1つ増加して入出力イメージメモリ
IM内の7番地及びメインユニツトMU―3内のサ
ブユニツトSU―1がそれぞれアドレス指定さ
れ、またユニツト数記憶用レジスタの内容は1つ
減算されて3となる。この結果、前述と同様にし
てユニツト数記憶用レジスタの内容が0となるま
でステツプ(10)からステツプ(16)までが3回繰り
返される。この結果、入出力イメージメモリIM
においては、6番地から9番地に順次アドレスが
1つづづ歩進され、同時にメインユニツトMU―
3内においてはサブユニツトSU―0〜SU―3が
順次1つづづ指定され、入出力イメージメモリ
IMからサブユニツトSUへの出力データの転送が
行われるのである。
Next, when steps (13), (14), and (15) are executed sequentially, the contents of the address register for input/output image memory IM and the contents of the IS number register are each incremented by one, and memory
Address 7 in IM and subunit SU-1 in main unit MU-3 are respectively addressed, and the contents of the unit number storage register are subtracted by 1 to 3. As a result, steps (10) to (16) are repeated three times until the contents of the unit number storage register become 0 in the same way as described above. As a result, the input/output image memory IM
, the address is incremented one by one from address 6 to address 9, and at the same time the main unit MU-
In 3, subunits SU-0 to SU-3 are specified one by one, and the input/output image memory
Output data is transferred from IM to subunit SU.

かくして、この実施例によるPLCによれば、第
3図に示す如く、コネクタCN―n2にメインユ
ニツトMU―2を接続しない状態においたとして
も、またメインユニツトMU―0内において、コ
ネクタCN―32,CN―33に対してサブユニツ
トSU―2〜SU―3を接続しない状態においたと
しても、第8図に示す如く、入出力イメージメモ
リIM内の先頭アドレスから順に各サブユニツト
SUに係わるデータの入出力が順次行われる。
Thus, according to the PLC according to this embodiment, even if the main unit MU-2 is not connected to the connector CN-n2, as shown in FIG. , CN-33, even if the subunits SU-2 to SU-3 are not connected, each subunit is connected in order from the first address in the input/output image memory IM, as shown in Figure 8.
Data input/output related to SU is performed sequentially.

このため、ユーザプログラムにおいて各サブユ
ニツトSUを特定する場合には、これをIMアドレ
スの連続番号に従つて順次指定することが可能と
なり、従来のこの種PLCのように外部端子の接続
に空きが生じたことによつて、ユーザプログラム
における入出力指定番号が不連続になるという問
題を確実に解消することが可能となるのである。
Therefore, when specifying each subunit SU in a user program, it is possible to specify them sequentially according to the serial number of the IM address, which frees up external terminal connections unlike in conventional PLCs of this type. This makes it possible to reliably solve the problem of discontinuous input/output designation numbers in the user program.

なお、この実施例に係わるPLCにおいては、各
メインユニツトMU内におけるサブユニツトSU
の構成を、テーブルメモリ内のそれぞれ連続する
2個のアドレス内にコード化して記憶するように
したが、各メインユニツトMU内におけるサブユ
ニツトSUの構成を記憶させるフオーマツトはこ
れに限るものではなく、各サブユニツトSUをそ
れぞれテーブルメモリの各番地に割り当て、それ
ぞれにサブユニツトSUの有無及び入出力の別を
コード化して記憶させるようにしても良いことは
勿論である。
In addition, in the PLC according to this embodiment, the subunit SU in each main unit MU
Although the configuration of the subunit SU in each main unit MU is encoded and stored in two consecutive addresses in the table memory, the format for storing the configuration of the subunit SU in each main unit MU is not limited to this. Of course, each subunit SU may be assigned to each address of the table memory, and the presence or absence of a subunit SU and input/output status may be encoded and stored in each address.

以上の実施例の説明でも明らかなように、この
発明に係わるPLCは入力回路から得られる入力デ
ータを入出力メモリに書込むとともに、この入出
力メモリに記憶された出力データを読出して出力
回路に供給する入出力更新手段と、前記入出力メ
モリの記憶データを任意に設定されるユーザプロ
グラムに従つて演算処理し、その処理結果に基づ
いて前記入出力メモリのデータを書換えるプログ
ラム実行手段とを備えるもので; 前記入力回路及び出力回路は、それぞれ一定点
数の入力又は出力を扱う入力サブユニツト又は出
力サブユニツトを、双方含めて一定のサブユニツ
ト数だけ扱うメインユニツトにユニツト構成さ
れ; 前記メインユニツト内には、内部データバスラ
インとサブユニツト用のアドレスデコーダとが設
けられ; 前記メインユニツト内のアドレスデコーダは、
コントローラ本体のサブユニツト用アドレスライ
ン上に、各別にアドレス割当てされて設けられた
第1のコネクタ群に、位置指定を受けることなく
任意に接続でき; 前記メインユニツト内の内部データバスライン
は、コントローラ本体の外部データバスライン上
に設けられた第2のコネクタ群に任意に接続で
き; 前記メインユニツト内の各サブユニツトは、前
記内部データバスライン上に、前記アドレスデコ
ーダの出力で各別にアドレス割当てされて設けら
れた第3のコネクタ群に位置指定を受けることな
く任意に接続でき; 前記入出力更新手段は、前記各第1のコネクタ
をアドレス指定し、かつ該第1のコネクタを介し
て前記第3のコネクタをアドレス指定して、前記
各入力サブユニツトから前記入出力メモリへの入
力データの書込みか、あるいは前記入出力メモリ
から前記各出力サブユニツトへの出力データの読
出しかを実行するように構成されたプログラマブ
ル・ロジツク・コントローラにおいて; 前記各メインユニツト側に、当該メインユニツ
ト内の各サブユニツトが、入力サブユニツト、出
力サブユニツトあるいはサブユニツトが接続され
ていないかを表わすサブユニツト識別データを出
力するサブユニツト識別回路を、前記内部データ
バスラインに接続して設けるとともに; コントローラ本体から送出される切替信号に応
答して、前記内部データバスラインをサブユニツ
ト側か、あるいはサブユニツト識別回路側かに切
替接続する接続切替回路を設け; かつ、前記コントローラ本体側には、各メイン
ユニツトから内部及び外部データバスラインを介
して取込まれる前記サブユニツト識別データを所
定フオーマツトで記憶するための識別データメモ
リと; 前記入出力更新に前以て前記各メインユニツト
を順次アドレス順に走査すると同時に、各メイン
ユニツトに切替信号を送出して、切替接続回路を
サブユニツト識別回路側に切替え、各サブユニツ
ト識別データを内部及び外部データバスを介して
コントローラ本体側に取込み、これを識別データ
メモリに書込むサブユニツト構成走査手段とを設
け; 前記入出力更新手段で、前記入出力メモリの各
記憶エリアをサブユニツト単位で順次アクセスす
るとき、各エリア毎に前記識別データメモリに記
憶された各メインユニツト識別データを一定のア
ドレス順にサブユニツト単位で検索し、その検索
によつて順次検出されるサブユニツト識別データ
が「出力サブユニツト」を示しているサブユニツ
トのアドレスに関しては、前記入出力メモリの当
該アクセスされているエリアのデータを読出して
前記検出されたアドレスのサブユニツトに転送
し; 前記検索によつて順次検出されるサブユニツト
識別データが「入力サブユニツト」を示している
サブユニツトのアドレスに関しては、前記検出さ
れたサブユニツトのアドレスからのデータを前記
入出力メモリの当該アクセスされているエリアに
書込むようにしたものであるから、この種メイン
ユニツトMU及びサブユニツトSUとからなる
PLCにおいて、該当するコネクタにメインユニツ
トMUまたはサブユニツトSUのいずれかが存在
しない場合においても、ユーザプログラムにおい
ては必ず連続番号によつて各外部端子Tを取り扱
うことが可能となり、ユーザ側の広範な制御仕様
に対してメーカー側の柔軟な対応を可能としつつ
も、ユーザ側におけるプログラミングの容易性を
確実に保持することができる。
As is clear from the description of the embodiments above, the PLC according to the present invention writes input data obtained from the input circuit to the input/output memory, and reads output data stored in the input/output memory to the output circuit. input/output updating means for supplying input/output updating means; and program execution means for performing arithmetic processing on the data stored in the input/output memory according to an arbitrarily set user program, and rewriting the data in the input/output memory based on the processing results. The input circuit and the output circuit are configured into a main unit that handles input subunits or output subunits that handle a fixed number of inputs or outputs, respectively, and a fixed number of subunits including both; , an internal data bus line and an address decoder for the subunit; the address decoder in the main unit is:
The internal data bus lines in the main unit can be connected to the first group of connectors, each of which is individually assigned an address, on the address line for the subunits of the controller body without having to specify the position; can be arbitrarily connected to a second group of connectors provided on an external data bus line of the main unit; each subunit in the main unit is individually assigned an address on the internal data bus line by the output of the address decoder; The input/output updating means can be arbitrarily connected to the provided third connector group without receiving position designation; is configured to address a connector of said input subunit to either write input data to said input/output memory or read output data from said input/output memory to said respective output subunit. In the programmable logic controller: Each of the main units includes a subunit identification circuit that outputs subunit identification data indicating whether each subunit in the main unit is connected to an input subunit, an output subunit, or no subunit. A connection switching circuit is provided to be connected to the internal data bus line, and to switch the internal data bus line to either the subunit side or the subunit identification circuit side in response to a switching signal sent from the controller main body; and, on the controller main body side, an identification data memory for storing the subunit identification data taken in from each main unit via internal and external data bus lines in a predetermined format; While scanning each of the main units in address order, at the same time sending a switching signal to each main unit, switching the switching connection circuit to the subunit identification circuit side, and transmitting each subunit identification data to the controller main body side via the internal and external data bus. and subunit configuration scanning means for reading the identification data into the identification data memory; and when the input/output updating means sequentially accesses each storage area of the input/output memory in units of subunits, the identification data is scanned for each area. Each main unit identification data stored in memory is searched for each subunit in a fixed address order, and for the addresses of subunits whose subunit identification data sequentially detected by the search indicates "output subunit", the above entry is performed. Read the data of the accessed area of the output memory and transfer it to the subunit of the detected address; Regarding the address of the subunit whose subunit identification data sequentially detected by the search indicates "input subunit" is designed to write data from the address of the detected subunit to the area of the input/output memory that is being accessed, so this type of unit consists of a main unit MU and a subunit SU.
Even if either the main unit MU or subunit SU does not exist in the corresponding connector in the PLC, each external terminal T can always be handled by sequential number in the user program, giving the user extensive control. While allowing manufacturers to respond flexibly to specifications, it is possible to reliably maintain ease of programming on the user's side.

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

第1図は、本発明に係わるPLCの構成を示すブ
ロツク図、第2図は、従来のこの種PLCにおける
入出力イメージメモリIMの内容を示すメモリマ
ツプ、第3図は、本発明に係わるPLCの電気的な
構成を示すブロツク図、第4図は、本発明におい
て使用されるテーブルメモリの内容を示すメモリ
マツプ、第5図は、電源投入後に行われるイニシ
ヤル処理を端的に示すフローチヤート、第6図
は、イニシヤル処理を説明するためのタイミング
チヤート、第7図は、本発明に係わるPLCの動作
を説明するためのフローチヤート、第8図は、本
発明に係わるPLCの入出力イメージメモリIMの
内容を示すメモリマツプである。 CU……コントローラ本体ユニツト、PM……プ
ログラムメモリ、IM……入出力イメージメモ
リ、CPU……中央処理装置、DEC1……デコー
ダ、DEC2……デコーダ、MU……メインユニツ
ト、SU……サブユニツト、T……外部端子、
ADS……サブユニツトアドレス用バスライン、
DBM……外部データバスライン、DBS……内部
データバスライン、CN―10〜CN―13……第
1のコネクタ群、CN―20〜CN―23……第2
のコネクタ群、CN―30〜CN―33……第3の
コネクタ群、PRES……電源投入検出回路、OR
……オアゲート、AND1……アンドゲート、
AND2……アンドゲート、SL……切替回路、
IFC……インターフエイス回路、CODE……コー
ド設定器。
FIG. 1 is a block diagram showing the configuration of the PLC according to the present invention, FIG. 2 is a memory map showing the contents of the input/output image memory IM in a conventional PLC of this type, and FIG. 3 is a block diagram showing the configuration of the PLC according to the present invention. FIG. 4 is a block diagram showing the electrical configuration; FIG. 4 is a memory map showing the contents of the table memory used in the present invention; FIG. 5 is a flowchart showing the initial processing performed after power is turned on; FIG. 7 is a timing chart for explaining the initial processing, FIG. 7 is a flowchart for explaining the operation of the PLC according to the present invention, and FIG. 8 is the contents of the input/output image memory IM of the PLC according to the present invention. This is a memory map showing the CU: controller main unit, PM: program memory, IM: input/output image memory, CPU: central processing unit, DEC1: decoder, DEC2: decoder, MU: main unit, SU: subunit, T ...external terminal,
ADS...Bus line for subunit address,
DBM...external data bus line, DBS...internal data bus line, CN-10 to CN-13...first connector group, CN-20 to CN-23...second
Connector group, CN-30 to CN-33...Third connector group, PRES...Power on detection circuit, OR
...OR gate, AND1...AND gate,
AND2...and gate, SL...switching circuit,
IFC...Interface circuit, CODE...Code setting device.

Claims (1)

【特許請求の範囲】 1 入力回路から得られる入力データを入出力メ
モリに書込むとともに、この入出力メモリに記憶
された出力データを読出して出力回路に供給する
入出力更新手段と、前記入出力メモリの記憶デー
タを任意に設定されるユーザプログラムに従つて
演算処理し、その処理結果に基づいて前記入出力
メモリのデータを書換えるプログラム実行手段と
を備えるもので; 前記入力回路及び出力回路は、それぞれ一定点
数の入力又は出力を、扱う入力サブユニツト又は
出力サブユニツトを双方含めて一定のサブユニツ
ト数だけ扱うメインユニツトにユニツト構成さ
れ; 前記メインユニツト内には、内部データバスラ
インとサブユニツト用のアドレスデコーダとが設
けられ; 前記メインユニツト内のアドレスデコーダは、
コントローラ本体のサブユニツト用アドレスライ
ン上に、各別にアドレス割当てされて設けられた
第1のコネクタ群に、位置指定を受けることなく
任意に接続でき; 前記メインユニツト内の内部データバスライン
は、コントローラ本体の外部データバスライン上
に設けられた第2のコネクタ群に任意に接続で
き; 前記メインユニツト内の各サブユニツトは、前
記内部データバスライン上に、前記アドレスデコ
ーダの出力で各別にアドレス割当てされて設けら
れた第3のコネクタ群に位置指定を受けることな
く任意に接続でき; 前記入出力更新手段は、前記各第1のコネクタ
をアドレス指定し、かつ該第1のコネクタを介し
て前記第3のコネクタをアドレス指定して、前記
各入力サブユニツトから前記入出力メモリへの入
力データの書込みか、あるいは前記入出力メモリ
から前記各出力サブユニツトへの出力データの読
出しかを実行するように構成されたプログラマブ
ル・ロジツク・コントローラにおいて; 前記各メインユニツト側に、当該メインユニツ
ト内の各サブユニツトが、入力サブユニツト、出
力サブユニツトあるいはサブユニツトが接続され
ていないかを表わすサブユニツト識別データを出
力するサブユニツト識別回路を、前記内部データ
バスラインに接続して設けるとともに; コントローラ本体から送出される切替信号に応
答して、前記内部データバスラインをサブユニツ
ト側か、あるいはサブユニツト識別回路側かに切
替接続する接続切替回路を設け; かつ、前記コントローラ本体側には、各メイン
ユニツトから内部及び外部データバスラインを介
して取込まれる前記サブユニツト識別データを所
定フオーマツトで記憶するための識別データメモ
リと; 前記入出力更新に前以て前記各メインユニツト
を順次アドレス順に走査すると同時に、各メイン
ユニツトに切替信号を送出して、切替接続回路を
サブユニツト識別回路側に切替え、各サブユニツ
ト識別データを内部及び外部データバスを介して
コントローラ本体側に取込み、これを識別データ
メモリに書込むサブユニツト構成走査手段とを設
け; 前記入出力更新手段で、前記入出力メモリの各
記憶エリアをサブユニツト単位で順次アクセスす
るとき、各エリア毎に前記識別データメモリに記
憶された各サブユニツト識別データを一定のアド
レス順にサブユニツト単位で検索し、その検索に
よつて順次検出されるサブユニツト識別データが
「出力サブユニツト」を示しているサブユニツト
のアドレスに関しては、前記入出力メモリの当該
アクセスされているエリアのデータを読出して前
記検出されたアドレスのサブユニツトに転送し; 前記検索によつて順次検出されるサブユニツト
識別データが「入力サブユニツト」を示している
サブユニツトのアドレスに関しては、前記検出さ
れたサブユニツトのアドレスからのデータを前記
入出力メモリの当該アクセスされているエリアに
書込むように構成したことを特徴とするプログラ
マブル・ロジツク・コントローラ。
[Scope of Claims] 1. Input/output updating means for writing input data obtained from an input circuit into an input/output memory, reading out output data stored in the input/output memory, and supplying the output data to the output circuit; and program execution means for performing arithmetic processing on the data stored in the memory according to an arbitrarily set user program, and rewriting the data in the input/output memory based on the processing results; the input circuit and the output circuit are , each of which handles a fixed number of inputs or outputs, is configured into a main unit that handles a fixed number of subunits, including both input subunits and output subunits that handle a fixed number of inputs or outputs; The main unit includes an internal data bus line and an address decoder for the subunits. an address decoder in the main unit;
The internal data bus lines in the main unit can be connected to the first group of connectors, each of which is individually assigned an address, on the address line for the subunits of the controller body without having to specify the position; can be arbitrarily connected to a second group of connectors provided on an external data bus line of the main unit; each subunit in the main unit is individually assigned an address on the internal data bus line by the output of the address decoder; The input/output updating means can be arbitrarily connected to the provided third connector group without receiving position designation; is configured to address a connector of said input subunit to either write input data to said input/output memory or read output data from said input/output memory to said respective output subunit. In the programmable logic controller: Each of the main units includes a subunit identification circuit that outputs subunit identification data indicating whether each subunit in the main unit is connected to an input subunit, an output subunit, or no subunit. A connection switching circuit is provided to be connected to the internal data bus line, and to switch the internal data bus line to either the subunit side or the subunit identification circuit side in response to a switching signal sent from the controller main body; and, on the controller main body side, an identification data memory for storing the subunit identification data taken in from each main unit via internal and external data bus lines in a predetermined format; While scanning each of the main units in address order, at the same time sending a switching signal to each main unit, switching the switching connection circuit to the subunit identification circuit side, and transmitting each subunit identification data to the controller main body side via the internal and external data bus. and subunit configuration scanning means for reading the identification data into the identification data memory; and when the input/output updating means sequentially accesses each storage area of the input/output memory in units of subunits, the identification data is scanned for each area. Each subunit identification data stored in memory is searched for each subunit in a fixed address order, and for the address of a subunit whose subunit identification data sequentially detected by the search indicates an "output subunit", the input/output Read the data in the accessed area of the memory and transfer it to the subunit at the detected address; Regarding the address of the subunit whose subunit identification data sequentially detected by the search indicates "input subunit" , a programmable logic controller configured to write data from the detected subunit address to the accessed area of the input/output memory.
JP8209381A 1981-05-29 1981-05-29 Programmable logic controller Granted JPS57197609A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8209381A JPS57197609A (en) 1981-05-29 1981-05-29 Programmable logic controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8209381A JPS57197609A (en) 1981-05-29 1981-05-29 Programmable logic controller

Publications (2)

Publication Number Publication Date
JPS57197609A JPS57197609A (en) 1982-12-03
JPS6160443B2 true JPS6160443B2 (en) 1986-12-20

Family

ID=13764812

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8209381A Granted JPS57197609A (en) 1981-05-29 1981-05-29 Programmable logic controller

Country Status (1)

Country Link
JP (1) JPS57197609A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH059793Y2 (en) * 1987-04-20 1993-03-10

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59168503A (en) * 1983-03-15 1984-09-22 Matsushita Electric Works Ltd Electric equipment control board
US4586151A (en) * 1983-09-02 1986-04-29 Zymark Corporation Self-configuring computerized robot control system
JPS60204003A (en) * 1984-03-27 1985-10-15 Mitsubishi Electric Corp Controlling system
JPH06105402B2 (en) * 1984-07-26 1994-12-21 三菱電機株式会社 Programmable controller
JPS6181304U (en) * 1984-10-30 1986-05-30
JPS61118804A (en) * 1984-11-15 1986-06-06 Fuji Electric Co Ltd Programmable controller system
JPS61118802A (en) * 1984-11-15 1986-06-06 Fuji Electric Co Ltd Process input and output device of sequence controller
JPS61118803A (en) * 1984-11-15 1986-06-06 Fuji Electric Co Ltd Programmable controller system
JPS61131104A (en) * 1984-11-30 1986-06-18 Fuji Facom Corp Simplified system of process input and output
JPS6219904A (en) * 1985-07-18 1987-01-28 Diesel Kiki Co Ltd Controller using microprocessor
JPH0740206B2 (en) * 1985-10-25 1995-05-01 東芝機械株式会社 Programmable sequence controller that speeds up I / O data transfer
JPS62108308A (en) * 1985-11-06 1987-05-19 Mitsubishi Electric Corp Programmable controller
JPS62108309A (en) * 1985-11-06 1987-05-19 Mitsubishi Electric Corp Data link system
JPH0731523B2 (en) * 1986-01-22 1995-04-10 株式会社東芝 Programmable controller device
JPS62210504A (en) * 1986-03-11 1987-09-16 Fanuc Ltd Program memory controller
JPH01177610A (en) * 1988-01-08 1989-07-13 Fanuc Ltd Method for allocating input/output module for pc
JP2799077B2 (en) * 1990-12-27 1998-09-17 株式会社東芝 Program controller
CN101968639B (en) * 2010-11-02 2012-08-22 上海电器科学研究院 Analog quantity acquisition module for programmable logic controller (PLC) extension

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5464277A (en) * 1977-10-31 1979-05-23 Toshiba Corp Sequence controller
JPS5474090A (en) * 1977-11-24 1979-06-13 Toyoda Mach Works Ltd Sequence controller
JPS5476786A (en) * 1977-11-30 1979-06-19 Hitachi Ltd Input and output unit of sequence controller

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5464277A (en) * 1977-10-31 1979-05-23 Toshiba Corp Sequence controller
JPS5474090A (en) * 1977-11-24 1979-06-13 Toyoda Mach Works Ltd Sequence controller
JPS5476786A (en) * 1977-11-30 1979-06-19 Hitachi Ltd Input and output unit of sequence controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH059793Y2 (en) * 1987-04-20 1993-03-10

Also Published As

Publication number Publication date
JPS57197609A (en) 1982-12-03

Similar Documents

Publication Publication Date Title
JPS6160443B2 (en)
KR950004453B1 (en) Register circuit having the function of inter-register copying
KR940002754B1 (en) Control method in a semiconductor integrated circuit device
EP0127440A2 (en) Integrated circuit device incorporating a data processing unit and a ROM storing applications program therein
JPH07113907B2 (en) card
EP0267613B1 (en) Micro processor capable of being connected with coprocessor
JP2501874B2 (en) IC card
US7251706B2 (en) System and method for updating firmware in a non-volatile memory without using a processor
JPS6160444B2 (en)
JPH0320778B2 (en)
US4807178A (en) Programmable sequence controller having indirect and direct input/output apparatus
JPH11512205A (en) Method for generating and storing a user program consisting of instructions for a program storage controller and a method for operating a program storage controller
EP0059758A1 (en) Numerical control unit
AU714669B2 (en) Peripheral device control
JPH0717325B2 (en) Elevator control device
JP3635996B2 (en) Information processing system
JP4723334B2 (en) DMA transfer system
JPS6410854B2 (en)
JP2530810B2 (en) Storage element and method of using the same
JPH01133108A (en) Programmable controller
JPH0736373A (en) Programmable controller
JPH06103106A (en) Program debug device
JPS5866112A (en) Computer system
JPH04199228A (en) Semiconductor integrated circuit device
KR0168973B1 (en) Rom accessing method and its apparatus