JPH09326683A - Device for input or output - Google Patents

Device for input or output

Info

Publication number
JPH09326683A
JPH09326683A JP14261696A JP14261696A JPH09326683A JP H09326683 A JPH09326683 A JP H09326683A JP 14261696 A JP14261696 A JP 14261696A JP 14261696 A JP14261696 A JP 14261696A JP H09326683 A JPH09326683 A JP H09326683A
Authority
JP
Japan
Prior art keywords
output
input
light receiving
receiving element
switching
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.)
Pending
Application number
JP14261696A
Other languages
Japanese (ja)
Inventor
Ikuzo Ono
郁三 大野
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.)
SYSTECS KK
Original Assignee
SYSTECS KK
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 SYSTECS KK filed Critical SYSTECS KK
Priority to JP14261696A priority Critical patent/JPH09326683A/en
Publication of JPH09326683A publication Critical patent/JPH09326683A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To use a common hardware board unit for input and output at the time of satisfying the total number of input points regardless of the member of required input points and the number of required output points by turning plural respective connection terminals to a type serving for both input and output. SOLUTION: The light emitting elements D10-D17 for the input of a photocoupler for the input are connected relating to the plural respective connection terminals and a first common terminal TC1 and the opening/closing state of input equipments such as a switch and a sensor, etc., is detected. The light receiving elements P20-P27 for the output of the photocoupler for the output are connected relating to the respective connection terminals and a second common terminal TC2 and the operation of external equipments such as a relay and a solenoid, etc., is controlled. The period W21 of the read operation of detection data from the photocopier for the input and the period W20 of the write operation of control data to a latch means for the control of the external equipments by the photocopier for the output are mutually shifted. Further, the self-diagnostic function of a connection state is achieved.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータのパ
ラレル入力、出力ボードやプログラマブルコントローラ
および一般電子機器の入力または出力のための装置に係
り、入力と出力を兼用として使用するという改良に関す
るものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a parallel input / output board of a computer, a programmable controller, and a device for input or output of general electronic equipment, and relates to an improvement of using both input and output in common. .

【0002】[0002]

【従来の技術】入力と出力は信号の伝達方向が逆であ
り、回路構成上も異なるために、従来から、入力ボード
(すなわち入力ユニット)と出力ボード(すなわち出力
ユニット)の2種類が単独で存在する。従来から、コン
ピュータのパラレルボードでは、マイクロプロセッサの
周辺IC(集積回路)であるPIO(パラレル入出力イ
ンタフェイス)の入出力をそのまま外部端子に出し、入
力、出力いずれにも使用できるものもあるが、ソフトウ
エアで予め設定することが必要であり、すなわち多数の
各接続端子を入力用または出力用として設定しなければ
ならず、使い勝手が悪く、特に接続端子の数が多いとき
には、重大な問題になる。
2. Description of the Related Art Since input and output have opposite signal transmission directions and different circuit configurations, two types of input boards (ie, input units) and output boards (ie, output units) have been conventionally used independently. Exists. Conventionally, in some parallel boards of computers, the input / output of PIO (parallel input / output interface), which is a peripheral IC (integrated circuit) of a microprocessor, can be directly output to an external terminal and used for both input and output. , It is necessary to set in advance by software, that is, a large number of each connection terminals must be set for input or output, which is inconvenient and is a serious problem especially when the number of connection terminals is large. Become.

【0003】しかもこの先行技術では、信号レベルは、
C−MOS(相補形金属酸化膜半導体)あるいはTTL
(トランジスタ・トランジスタ論理)であり、極めて低
いために、用途が限定されている。
Moreover, in this prior art, the signal level is
C-MOS (complementary metal oxide semiconductor) or TTL
(Transistor / Transistor logic), and its application is limited because it is extremely low.

【0004】[0004]

【発明が解決しようとする課題】スイッチやセンサなど
の入力機器を直接に接続したり、リレーや電磁弁などの
ソレノイドなどの出力機器を直接に駆動する高い信号レ
ベルでの入力または出力ボードにおいては、各ボードあ
たりの点数は、16,32,64点と多いために、入力
および出力点数が常に、ギリギリまで使用される場合が
多く、入力点数または出力点数に余裕をもってバランス
良く使用される場合は少ないのが実状である。このよう
に先行技術では、上記した入力点数と出力点数を、それ
ぞれのボードへ個別に割付けなければならない。そのた
めに、或るシステムにおいて、入力ボードと出力ボード
との両者を混合使用している構成では、たとえば入力の
使用点数が入力ボードに設けてある入力点数を越える
と、仮に、出力ボードの使用点数に余裕がある場合で
も、その使用点数が足りない入力ボードと同一の入力ボ
ードを新たに追加しなくてはならなくなり、不都合を生
じている。このことは出力ボードに関しても同様であ
る。
In an input or output board with a high signal level for directly connecting an input device such as a switch or a sensor or directly driving an output device such as a solenoid such as a relay or a solenoid valve, Since the number of points for each board is as large as 16, 32, 64, the input and output points are always used to the last minute, and when the input points or output points are used with a sufficient balance. The reality is that there are few. As described above, in the prior art, the above-mentioned input points and output points must be individually assigned to each board. Therefore, in a system in which both the input board and the output board are mixedly used, if the number of input points used exceeds the number of input points provided on the input board, the number of output board points is temporarily changed. However, even if there is a margin, it is necessary to newly add an input board that is the same as the input board whose number of points used is insufficient, which causes inconvenience. This also applies to the output board.

【0005】本発明の目的は、入力機器または出力機器
などの外部の回路に接続される複数の接続端子のうち、
使用されない接続端子の数をできるだけ低減することが
できるようにして、コスト的にも、スペース的にも有利
な入力または出力のための装置を提供することである。
An object of the present invention is to provide, among a plurality of connection terminals connected to an external circuit such as an input device or an output device,
The object is to provide a device for input or output which is advantageous in terms of cost and space, by making it possible to reduce the number of unused connection terminals.

【0006】図10は、自己診断機能を有する先行技術
の簡略化した電気回路図である。出力ユニット1の複数
の各出力用ホトカプラ2における受光素子3には、接続
端子4,5を介して、負荷である外部機器6と電源7と
が接続される。この出力ユニット1の接続状態を検出し
て診断するために、新たに別途、入力ユニット8を設け
る。その入力ユニット8の複数の各入力用ホトカプラ9
の発光素子10には、接続端子11,12を介して、ラ
イン13,14を接続する。出力用受光素子3が導通す
るように制御されたとき、電源7からライン14、接続
端子12、入力用受光素子10、接続端子11、ライン
13、接続端子4、出力用受光素子3および接続端子5
を経て電流が流れて、入力用発光素子10が発光動作す
れば、接続状態が正常であることが確認され、発光素子
10が消灯していれば、接続状態が断線などして異常が
発生していることが検出される。こうして接続状態の自
己診断をすることができる。
FIG. 10 is a simplified electric circuit diagram of the prior art having a self-diagnosis function. The external device 6 which is a load and the power supply 7 are connected to the light receiving elements 3 in each of the plurality of output photocouplers 2 of the output unit 1 via the connection terminals 4 and 5. In order to detect and diagnose the connection state of the output unit 1, an input unit 8 is newly provided. A plurality of input photocouplers 9 of the input unit 8
The lines 13 and 14 are connected to the light emitting element 10 through the connection terminals 11 and 12. When the output light-receiving element 3 is controlled to be conductive, the power source 7 supplies the line 14, the connection terminal 12, the input light-receiving element 10, the connection terminal 11, the line 13, the connection terminal 4, the output light-receiving element 3 and the connection terminal. 5
If the input light-emitting element 10 emits light, the connection state is confirmed to be normal. If the light-emitting element 10 is off, the connection state is disconnected and an abnormality occurs. Is detected. In this way, the self-diagnosis of the connection state can be performed.

【0007】このような図10の先行技術では、接続状
態の検出のために、新たな入力ユニット8を設けなけれ
ばならず、したがってコストアップになり、また設置ス
ペースをさらに必要とする。しかもライン13,14を
接続しなければならず、工数が多くなる。さらにこのよ
うな外部でのライン13,14の配線に起因して、その
配線の信頼性が劣る結果になる。したがって先行技術で
は、接続状態の検出を必要とするにも拘わらず、現実に
は、ほとんど実施されていない。
In the prior art of FIG. 10 as described above, a new input unit 8 has to be provided for detecting the connection state, resulting in an increase in cost and a further installation space. Moreover, the lines 13 and 14 must be connected, which increases the number of steps. Further, due to the wiring of the lines 13 and 14 on the outside, the reliability of the wiring is deteriorated. Therefore, in the prior art, although it is necessary to detect the connection state, it is practically not performed.

【0008】本発明の他の目的は、ハードウエアの自己
診断を、前述の図10の先行技術におけるライン13,
14を用いることなしに、すなわち外部接続することな
く、容易に、しかも高い信頼性で行うことができるよう
にした入力または出力のための装置を提供することであ
る。
Another object of the present invention is to perform hardware self-diagnosis by using the line 13, in the prior art of FIG.
It is to provide a device for input or output which can be easily and reliably performed without using 14, i.e. without external connection.

【0009】[0009]

【課題を解決するための手段】本発明は、(a)外部の
回路に接続される複数の接続端子と、(b)第1共通端
子と、(c)第2共通端子と、(d)接続端子に個別的
に対応して設けられる複数の入力用ホトカプラであっ
て、各入力用ホトカプラは、入力用発光素子と、その入
力用発光素子からの光を受光する入力用受光素子とを有
し、各入力用発光素子の一端部は、その入力用発光素子
が備えられるホトカプラに対応する各接続端子に接続さ
れ、各入力用発光素子の他端部は、第1共通端子に接続
される、そのような入力用ホトカプラと、(e)接続端
子に個別的に対応して設けられる複数のスイッチング手
段であって、各スイッチング手段は、スイッチング素子
と、そのスイッチング素子をスイッチング動作させる作
動素子とを有し、各スイッチング素子の一端部は、その
スイッチング素子が備えられるスイッチング手段に対応
する各接続端子に接続され、各スイッチング素子の他端
部は、第2共通端子に接続される、そのようなスイッチ
ング手段と、(f)作動素子の動作を制御する動作と、
受光素子の出力を読出す読出し動作とを行う制御手段と
を含むことを特徴とする入力または出力のための装置で
ある。また本発明は、スイッチング手段は、スイッチン
グ素子である出力用受光素子と、その出力用受光素子に
光を与えて出力用受光素子をスイッチング動作させ、各
接続端子から見た電流が流れる方向は入力用発光素子と
は逆方向性に結合される作動素子である出力用発光素子
とを有する出力用ホトカプラであることを特徴とする。
また本発明は、データバスが設けられ、制御手段は、書
込み動作の期間W20にデータバスを介して与えられる
制御データによって作動素子はスイッチング素子を閉
じ、または開き、その書込み動作の期間W20に後続す
る読出し動作の期間W21中、そのスイッチング素子の
閉じた状態または開いた状態を保ち、前記読出し動作の
期間W21に、入力用受光素子からの検出データをデー
タバスに読出し、これによって、制御データと検出デー
タとを比較して各接続端子毎の接続状態の検出を行うこ
とを特徴とする。また本発明は、(a)外部の回路に接
続される複数の接続端子と、(b)第1共通端子と、
(c)第2共通端子と、(d)接続端子に個別的に対応
して設けられる複数の入力用ホトカプラであって、各入
力用ホトカプラは、入力用発光素子と、その入力用発光
素子からの光を受光する入力用受光素子とを有し、各入
力用発光素子の一端部は、その入力用発光素子が備えら
れるホトカプラに対応する各接続端子に接続され、各入
力用発光素子の他端部は、第1共通端子に接続される、
そのような入力用ホトカプラと、(e)接続端子に個別
的に対応して設けられる複数の出力用ホトカプラであっ
て、各出力用ホトカプラは、各接続端子から見た電流が
流れる方向は入力用発光素子とは逆方向性に結合される
出力用受光素子と、その出力用受光素子に光を与えて出
力用受光素子をスイッチング動作させる出力用発光素子
とを有し、各出力用受光素子の一端部は、出力かその出
力用受光素子が備えられる出力用ホトカプラに対応する
各接続端子に接続され、各出力用受光素子の他端部は、
第2共通端子に接続される、そのような出力用ホトカプ
ラと、(f)データバスと、(g)読出しパルスに応答
し、入力用受光素子から与えられる検出データをデータ
バスに導出するゲート手段と、(h)書込みパルスに応
答し、その書込みパルスの受信中に、出力用受光素子を
スイッチング動作するためのデータバスが与えられてい
る制御データを、ストアして、その書込みパルスが与え
られなくなった後も、そのストア状態を保ち、ストアさ
れた制御データを出力用発光ダイオードに与えるラッチ
手段と、(i)データバスに接続される処理手段であっ
て、データバスに制御データを与えている書込み期間W
20内で、書込みパルスをラッチ手段に与えて出力用発
光素子による出力用受光素子のスイッチング動作を行
い、書込み期間W20後の読出し期間W21で、ゲート
手段に読出しパルスを与えてデータバスからの検出デー
タを読出す読出し動作を行い、書込み期間W20と読出
し期間W21とを繰返し、制御データと検出データとを
各接続端子毎に比較して接続状態の検出を行う処理手段
とを含むことを特徴とする入力または出力のための装置
である。
According to the present invention, (a) a plurality of connection terminals connected to an external circuit, (b) a first common terminal, (c) a second common terminal, and (d). A plurality of input photocouplers provided individually corresponding to the connection terminals, each input photocoupler having an input light emitting element and an input light receiving element for receiving light from the input light emitting element. Then, one end of each light emitting element for input is connected to each connection terminal corresponding to the photocoupler provided with the light emitting element for input, and the other end of each light emitting element for input is connected to the first common terminal. , Such an input photocoupler, and a plurality of switching means provided individually corresponding to the (e) connection terminal, each switching means comprising a switching element and an actuating element for switching the switching element. Have each One end of the switching element is connected to each connection terminal corresponding to the switching means provided with the switching element, and the other end of each switching element is connected to the second common terminal; (F) an operation for controlling the operation of the actuating element,
A device for input or output, comprising: a control means for performing a read operation for reading the output of the light receiving element. Further, according to the present invention, the switching means includes an output light receiving element which is a switching element, and light is applied to the output light receiving element to cause the output light receiving element to perform a switching operation. And a light emitting element for output which is an actuating element that is coupled in the opposite direction to the light emitting element for output.
Further, according to the present invention, a data bus is provided, and the control means causes the actuating element to close or open the switching element in accordance with the control data given through the data bus during the write operation period W20, and follow the write operation period W20. During the read operation period W21, the switching element is maintained in the closed state or the open state, and during the read operation period W21, the detection data from the input light receiving element is read to the data bus. It is characterized in that the connection state of each connection terminal is detected by comparing with the detection data. The present invention also includes (a) a plurality of connection terminals connected to an external circuit, and (b) a first common terminal.
(C) A plurality of input photocouplers provided individually corresponding to the second common terminal and (d) connection terminal, wherein each input photocoupler includes an input light emitting element and an input light emitting element. Input light-receiving element, and one end of each input light-emitting element is connected to each connection terminal corresponding to the photocoupler provided with the input light-emitting element. The end is connected to the first common terminal,
Such an input photocoupler and (e) a plurality of output photocouplers provided individually corresponding to the connection terminals, wherein each output photocoupler has an input direction in which a current flows from each connection terminal. The light receiving element for output is coupled in the opposite direction to the light emitting element, and the light emitting element for output that applies light to the light receiving element for output to switch the light receiving element for output is operated. One end is connected to each connection terminal corresponding to an output or an output photocoupler provided with the output light receiving element, and the other end of each output light receiving element is
Such an output photocoupler connected to the second common terminal, (f) a data bus, and (g) a gate means for responding to a read pulse and deriving detection data given from the input light receiving element to the data bus. And (h) in response to the write pulse, while receiving the write pulse, store the control data to which the data bus for performing the switching operation of the light receiving element for output is stored, and the write pulse is supplied. A latch means for maintaining the stored state even after it disappears and for providing the stored control data to the output light emitting diode, and (i) a processing means connected to the data bus for providing the control data to the data bus. Writing period W
In 20, a write pulse is given to the latch means to perform switching operation of the output light receiving element by the output light emitting element, and in the read period W21 after the write period W20, a read pulse is given to the gate means to detect from the data bus. And a processing unit for performing a read operation for reading data, repeating a write period W20 and a read period W21, and comparing control data and detection data for each connection terminal to detect a connection state. It is a device for input or output.

【0010】本発明は、簡単に述べると、コンピュータ
のパラレル入力ボード、パラレル出力ボードや、プログ
ラマブルコントローラおよび一般電子機器の入力ユニッ
ト、出力ユニットなどとして用いられ、ソフトウエアや
入力/出力設定器によらずに、接続端子1点ごとに入力
あるいは出力として使用することができる。本発明に従
えば、入力機器または出力機器を入出力兼用の接続端子
に接続すればよく、この接続端子が入力と出力を兼用す
ることができるので、入力点数と出力点数の合計で、た
とえば1種類の入出力ボード(すなわちユニット)に割
付けできるので、つねに最小の数のボード(すなわちユ
ニット)を用意すればよく、コスト的にも、スペース的
にも大きな効果を発揮することができる。本発明に従え
ば、たとえば開閉動作をするリミットスイッチなどのよ
うなスイッチおよびセンサなどのように検出データを導
出する入力機器が外部回路として用いられるときには、
その入力機器は接続端子と第1共通端子との間に直流電
源を介して接続される。その入力機器が閉じて導通して
インピーダンスが低下することによって、入力用ホトカ
プラの入力用発光素子が点灯し、その入力用発光素子の
光が入力用受光素子によって受光されて読出し動作の期
間W21中に、制御手段に与えられて読出される。また
本発明に従えば、外部の回路がリレーおよび電磁弁のソ
レノイドなどのように直流インピーダンスを有する出力
機器であるとき、接続端子と第2共通端子との間にその
出力機器が直流または交流の電源とともに直列に接続さ
れる。制御手段によって、書込み期間W20中の制御デ
ータに従って作動素子が制御されてスイッチング素子が
導通されると、直流または交流の電源を介して出力機器
にスイッチング素子を介して負荷電流が流れる。入力機
器用の電源と出力機器用の電源とは後述の図8のよう
に、それぞれ設けられていてもよく、または後述の図3
のように、入力機器と出力機器とに共用した直流電源を
設けてもよい。スイッチング手段は、出力用ホトカプラ
によって実現されてもよいけれども、リレーなどが用い
られてもよい。リレーを用いるときには、コイルが作動
素子として働き、リレーの励磁によって導通または遮断
であるスイッチング動作をするリレースイッチがスイッ
チング素子として働く。制御手段は、作動素子によって
スイッチング素子をスイッチング動作させるための制御
データの書込み期間W20と、入力用受光素子の出力で
ある検出データを読出す読出し期間W21とが、時間的
にずらして設定されるので、上述のように入力機器と出
力機器とのために接続端子を共用化することができると
ともに、データバスを制御データともに検出データとの
ために共用化することができる。したがって入力機器の
数と出力機器の数の合計に対応して接続端子を準備すれ
ばよく、効率的な構成を実現することができ、従来から
の入力または出力のユニットにおける入力端子および出
力端子の使用されない無駄をできるだけなくすことがで
きる。さらに本発明に従えば、書込み期間W20に、作
動素子によって制御データに従ってスイッチング素子を
閉じて導通し、または開いて遮断し、その状態を、少な
くとも次の後続する読出し動作の期間W21中、保ち、
この読出し期間W21に、入力用受光素子の出力である
検出データを読出し、こうして制御データと、前記読出
して得られた検出データとを比較することによって、入
力用発光素子、スイッチング素子、直流電源および接続
ラインなどの接続状態を、各接続端子毎にチェックして
検出し、自己診断することができる。たとえば後述の図
3の構成において、入力機器と出力機器とのための直流
電源を共用化した構成において、スイッチング素子が導
通することによって入力用発光素子に電流が流れて点灯
され、またそのスイッチング素子が遮断されたときには
入力用発光素子には電流が流れず消灯される。したがっ
てこのような動作を監視することによって、上述のよう
に自己診断することができる。この自己診断を確実にす
るために、たとえば通常の運転を開始するに先立ち、た
とえば工場の朝の始業に先立ち、すべての接続端子に関
して一斉に行うこともまた、可能である。このときに
は、図3および図8のように、入力機器および外部機器
を、それらに直列に予め介在されたスイッチSW11,
SW12で遮断しておく。また自己診断の動作は、通常
の運転中においても行うことができる。さらに本発明に
従えば、処理手段からデータバスに制御データを与えて
いる書込み期間W20内でラッチ手段に書込みパルスを
与え、制御データをラッチ手段にストアして出力用ホト
カプラに備えられている出力用発光素子を発光/消灯し
て出力用受光素子のスイッチング動作を行い、その出力
用受光素子を介して出力機器が動作し、このスイッチン
グ動作の状態は、次に後続する検出データを読出す読出
し期間W21においても保たれる。検出データが、制御
データ、したがって出力用受光素子のスイッチング動作
に対応した値であるかどうかをチェックして検出するこ
とによって、入力用ホトカプラ、出力用ホトカプラ、直
流電源およびラインの接続状態が正常であるかどうかの
チェックをして検出することが、行うことができる。
Briefly stated, the present invention can be used as a parallel input board and a parallel output board of a computer, an input unit and an output unit of a programmable controller and general electronic equipment, and can be controlled by software or an input / output setting device. Instead, each connection terminal can be used as an input or an output. According to the present invention, an input device or an output device may be connected to a connection terminal for both input and output, and this connection terminal can be used for both input and output, so that the total number of input points and output points is, for example, 1 Since it can be assigned to various types of input / output boards (that is, units), it is sufficient to always prepare the minimum number of boards (that is, units), and it is possible to exert a great effect in terms of cost and space. According to the present invention, when an input device that derives detection data, such as a switch and a sensor such as a limit switch that performs an opening / closing operation, is used as an external circuit,
The input device is connected between the connection terminal and the first common terminal via a DC power supply. When the input device is closed and conducts to reduce the impedance, the input light emitting element of the input photocoupler is turned on, the light of the input light emitting element is received by the input light receiving element, and during the read operation period W21. Then, it is given to the control means and read. Further, according to the present invention, when the external circuit is an output device having a direct current impedance such as a relay and a solenoid of a solenoid valve, the output device is connected between the connection terminal and the second common terminal. It is connected in series with the power supply. When the control element controls the actuating element in accordance with the control data in the writing period W20 to make the switching element conductive, a load current flows through the switching element to the output device via the DC or AC power source. The power supply for the input device and the power supply for the output device may be respectively provided as shown in FIG. 8 described later, or FIG.
As described above, a DC power source may be shared by the input device and the output device. Although the switching means may be realized by an output photocoupler, a relay or the like may be used. When a relay is used, the coil acts as an actuating element, and a relay switch that conducts or shuts off by exciting the relay acts as a switching element. In the control means, a control data writing period W20 for causing the switching element to perform a switching operation by the actuating element and a reading period W21 for reading the detection data which is the output of the input light receiving element are staggered in time. Therefore, as described above, the connection terminal can be shared for the input device and the output device, and the data bus can be shared for the control data and the detection data. Therefore, it suffices to prepare connection terminals corresponding to the total number of input devices and output devices, and an efficient configuration can be realized, and the input terminals and output terminals of conventional input or output units can be It is possible to eliminate unused waste as much as possible. Further in accordance with the invention, during the write period W20, the actuating element closes the switching element in accordance with the control data to make it conductive, or opens it to interrupt it and keeps that state at least during the period W21 of the next subsequent read operation,
During this read-out period W21, the detection data output from the input light-receiving element is read out, and the control data is compared with the detection data obtained by the above-mentioned reading to obtain the input light-emitting element, the switching element, the DC power supply, and The connection state of the connection line and the like can be checked and detected for each connection terminal to perform self-diagnosis. For example, in the configuration of FIG. 3 to be described later, in a configuration in which a DC power source is shared for an input device and an output device, a current flows through the input light emitting element when the switching element is conductive, and the switching element is turned on. When is cut off, no current flows in the input light emitting element and the input light emitting element is turned off. Therefore, by monitoring such an operation, the self-diagnosis can be performed as described above. In order to ensure this self-diagnosis, it is also possible to carry out all the connection terminals simultaneously, for example before starting normal operation, for example before starting the factory in the morning. At this time, as shown in FIGS. 3 and 8, the input device and the external device are connected in series with the switches SW11,
Shut off with SW12. The self-diagnosis operation can be performed even during normal driving. Further, according to the present invention, the write pulse is applied to the latch means within the write period W20 in which the control data is applied from the processing means to the data bus, the control data is stored in the latch means, and the output provided in the output photocoupler. The light emitting element for light is turned on / off to perform the switching operation of the light receiving element for output, the output device operates through the light receiving element for output, and the state of this switching operation is to read the detection data that follows next. It is also maintained in the period W21. By checking and detecting whether or not the detected data is a value corresponding to the control data, that is, the value corresponding to the switching operation of the output light-receiving element, the connection state of the input photocoupler, output photocoupler, DC power supply and line is normal. It can be done by checking for and detecting.

【0011】[0011]

【発明の実施の形態】図1は、本発明の実施の一形態の
一部の構成を示す電気回路図である。入出力ユニットU
0は、コンピュータとプログラマブルコントローラすな
わちシーケンサなどとのシステムのハウジングに、着脱
可能なコネクタによって装着することができ、この入出
力ユニットU0は、たとえば印刷配線基板に搭載されて
構成される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is an electric circuit diagram showing a part of the configuration of an embodiment of the present invention. I / O unit U
0 can be mounted in a housing of a system including a computer and a programmable controller, that is, a sequencer by a detachable connector, and the input / output unit U0 is mounted on, for example, a printed wiring board.

【0012】図2は、本発明の実施の一形態のシステム
の全体の構成を示すブロック図である。図1に示される
入出力ユニットU0およびそれと同様な構成を有する入
出力ユニットU1〜U15は、データバス16などを介
してマイクロプロセッサなどによって実現される処理回
路17に接続される。処理回路17には、ユーザプログ
ラムがストアされたリードオンリメモリおよび演算結果
をストアするランダムアクセスメモリなどを含むメモリ
18が接続されるとともに、入出力のデータなどおよび
自己診断結果を表示するための表示出力手段19が接続
される。表示接続手段19は、たとえば液晶、陰極線管
などの目視表示を行い、またはプリンタによって記録紙
に印字表示出力する構成であってもよい。各入出力ユニ
ットU0〜U15には、参照符S10〜S150などで
示される入力機器が接続され、また参照符L11〜L1
57で示される出力機器が接続される。入力機器は、た
とえばリミットスイッチおよびセンサなどであり、出力
機器はたとえばリレーおよびソレノイドなどであっても
よい。
FIG. 2 is a block diagram showing the overall configuration of a system according to an embodiment of the present invention. The input / output unit U0 shown in FIG. 1 and the input / output units U1 to U15 having the same configuration as the input / output unit U0 are connected to a processing circuit 17 realized by a microprocessor or the like via a data bus 16 or the like. A memory 18 including a read-only memory in which a user program is stored and a random access memory in which a calculation result is stored is connected to the processing circuit 17, and a display for displaying input / output data and the self-diagnosis result. The output means 19 is connected. The display connection means 19 may be configured to visually display a liquid crystal, a cathode ray tube, or the like, or print and display on a recording paper by a printer. The input / output units U0 to U15 are connected to input devices indicated by reference numerals S10 to S150, and reference numerals L11 to L1.
The output device indicated by 57 is connected. The input device may be, for example, a limit switch and a sensor, and the output device may be, for example, a relay and a solenoid.

【0013】再び図1を参照して、入出力ユニットU0
は、入力機器および出力機器である外部の回路に接続さ
れる複数(この実施の一形態では合計8)の接続端子T
0〜T7と、第1共通端子TC1と、第2共通端子TC
2とが設けられる。さらに処理回路17にデータバス1
6を介して接続される接続端子T0〜T7に個別的に対
応する端子D0〜D7と、アドレス信号のための端子A
0〜A3と、読出し/書込みのための信号の端子R/W
と、ストローブパルスのための端子STPとが備えられ
る。これらの参照符は、信号を表すためにもまた、用い
られることがある。
Referring again to FIG. 1, the input / output unit U0
Is a plurality (8 in this embodiment in total) of connection terminals T connected to external circuits that are input devices and output devices.
0 to T7, a first common terminal TC1, and a second common terminal TC
2 are provided. Furthermore, the data bus 1 is connected to the processing circuit 17.
Terminals D0 to D7 individually corresponding to the connection terminals T0 to T7 connected via 6 and a terminal A for address signals
0 to A3 and signal terminals R / W for reading / writing
And a terminal STP for strobe pulse. These reference signs may also be used to represent signals.

【0014】各接続端子T0〜T7に個別的に対応し
て、結合回路CPL0〜CPL7が備えられる。各結合
回路CPL0〜CPL7は、入力用ホトカプラPH10
〜PH17と、出力用ホトカプラPH20〜PH27と
を有する。入力用ホトカプラPH10〜PH17は、入
力用発光ダイオードである発光素子D10〜D17と、
その発光素子D10〜D17からの光を受光するホトト
ランジスタである入力用受光素子P10〜P17とを有
する。入力用発光素子D10〜D17のカソードは、各
入力用発光素子D10〜D17が備えられる入力用ホト
カプラPH10〜PH17に対応する各接続端子T0〜
T7に、それぞれ接続される。この入力用発光素子D1
0〜D17には、各接続端子T0〜T7にそれぞれ近接
して配置された表示用発光ダイオードD30〜D37が
直列に接続され、さらに電流制限用抵抗が介在される。
入力用受光素子P10〜P17の一端部はゲート手段2
1にそれぞれ接続されるとともに、直流電源22の正極
に、プルアップ抵抗R20〜R27を介して接続され
る。受光素子P10〜P17の他端部は、ライン23を
介して接地され、直流電源22の負極に接続される。表
示用発光ダイオードD30〜D37は省略されてもよ
い。
Coupling circuits CPL0 to CPL7 are provided corresponding to the connection terminals T0 to T7 individually. Each of the coupling circuits CPL0 to CPL7 includes an input photocoupler PH10.
.About.PH17 and output photocouplers PH20 to PH27. The input photocouplers PH10 to PH17 include light emitting elements D10 to D17 which are input light emitting diodes,
Input light receiving elements P10 to P17 which are phototransistors that receive light from the light emitting elements D10 to D17. The cathodes of the light emitting elements D10 to D17 for input are connected to the connection terminals T0 to T0 corresponding to the photo couplers PH10 to PH17 for input including the light emitting elements D10 to D17 for input.
Each is connected to T7. This input light-emitting element D1
Display light-emitting diodes D30 to D37, which are arranged in proximity to the connection terminals T0 to T7, are connected in series to 0 to D17, and a current limiting resistor is interposed.
One end of each of the input light receiving elements P10 to P17 has a gate means 2
1 and the positive electrode of the DC power supply 22 via pull-up resistors R20 to R27. The other ends of the light receiving elements P10 to P17 are grounded via the line 23 and are connected to the negative electrode of the DC power supply 22. The display light emitting diodes D30 to D37 may be omitted.

【0015】出力用ホトカプラPH20〜PH27にお
ける出力用受光素子P20〜P27の一端部は、その出
力用受光素子P20〜P27が備えられる出力用ホトカ
プラPH20〜PH27に対応する接続端子T0〜T7
に、それぞれ接続される。これらの出力用受光素子P2
0〜P27の他端部は、第2共通端子TC2に接続され
る。出力用ホトカプラPH20〜PH27は、出力用受
光素子P20〜P27に光を与える発光ダイオードであ
る出力用発光素子D20〜D27を有する。接続端子T
0から見た電流が流れる方向は、出力用受光素子P20
と入力用発光素子D10とは逆方向性にそれぞれ結合さ
れており、このことは残余の接続端子T1〜T7に関し
ても同様である。これによってたとえば出力用受光素子
P20と入力用発光素子D10とに電流が流れることが
できる。
One ends of the output photodetectors P20 to P27 in the output photocouplers PH20 to PH27 have connection terminals T0 to T7 corresponding to the output photocouplers PH20 to PH27 provided with the output photodetectors P20 to P27.
, Respectively. These output light receiving elements P2
The other ends of 0 to P27 are connected to the second common terminal TC2. The output photocouplers PH20 to PH27 have output light emitting elements D20 to D27 which are light emitting diodes that give light to the output light receiving elements P20 to P27. Connection terminal T
The direction in which the current flows when viewed from 0 is the light receiving element P20 for output.
And the input light-emitting element D10 are coupled in opposite directions, which is the same for the remaining connection terminals T1 to T7. Thereby, for example, a current can flow through the output light receiving element P20 and the input light emitting element D10.

【0016】これらの発光素子D20〜D27のカソー
ドである一端部は、集積回路によって実現されるラッチ
手段24に、電流制限用抵抗を介してそれぞれ接続され
る。発光素子D20〜D27のアノードである他端部
は、直流電源22の正極に接続される。ラッチ手段24
は、発光素子D20〜D27の前記一端部を、制御デー
タに対応して直流電源22の負極に導通または遮断する
働きをする。ゲート手段21とラッチ手段24とは、デ
ータバス16に接続される。データバス16の端子D0
〜D7は、前述のように接続端子T0〜T7に個別的に
対応する。
One end of each of the light emitting devices D20 to D27, which is a cathode, is connected to a latch means 24 realized by an integrated circuit through a current limiting resistor. The other ends, which are the anodes of the light emitting elements D20 to D27, are connected to the positive electrode of the DC power supply 22. Latch means 24
Serves to connect or disconnect the one ends of the light emitting devices D20 to D27 to the negative electrode of the DC power supply 22 in accordance with the control data. The gate means 21 and the latch means 24 are connected to the data bus 16. Data bus 16 terminal D0
~ D7 individually correspond to the connection terminals T0 to T7 as described above.

【0017】入出力ユニットU0には、たとえばディッ
プスイッチなどによって実現されるアドレス設定器25
が設けられ、その入出力ユニットU0を識別するための
アドレスが設定され、制御回路36に与えられる。制御
回路36は、処理回路17からのアドレス信号A0〜A
3が与えられたとき、アドレス設定器25で設定された
アドレスと一致していれば、書込みパルスをライン26
に導出してラッチ手段24に与える。これによってラッ
チ手段24は、データバス16からの並列制御データを
それぞれストアして、出力用発光素子D20〜D27を
点灯/消灯制御し、これに応じて出力用受光素子P20
〜P27が導通/遮断してスイッチング動作される。ラ
ッチ手段24は、ライン26から書込みパルスが与えら
れるたび毎に、データバス16からの制御データを書換
えて更新してストアし、すなわち書込みパルス26の遮
断後も、制御データのストア状態を保つ。
The input / output unit U0 has an address setter 25 implemented by, for example, a DIP switch.
Is provided, an address for identifying the input / output unit U0 is set, and is provided to the control circuit 36. The control circuit 36 controls the address signals A0 to A from the processing circuit 17.
When 3 is given, if the address set by the address setter 25 matches, the write pulse is sent to the line 26.
To the latch means 24. As a result, the latch means 24 stores the parallel control data from the data bus 16 and controls the light emitting elements D20 to D27 for lighting to be turned on / off, and accordingly, the light receiving element for output P20.
~ P27 conducts / interrupts to perform switching operation. The latch means 24 rewrites, updates and stores the control data from the data bus 16 every time when the write pulse is applied from the line 26, that is, the control data storage state is maintained even after the write pulse 26 is cut off.

【0018】また制御回路36は、入出力ユニットU0
を特定するアドレス信号が処理回路17から与えられた
とき、ライン27に読出しパルスを導出してゲート手段
21に与える。これによってゲート手段21は、入力用
受光素子P10〜P17の導通/遮断であるスイッチン
グ状態に対応したレベルを有する検出データを、データ
バス16に導出して端子D0〜D7を介して処理回路1
7に並列に与える。
The control circuit 36 also includes an input / output unit U0.
When an address signal for specifying is supplied from the processing circuit 17, a read pulse is derived on the line 27 and applied to the gate means 21. Thereby, the gate means 21 derives the detection data having the level corresponding to the switching state, which is the conduction / interruption of the light receiving elements P10 to P17 for input, to the data bus 16 and the processing circuit 1 via the terminals D0 to D7.
7 in parallel.

【0019】図3は、入出力ユニットU0に入力機器S
10および出力機器L11が接続された状態を示す一部
の電気回路図である。入力機器S10の一端部は、接続
端子T0に接続され、他端部は、入力機器用共通接続点
28を介してスイッチSW11および直流電源29の負
極に接続され、その電源29の正極は第1共通端子TC
1に接続される。電源29の負極は、スイッチSW11
とともに第2接続端子TC2に接続される。出力機器L
11の一端部は、接続端子T1に接続され、他端部は、
出力機器L11の出力機器用共通接続点31およびスイ
ッチSW12を介して電源29の正極および第1共通端
子TC1に接続される。
In FIG. 3, the input device S is connected to the input / output unit U0.
10 is a partial electric circuit diagram showing a state in which 10 and the output device L11 are connected. One end of the input device S10 is connected to the connection terminal T0, and the other end is connected to the switch SW11 and the negative electrode of the DC power supply 29 via the input device common connection point 28, and the positive electrode of the power supply 29 is the first. Common terminal TC
Connected to 1. The negative electrode of the power supply 29 is the switch SW11.
At the same time, it is connected to the second connection terminal TC2. Output device L
One end of 11 is connected to the connection terminal T1 and the other end is
The output device common connection point 31 of the output device L11 and the switch SW12 are connected to the positive electrode of the power supply 29 and the first common terminal TC1.

【0020】図4は、図1〜図3に示される本発明の実
施の形態の全体の動作を簡略化して示す図である。図4
(1)に示されるように本件システムの電源が時刻t1
で投入されると、処理回路17は、図4(2)に示され
るように同一の期間W1,W2,W3,…において、入
出力ユニットU0〜U15を期間W10毎にアドレス信
号A0〜A3によってアドレス指定してこれらの入出力
ユニットU0〜U15に接続された出力機器の動作を制
御データによって制御し、入力機器からの検出データを
読出す。本件システムにおいて出力機器の制御および入
力機器の読出しの各動作に先立ち、図4(3)に示され
るように、時刻t2〜t4の最初の期間W1,W2で
は、各入出力ユニットU0〜U15における接続状態の
検出をして自己診断を行い、その後の時刻t4以降にお
ける期間W3,W4,…において通常運転のための入力
機器の読出しと出力機器の制御とを行う。
FIG. 4 is a diagram showing the overall operation of the embodiment of the present invention shown in FIGS. 1 to 3 in a simplified manner. FIG.
As shown in (1), the power supply of the system is at time t1.
Then, the processing circuit 17 causes the input / output units U0 to U15 to be supplied with the address signals A0 to A3 every period W10 in the same periods W1, W2, W3, ... As shown in FIG. The operation of the output device connected to these input / output units U0 to U15 by addressing is controlled by the control data, and the detection data from the input device is read. In the present system, prior to each operation of controlling the output device and reading the input device, as shown in FIG. 4C, in the first periods W1 and W2 from time t2 to t4, the input / output units U0 to U15 The connection state is detected and self-diagnosis is performed, and in the subsequent periods W3, W4, ... After time t4, reading of the input device for normal operation and control of the output device are performed.

【0021】自己診断を行う期間W1,W2では、図4
(3)に示されるように前述の図3に示されるスイッチ
SW11,SW12は遮断されたままであり、時刻t4
以降の期間W3,W4,…ではこれらのスイッチSW1
1,SW12は導通された状態に保たれる。これらのス
イッチSW11,SW12の制御は、処理回路17によ
って行われてもよく、または図4(1)に示される時刻
t1の電源スイッチの投入動作に従うタイマによって時
刻t2〜t4の時間が設定されて、これらのスイッチS
W11,SW12のスイッチング状態の制御が行われて
もよい。
In the periods W1 and W2 in which the self-diagnosis is performed, as shown in FIG.
As shown in (3), the switches SW11 and SW12 shown in FIG.
In the subsequent periods W3, W4, ..., these switches SW1
1 and SW12 are kept in a conductive state. The control of these switches SW11 and SW12 may be performed by the processing circuit 17, or the time from t2 to t4 is set by the timer according to the turning-on operation of the power switch at time t1 shown in FIG. 4 (1). , These switches S
The switching states of W11 and SW12 may be controlled.

【0022】図5は、入出力ユニットU0における前述
の図4の期間W1の具体的な動作を説明するための波形
図である。この図5に示される期間W1の動作は、後続
する期間W2,W3,…においても同様なタイミングで
繰返されるけれども、制御データである書込みデータな
どは異なる。図5(1)〜図5(4)は、処理回路17
から各入出力ユニットU0〜U15のアドレス端子A0
〜A3に与えられるアドレス信号の各ビットの波形を示
す。この各ビットのアドレス信号A0〜A3によって、
前述のように入出力ユニットU0〜U15がアドレス指
定され、アドレス設定器25と一致したアドレス信号A
0〜A3が与えられたとき、そのアドレス指定された入
出力ユニットU0〜U15の1つが、各期間W0内で入
力機器の読出しと出力機器の制御とを行う。
FIG. 5 is a waveform diagram for explaining a specific operation of the input / output unit U0 during the above-mentioned period W1 of FIG. The operation in the period W1 shown in FIG. 5 is repeated at the same timing in the subsequent periods W2, W3, ... However, the write data as the control data is different. 5 (1) to 5 (4) show the processing circuit 17
To the address terminal A0 of each input / output unit U0 to U15
The waveform of each bit of the address signal given to A3 is shown. By the address signals A0 to A3 of each bit,
As described above, the input / output units U0 to U15 are addressed and the address signal A matched with the address setter 25
Given 0-A3, one of the addressed I / O units U0-U15 will read the input device and control the output device within each period W0.

【0023】各入出力ユニットU0〜U15毎の前記期
間W10は、たとえば10μsecであり、したがって
期間W1=W2=W3=…=160μsecである。こ
のような短い期間W1,W2,W3では、リレーおよび
電磁弁のソレノイドなどのように駆動電力を必要とする
出力機器L11は動作することはない、出力機器が動作
するには、たとえば100msec以上、出力用受光素
子P20〜P27が導通または遮断し続ける必要があ
る。出力機器を、制御データに従って動作させるため
に、ラッチ手段24が前述のように設けられ、制御デー
タをラッチして保持する。
The period W10 for each of the input / output units U0 to U15 is, for example, 10 μsec, and thus the period W1 = W2 = W3 = ... = 160 μsec. In such a short period W1, W2, W3, the output device L11 that requires driving power such as the relay and the solenoid of the solenoid valve does not operate. For the output device to operate, for example, 100 msec or more, It is necessary that the output light receiving elements P20 to P27 continue to be conducted or cut off. In order to operate the output device according to the control data, the latch means 24 is provided as described above and latches and holds the control data.

【0024】図5(5)はデータバス16によって伝送
されるデータを示す。電源投入後の最初の2つの周期W
1,W2では、接続状態の検出である自己診断を行い、
このために最初の周期W1では、書込みデータである制
御データA100を全てのユニットU0〜U15におい
て与え、次の周期W2では、制御データA200を全て
のユニットU0〜U15に与え、その後の通常の運転が
行われる周期W3,W4,…では、制御データは、接続
されている外部機器の動作のためのデータに設定され
る。以下の説明では、期間W1について主として行うけ
れども、他の期間W2;W3,W4,…においても同様
である。
FIG. 5 (5) shows the data transmitted by the data bus 16. First two cycles W after power is turned on
In 1 and W2, self-diagnosis, which is the detection of the connection state, is performed.
Therefore, in the first cycle W1, the control data A100, which is write data, is given to all the units U0 to U15, and in the next cycle W2, the control data A200 is given to all the units U0 to U15, and then the normal operation is performed. In the cycles W3, W4, ... In which the control is performed, the control data is set to the data for the operation of the connected external device. In the following description, the period W1 is mainly described, but the same applies to the other periods W2; W3, W4, ....

【0025】各入出力ユニットU0〜U15がアドレス
指定される各期間W10において、処理回路17は端子
R/Wに図5(6)に示される読出し/書込み信号を与
える。この信号R/Wは、各期間W10において最初の
期間W20ではHレベルとなり、データバス16から、
出力機器を制御する書込みのための制御データA10
0,A100,A100,…が与えられ、次の期間W2
1では、入力機器からの検出パルスを読出すために論理
レベルが反転してLレベルとなり、読出されたデータB
100,B100,B100,…が、データバス16に
導出される。
In each period W10 in which each of the input / output units U0 to U15 is addressed, the processing circuit 17 applies the read / write signal shown in FIG. 5 (6) to the terminal R / W. This signal R / W becomes H level in the first period W20 in each period W10, and
Control data A10 for writing to control the output device
0, A100, A100, ... Are given, and the next period W2
At 1, the logic level is inverted to L level in order to read the detection pulse from the input device, and the read data B
, 100, B100, B100, ... Are led to the data bus 16.

【0026】処理回路17は、図5(7)に示されるス
トローブパルスSTPを導出する。このストローブパル
スSTPは、書込み期間W20および読出し期間W21
において、それらよりも短い期間W30,W31だけH
レベルとなり、残余の期間ではLレベルである。制御回
路26は、アドレス信号A0〜A3と書込み/読出し信
号R/WとストローブパルスSTPとに応答し、アドレ
ス信号A0〜A3がアドレス設定器25で設定されたア
ドレスと一致したとき、ライン26には図5(8)に示
されるように期間W30だけHレベルとなる書込みパル
スをライン26に導出してラッチ手段24に与えるとと
もに、次の期間W31では図5(9)に示されるHレベ
ルの読出しパルスをライン27に導出してゲート手段2
1に与える。
The processing circuit 17 derives the strobe pulse STP shown in FIG. 5 (7). This strobe pulse STP has a write period W20 and a read period W21.
At H, only H30 and W31 are shorter than those
It becomes the level and is at the L level in the remaining period. The control circuit 26 responds to the address signals A0 to A3, the write / read signal R / W and the strobe pulse STP, and when the address signals A0 to A3 match the address set by the address setter 25, the line 26 As shown in FIG. 5 (8), the write pulse which is at the H level for the period W30 is led to the line 26 and given to the latch means 24, and at the next period W31, the H level of the H level shown in FIG. 5 (9). The read pulse is led to the line 27 and the gate means 2 is provided.
Give to 1.

【0027】図6は、メモリ18のストア状態を示すメ
モリマップ図である。メモリ18には、各入出力ユニッ
トU0〜U15の各接続端子T0〜T7毎に、各接続端
子T0〜T15毎の外部機器を制御する制御データと、
入力機器からの検出データとをストアする領域がそれぞ
れ設けられる。制御データおよび検出データは、1ビッ
トから成る2値信号である。制御データと検出データと
によって、自己診断を行う期間W1,W2の自己診断結
果およびその後の通常の運転の各期間W3,W4,…に
おける各データがメモリ18に各入出力ユニットU0〜
U15の接続端子T0〜T7毎にストアされ、これによ
って常に接続状態の異常を検出することができ、自己診
断が行われる。
FIG. 6 is a memory map diagram showing a stored state of the memory 18. In the memory 18, for each connection terminal T0 to T7 of each input / output unit U0 to U15, control data for controlling an external device for each connection terminal T0 to T15,
Areas for storing the detection data from the input device are provided respectively. The control data and the detection data are binary signals consisting of 1 bit. Based on the control data and the detection data, the self-diagnosis results of the self-diagnosis periods W1 and W2 and the respective data in the subsequent normal operation periods W3, W4, ... Are stored in the memory 18 in the input / output units U0 to U0.
It is stored for each of the connection terminals T0 to T7 of U15, whereby an abnormality in the connection state can be always detected, and self-diagnosis is performed.

【0028】図7は、処理回路17の動作を説明するた
めのフローチャートである。ステップa1からステップ
a2に移り、電源投入による自己診断を行う期間W1,
W2であるかどうかが判断され、先ずその期間W1であ
るときには、次のステップa3に移り、期間W1におい
て各ユニットU0〜U15毎の各期間W10において図
5(1)〜図5(4)に示されるアドレス信号A0〜A
3(総括的にはADDで示す)を導出する。期間W1,
W2では、スイッチSW11,SW12は、前述の図4
(3)に示されるように遮断状態とされる。
FIG. 7 is a flow chart for explaining the operation of the processing circuit 17. The period W1 in which the self-diagnosis is performed by turning on the power by moving from step a1 to step a2.
It is determined whether or not it is W2. First, when it is the period W1, the process proceeds to the next step a3, and in each period W10 of each unit U0 to U15 in the period W1, as shown in FIG. 5 (1) to FIG. 5 (4). Address signals A0 to A shown
3 (generally indicated by ADD) is derived. Period W1,
In W2, the switches SW11 and SW12 are the same as those in FIG.
As shown in (3), the cutoff state is set.

【0029】ステップa4において、これらのすべての
入出力ユニットU0〜U15におけるすべての接続端子
T0〜T7に与えられる書込みデータである制御データ
A100をすべて論理「0」にする。この論理「0」の
制御データというのは、出力用ホトカプラPH20〜P
H27におけるホトトランジスタP20〜P21が遮断
するための信号である。この制御データA100は、図
5に示される期間W20において処理回路17から導出
され、図5(8)の書込みパルスの期間W30でラッチ
手段24にストアされ、そのストア内容が出力用発光素
子D20〜D27にそれぞれ与えられる。こうして期間
W1において、出力用発光素子D20〜D27は消灯さ
れたままであり、これに応じて出力用受光素子P20〜
P27は遮断された状態に保たれる。
At step a4, the control data A100, which is the write data supplied to all the connection terminals T0 to T7 in all the input / output units U0 to U15, is set to the logic "0". The control data of this logic "0" means the output photocouplers PH20 to PH20.
This is a signal for shutting off the phototransistors P20 to P21 in H27. The control data A100 is derived from the processing circuit 17 in the period W20 shown in FIG. 5 and stored in the latch means 24 in the write pulse period W30 in FIG. 5 (8). Each is given to D27. Thus, in the period W1, the output light emitting elements D20 to D27 remain off, and accordingly, the output light receiving elements P20 to D27.
P27 remains blocked.

【0030】前述の図3において出力用受光素子P20
が遮断された状態では、直流電源29の正極からの電流
は、第1共通端子TC1、入力用発光素子D10、表示
用発光ダイオードD30および導通している出力用受光
素子P20を経て第2共通端子TC2から電源29の負
極に流れる閉ループは形成されない。したがって出力用
受光素子P20が導通している状態では、入力用発光素
子D20は消灯している。また同様に出力用受光素子P
21が遮断しているとき、直流電源29の正極からは第
1共通端子TC1、入力用発光素子D11、表示用発光
素子D31、出力用受光素子P21および第2共通端子
TC2を経て直流電源29の負極に電流が流れる閉ルー
プは形成されない。
In FIG. 3, the light receiving element P20 for output is used.
In the state where the current is cut off, the current from the positive electrode of the DC power supply 29 passes through the first common terminal TC1, the input light emitting element D10, the display light emitting diode D30, and the conductive output light receiving element P20 to the second common terminal. A closed loop that flows from TC2 to the negative electrode of the power supply 29 is not formed. Therefore, the input light emitting element D20 is turned off when the output light receiving element P20 is conductive. Similarly, the output light receiving element P
When 21 is cut off, from the positive electrode of the DC power supply 29, the first common terminal TC1, the input light emitting element D11, the display light emitting element D31, the output light receiving element P21, and the second common terminal TC2 of the DC power supply 29 are passed. A closed loop in which current flows through the negative electrode is not formed.

【0031】ステップa5では、読出し期間W21にお
ける期間W31に図5(9)の読出しパルスがゲート手
段21に与えられ、データバス16には入力用ホトカプ
ラPH10〜PH17の入力用受光素子P10〜P17
からの検出データが期間W31においてそのゲート手段
21からデータバス16を経て処理回路17に与えら
れ、その検出データが読込まれてメモリ18にストアさ
れる。前述のようにたとえば入力用受光素子D10が消
灯しているとき、接続状態が正常であれば、対応する入
力用受光素子P10は導通しており、その出力はHレベ
ルであり、このHレベルの出力を、論理「0」の検出デ
ータとし、したがってデータバス16からの入力用受光
素子P10からの検出データは論理「0」である。また
出力用受光素子P21が遮断しているときには、入力用
発光素子D11は消灯動作しており、これに応じて入力
用受光素子P11が遮断し、検出データは論理「0」と
して導出されることになる。
In step a5, the read pulse shown in FIG. 5 (9) is applied to the gate means 21 during the period W31 in the read period W21, and the data bus 16 receives the light receiving elements P10 to P17 of the input photo couplers PH10 to PH17.
In the period W31, the detection data from is supplied to the processing circuit 17 from the gate means 21 via the data bus 16, and the detection data is read and stored in the memory 18. As described above, for example, when the input light receiving element D10 is turned off and the connection state is normal, the corresponding input light receiving element P10 is conductive, and its output is at the H level. The output is the detection data of logic "0", and therefore the detection data from the input light receiving element P10 from the data bus 16 is logic "0". When the output light-receiving element P21 is cut off, the input light-emitting element D11 is turned off, and accordingly, the input light-receiving element P11 is cut off, and the detection data is derived as logic "0". become.

【0032】ステップa6では、この全ての検出データ
が、論理「0」の制御データに対応して論理「0」であ
るかどうかが判断され、そうであれば接続状態が正常で
あるものと判断されて、次のステップa61に移る。
At step a6, it is judged whether all the detected data are logic "0" corresponding to the control data of logic "0", and if so, it is judged that the connection state is normal. Then, the process proceeds to the next step a61.

【0033】ステップa61では、処理回路17は、次
の入出力ユニットU1をアドレス指定するために、その
アドレス信号ADDを1だけインクリメントし、次のス
テップa62においてそのアドレス信号ADDが入出力
ユニットU0〜U15の数N(この実施の形態ではN=
16)未満であれば、再びステップa3に戻る。
In step a61, the processing circuit 17 increments the address signal ADD by 1 in order to address the next input / output unit U1, and in the next step a62, the address signal ADD changes the input / output unit U0. The number N of U15 (N = N in this embodiment)
If less than 16), the process returns to step a3 again.

【0034】自己診断の最初の周期W1において、全て
の入出力ユニットU0〜U15において制御データを論
理「0」であるときの自己診断動作を終了した後には、
次のステップa7に移る。
In the first cycle W1 of self-diagnosis, after the self-diagnosis operation when the control data is logic "0" in all the input / output units U0 to U15 is completed,
Move to next step a7.

【0035】ステップa7では、次の自己診断の周期W
2において、期間W20ですべての入出力ユニットU0
〜U15の出力用受光素子P20〜P27が遮断する論
理「1」の信号を導出し、次のステップa8では期間W
31で入力用発光素子D10〜D17が点灯し、そのす
べての入力用受光素子P10〜P17の出力がLレベル
であって、すなわち検出データが論理「1」であるかが
ステップa9で判断される。こうして自己診断の期間W
2において制御データが論理「1」であり、これによっ
て出力用受光素子P20〜P27が導通しているとき、
入力用発光素子D10〜D17が点灯して入力用受光素
子P10〜P17が導通していることになり、その出力
はLレベルであって検出データは論理「1」であり、し
たがってこのとき接続状態が正常であるものと判断す
る。
In step a7, the next self-diagnosis cycle W
2, all input / output units U0 in period W20
The signal of logic "1" which is cut off by the output light receiving elements P20 to P27 of U15 to U15 is derived.
In step 31, the input light emitting elements D10 to D17 are turned on, and the outputs of all the input light receiving elements P10 to P17 are at the L level, that is, it is determined in step a9 whether the detection data is logic "1". . Thus, self-diagnosis period W
2, the control data is logic "1", and when the output light receiving elements P20 to P27 are conductive,
The light emitting elements D10 to D17 for input are turned on and the light receiving elements P10 to P17 for input are conducted, the output thereof is at L level, and the detection data is logic "1". Is judged to be normal.

【0036】次のステップa10では、入出力ユニット
U0〜U15が順次的に1つずつアドレス指定されてゆ
く。ステップa63において、参照符ADDで示される
アドレス信号が入出力ユニットU0〜U15の数N(こ
の実施の形態では前述のように16)を超えると、ステ
ップa63からステップa7に戻り、次の入出力ユニッ
トU1以降の動作がステップa2〜ステップa17で繰
返される。
In the next step a10, the input / output units U0 to U15 are sequentially addressed one by one. When the address signal indicated by the reference symbol ADD exceeds the number N of the input / output units U0 to U15 (16 as described above in this embodiment) in step a63, the process returns from step a63 to step a7 and the next input / output is performed. The operation after the unit U1 is repeated in steps a2 to a17.

【0037】ステップa6,a9において、制御データ
と検出データとが上述のように対応しないときには、自
己診断結果は異常と判断されてステップa11では、表
示出力手段19によって異常状態が発生したことを表示
出力し、さらにブザーなどで音響表示出力する。
When the control data and the detected data do not correspond to each other as described above in steps a6 and a9, the self-diagnosis result is judged to be abnormal, and in step a11, the display output means 19 indicates that an abnormal state has occurred. It is output, and the sound display is output with a buzzer.

【0038】期間W1,W2において自己診断の結果、
接続状態に異常が発生していなければ、ステップa2か
らステップa12に移り、期間W3以降において入出力
ユニットU0〜U15に接続された出力機器の制御およ
び入力機器からの検出データの読出しを行う。ステップ
a12では、期間W3以降においてスイッチSW11,
SW12を導通したままとする。ステップa12では、
期間W3において入出力ユニットU0をアドレス指定
し、制御データをラッチ手段24に書込んでストアし、
そのストア状態を保持し、これによって出力用発光素子
D20〜D27、したがって出力用受光素子P20〜P
27を、制御データに対応してスイッチング動作し、各
接続端子T0〜T7のうちの少なくとも一部に接続され
ている出力機器を動作させる。
As a result of the self-diagnosis in the periods W1 and W2,
If no abnormality has occurred in the connection state, the process proceeds from step a2 to step a12, and in the period W3 and thereafter, the output device connected to the input / output units U0 to U15 is controlled and the detection data is read from the input device. At step a12, the switches SW11,
SW12 remains conductive. In step a12,
In the period W3, the input / output unit U0 is addressed, the control data is written in the latch means 24 and stored,
The stored state is maintained, whereby the output light-emitting elements D20 to D27, and thus the output light-receiving elements P20 to P20.
27 performs a switching operation corresponding to the control data to operate the output device connected to at least a part of each of the connection terminals T0 to T7.

【0039】ステップa14では、ゲート手段21を介
して入力機器からの検出データを読込む。
At step a14, the detection data from the input device is read through the gate means 21.

【0040】その後、ステップa15では、この通常の
運転中にも、出力機器が接続されている接続端子に関し
て自己診断を行う。先ず入出力ユニットU0で出力機器
が接続されている出力用受光素子たとえばP21を遮断
するために処理回路17から与えられる制御データが論
理「0」であるとき、出力機器L11が接続されている
接続端子T1に対応する入力用発光素子D11が消灯し
ており、したがって入力用受光素子P11が遮断し、検
出データが論理「0」であって、したがってこのとき接
続状態が正常であることが判断される。また制御データ
が論理「1」であって、出力用受光素子P21が導通し
ている状態であれば、出力機器が接続されている接続端
子T1に対応する入力用発光素子D11が点灯して入力
用受光素子P11が導通して検出データが論理「1」と
なり、このとき接続状態が正常であることが判断され
る。このような自己診断のステップa15において、出
力機器の動作のための制御データと入力機器からの検出
データとに基づき、接続状態の正常または異常の検出を
行う。
Thereafter, in step a15, self-diagnosis is carried out for the connection terminal to which the output device is connected even during the normal operation. First, when the control data given from the processing circuit 17 for shutting off the light receiving element for output, for example, P21, to which the output device is connected in the input / output unit U0 is logic "0", the connection to which the output device L11 is connected Since the input light emitting element D11 corresponding to the terminal T1 is turned off, the input light receiving element P11 is cut off, the detection data is logic "0", and thus it is determined that the connection state is normal at this time. It If the control data is logic "1" and the output light-receiving element P21 is in the conductive state, the input light-emitting element D11 corresponding to the connection terminal T1 to which the output device is connected is turned on and input. The light-receiving element P11 for conduction becomes conductive and the detection data becomes logic "1". At this time, it is determined that the connection state is normal. In step a15 of such self-diagnosis, a normal or abnormal connection state is detected based on the control data for the operation of the output device and the detection data from the input device.

【0041】異常であることがステップa16で判断さ
れると、ステップa11において異常処理が行われ、異
常でなければ、ステップa17において次の入出力ユニ
ットU1〜U15が順次的にアドレス指定され、ステッ
プa2に戻って同様な動作が繰返される。
If it is determined to be abnormal in step a16, abnormality processing is performed in step a11, and if not abnormal, the next input / output units U1 to U15 are sequentially addressed in step a17, The same operation is repeated after returning to a2.

【0042】本発明の実施の他の形態では、スイッチS
W11,SW12を、通常の運転状態と同様に導通した
ままに保ち、工場の始業時に、前述の図7におけるステ
ップa3〜a6,a61,a62,a7〜a10,a6
3,a11の自己診断動作を行うようにしてもよい。こ
のときには、全ての制御データを論理「0」とし、ステ
ップa6において出力機器が接続されている接続端子t
0〜t7に対応する入力用発光素子D10〜D17が消
灯しており、したがってその検出データが論理「0」で
あれば、出力機器に関する接続状態が正常であるものと
判断することができる。またステップa7において全て
の制御データを論理「1」とし、出力機器が接続されて
いる接続端子t0〜t7に対応する入力用発光素子D1
0〜D17が点灯し、したがって検出データが論理
「1」であれば、その出力機器に関する接続状態が正常
であるものと判断することができる。前述のように期間
W1,W2は、たとえば160μsecであり、出力機
器が動作するために必要な時間たとえば100msec
よりも充分に短く、したがってこのような期間W1,W
2において出力機器が不所望に動作してしまうおそれは
ない。
In another embodiment of the invention, the switch S
W11 and SW12 are kept in the same conductive state as in the normal operating state, and when the factory starts, the steps a3 to a6, a61, a62, a7 to a10, a6 in FIG.
The self-diagnosis operation of 3, a11 may be performed. At this time, all the control data are set to logic "0", and the connection terminal t to which the output device is connected in step a6.
If the input light emitting elements D10 to D17 corresponding to 0 to t7 are turned off and therefore the detected data is logic "0", it can be determined that the connection state regarding the output device is normal. Further, in step a7, all the control data are set to logic "1", and the input light emitting element D1 corresponding to the connection terminals t0 to t7 to which the output device is connected.
If 0 to D17 are lit and the detected data is logic "1", it can be determined that the connection state of the output device is normal. As described above, the periods W1 and W2 are 160 μsec, for example, and the time required for the output device to operate is 100 msec, for example.
Much shorter than the above, and thus such periods W1, W
In 2, there is no possibility that the output device will operate undesirably.

【0043】図8は、本発明の実施の他の形態の一部の
構成を示す電気回路図である。この実施の形態では、第
1共通端子TC1には、入力機器用直流電源E1がスイ
ッチSW11を介して入力機器用共通接続点28に接続
される。第2共通端子TC2には、外部機器用直流電源
E2とスイッチSW12とが直列に接続されて外部機器
用共通接続点31に接続される。
FIG. 8 is an electric circuit diagram showing a part of the configuration of another embodiment of the present invention. In this embodiment, the input device DC power source E1 is connected to the input device common connection point 28 via the switch SW11 at the first common terminal TC1. An external device DC power source E2 and a switch SW12 are connected in series to the second common terminal TC2, and are connected to an external device common connection point 31.

【0044】本発明の実施のさらに他の形態では、出力
用ホトカプラPH20〜PH27に代えて、図9に示さ
れるようにリレー37が用いられもよい。このリレー3
7は、前述の実施の一形態における出力用受光素子P2
0〜P27に対応するスイッチング素子であるリレース
イッチ38と、このリレースイッチ38を導通/遮断し
てスイッチング動作させる作動素子としての前述の実施
の一形態における出力用発光素子D20〜D27に対応
するリレーコイル39とから成り、リレーコイル39が
励磁されたときリレースイッチ38が導通または遮断
し、リレーコイル39が消磁されたときリレースイッチ
38が遮断または導通されるように構成されてもよい。
前述の図8の本発明の実施の形態において、出力用ホト
カプラPH20〜PH27の代りに図9に示されるリレ
ー37が用いられるとき、出力機器のための電源E2
は、直流電源であってもよいけれども、交流電源であっ
てもよい。
In still another embodiment of the present invention, a relay 37 as shown in FIG. 9 may be used instead of the output photocouplers PH20 to PH27. This relay 3
Reference numeral 7 denotes an output light receiving element P2 in the above-described embodiment.
Relay switch 38 which is a switching element corresponding to 0 to P27, and relays corresponding to the output light emitting elements D20 to D27 in the above-described embodiment as an operating element which conducts / shuts off the relay switch 38 to perform a switching operation. The relay switch 38 may be configured to include a coil 39, and the relay switch 38 may be turned on or off when the relay coil 39 is excited, and the relay switch 38 may be turned off or turned on when the relay coil 39 is demagnetized.
In the embodiment of the present invention shown in FIG. 8 described above, when the relay 37 shown in FIG. 9 is used instead of the output photocouplers PH20 to PH27, the power source E2 for the output device is used.
May be a DC power supply, but may be an AC power supply.

【0045】[0045]

【発明の効果】以上のように本発明によれば、複数の各
接続端子には、入力用ホトカプラと、出力のための出力
用ホトカプラなどのスイッチング手段とが、関連して接
続されるので、予め定められた数の接続端子を有する入
力または出力のための前述の先行技術と同様に構成され
たユニットを準備して構成しておく場合には、接続端子
の入力点数と出力点数との合計点数を満たせば、その入
力または出力のための装置を用いることができる。これ
によって接続端子を効率的に用いることができ、コスト
低減を図り、設置スペースの節減を図ることができる。
たとえば接続端子16点を有する本発明の入力または出
力のためのユニットを構成した場合、或るシステムにお
いて入力点数18点および出力点数9点を必要とすると
き、合計点数27点(=18+9)を満足するために、
その入力または出力のためのユニットを2枚準備すれば
よい。これに対して、先行技術における入力16点の接
続端子数を有する入力ユニットおよび出力点数16点の
出力ユニットを用いるときには、或るシステムにおいて
要求される入力18点を満足するために先行技術の入力
ユニットを2枚準備し、出力9点を満足するために1枚
の出力ユニットを準備し、こうして合計3枚を必要と
し、先行技術では入力装置および出力装置における使用
されない接続端子数が多い。本発明はこのような先行技
術の問題を解決する。
As described above, according to the present invention, an input photocoupler and a switching means such as an output photocoupler for output are connected to each of the plurality of connection terminals in an associated manner. When preparing and configuring a unit configured as in the above-mentioned prior art for input or output having a predetermined number of connection terminals, the total number of input points and output points of the connection terminals If the score is satisfied, the device for the input or output can be used. As a result, the connection terminals can be used efficiently, the cost can be reduced, and the installation space can be saved.
For example, when a unit for input or output of the present invention having 16 connection terminals is configured, when a certain system requires 18 input points and 9 output points, the total number of points is 27 points (= 18 + 9). To be satisfied
It is sufficient to prepare two units for the input or output. On the other hand, when using the input unit having the number of connection terminals of 16 inputs and the output unit having the output point of 16 points in the prior art, the input of the prior art is required to satisfy the input 18 points required in a certain system. Two units are prepared, and one output unit is prepared to satisfy the output of 9 points, and thus a total of three units are required. In the prior art, the number of unused connection terminals in the input device and the output device is large. The present invention solves such prior art problems.

【0046】このように本発明によれば、予め定めた接
続端子数を有する入力または出力のためのユニットを単
一枚または複数枚組合わせて用いるいわゆるビルディン
グブロックタイプのシステムにおいて、先行技術におけ
る予め定めた接続端子数を有する入力ユニットを1枚ま
たは複数枚、および予め定めた接続端子数を有する出力
ユニットを1枚または複数枚組合わせて用いるビルディ
ングブロックタイプを備えるシステムに比べて、使用さ
れない接続端子数を低減して、構成を簡略化し、コスト
の低減と設置スペースの節減を図ることができる。
As described above, according to the present invention, in a so-called building block type system using a single or a plurality of units for input or output having a predetermined number of connection terminals, a so-called building block type system is used. Unused connection as compared to a system having a building block type in which one or a plurality of input units having a predetermined number of connection terminals and one or a plurality of output units having a predetermined number of connection terminals are used in combination The number of terminals can be reduced, the configuration can be simplified, and the cost and the installation space can be reduced.

【0047】特に本発明によれば、入力または出力のた
めのユニットを必要に応じて増設することができない、
いわば固定的なシステムにおいて、上述のビルディング
ブロックタイプに比べて、有利である。たとえば従来か
らのプログラマブルコントローラでは、(入力点数、出
力点数)が(6,4)、(8,4)、(10,6)およ
び(12,8)などである種類が存在し、これらの(入
力点数、出力点数)は、その各プログラマブルコントロ
ーラにおいて固定的である。先行技術ではこのようなプ
ログラマブルコントローラのうち、(入力点数、出力点
数)=(6,4)をすでに使用しているシステムにおい
て、その改変によって入力点数がたとえば7点必要にな
ったとすれば、出力点数は2点しか使っていなくても、
(6,4)のプログラマブルコントローラをそのまま継
続して使うことはできず、新たに(8,4)のプログラ
マブルコントローラに取換えなければならず、大きなコ
ストアップになってしまう。先行技術では、たとえば、
システムの設置当初から入力点数および出力点数が判っ
ていて、それらの点数が将来も変更されない可能性が大
きい場合であれば、入力点数が1つ上のクラスの前記
(8,4)のプログラマブルコントローラを選択して設
置しておけば、コストの増加をできるだけ抑えることが
できるけれども、その入力点数を超えて多数の点数を必
要とする事態が生じた場合には、出力点数が余っている
ときであっても、すでに使用しているプログラマブルコ
ントローラの代りに、入力点数がもっと多い新たなプロ
グラマブルコントローラを設置し直さなければならな
い。このような事態は、実務上、プログラマブルコント
ローラの運転を開始して間もなく、または1,2年後に
おいて、しばしば生じることである。
Particularly according to the present invention, a unit for input or output cannot be added as needed,
In a so-called stationary system, it is advantageous compared to the building block type described above. For example, in a conventional programmable controller, there are types in which (the number of input points and the number of output points) are (6, 4), (8, 4), (10, 6) and (12, 8), and these ( The number of input points and the number of output points are fixed in each programmable controller. In the prior art, among such programmable controllers, in a system which has already used (input points, output points) = (6,4), if the modification requires 7 input points, the output is Even if you use only 2 points,
The programmable controller of (6, 4) cannot be continuously used as it is, and the programmable controller of (8, 4) must be newly replaced, resulting in a large cost increase. In the prior art, for example,
If the number of input points and the number of output points are known from the beginning of the system installation and there is a high possibility that these points will not be changed in the future, the programmable controller of the above (8, 4) of the class with one input point higher. If you select and install it, you can suppress the increase in cost as much as possible, but if there is a situation that requires a large number of points beyond the input points, when there are extra output points, Even so, a new programmable controller with more input points must be installed instead of the programmable controller already used. In practice, this often happens shortly after the start of operation of the programmable controller, or a year or two after.

【0048】本発明によれば、複数の各接続端子は、入
力のためにも、および出力のためにも、用いることがで
きるので、システムとして用いられているたとえばプロ
グラマブルコントローラ自体を交換しなければならない
必要性をできるだけなくすことができる。
According to the invention, each of the plurality of connection terminals can be used both for input and for output, so that, for example, the programmable controller itself used as the system must be replaced. You can eliminate the need to avoid as much as possible.

【0049】本発明によれば、各接続端子毎に入力用ホ
トカプラとスイッチング手段とをそれぞれ関連して接続
しなければならないけれども、そのような入力用ホトカ
プラおよびスイッチング手段は一般的に、構成が簡単で
あって商業的に容易にかつ安価に入手可能であり、した
がって事実上、コストアップを招くことはほとんどな
い。
According to the present invention, the input photocoupler and the switching means must be connected in association with each connection terminal, but such an input photocoupler and switching means generally have a simple structure. However, it is easily and cheaply commercially available, and therefore practically causes little cost increase.

【0050】さらに本発明によれば、各接続端子を、予
め準備した設定器またはマイクロコンピュータなどのソ
フトウェアなどによって入力用または出力用として予め
設定する構成ではなく、したがって使い勝手が良好であ
るという効果もある。このことは特に接続端子の数が多
いときには、設定の手間が省かれ、したがって本発明の
重要な効果の1つである。
Furthermore, according to the present invention, each connection terminal is not configured to be preset for input or output by a presetter or software such as a microcomputer, which is advantageous in terms of usability. is there. This saves the setting work, especially when the number of connection terminals is large, and is therefore one of the important effects of the present invention.

【0051】しかも好都合なことに、システムの運転中
においていつでも接続端子に入力機器または出力機器を
着脱交換して接続し直すことができる。
Moreover, it is advantageous that the input device or the output device can be detached and replaced and reconnected to the connection terminal at any time during the operation of the system.

【0052】本発明によれば、入力用ホトカプラ、スイ
ッチング手段、接続ラインおよび電源などの接続状態を
自己診断することができるという優れた効果もまた、達
成される。スイッチング手段のスイッチング素子を導通
することによって、電源を介して入力用ホトカプラの入
力用発光素子に電流を流す閉ループを形成することがで
きる。このような自己診断機能は、各接続端子に入力機
器または出力機器のいずれか一方または両者が接続され
ている状態において、可能である。先行技術では前述の
図11に関連して述べたように、自己診断機能を達成す
るために接続端子と外部機器との間に配線作業を行わな
ければならないという不都合があり、したがってコスト
アップとなるので、事実上実施されていないことが多い
けれども、本発明では、先行技術の上述の問題が、わず
かなコストアップで、実現されるので、信頼性の高いシ
ステムづくりが容易に可能である。
According to the present invention, the excellent effect that the connection state of the input photocoupler, the switching means, the connection line and the power supply can be self-diagnosed is also achieved. By making the switching element of the switching means conductive, it is possible to form a closed loop that causes a current to flow to the input light emitting element of the input photocoupler via the power supply. Such a self-diagnosis function is possible in a state where either one or both of the input device and the output device are connected to each connection terminal. As described with reference to FIG. 11 described above, the prior art has a disadvantage that wiring work must be performed between the connection terminal and the external device in order to achieve the self-diagnosis function, which results in an increase in cost. Therefore, in many cases, the above-mentioned problems of the prior art are realized with a slight increase in cost, but it is possible to easily make a highly reliable system.

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

【図1】本発明の実施の一形態の一部を構成する入出力
ユニットU0を示す電気回路図である。
FIG. 1 is an electric circuit diagram showing an input / output unit U0 which constitutes a part of an embodiment of the present invention.

【図2】本発明の実施の一形態のシステムの全体の構成
を示すブロック図である。
FIG. 2 is a block diagram showing an overall configuration of a system according to an embodiment of the present invention.

【図3】入出力ユニットU0に入力機器S10および出
力機器L11が接続された状態を示す一部の電気回路図
である。
FIG. 3 is a partial electric circuit diagram showing a state in which an input device S10 and an output device L11 are connected to the input / output unit U0.

【図4】図1〜図3に示される本発明の実施の形態の動
作を簡略化して示す図である。
FIG. 4 is a diagram showing a simplified operation of the embodiment of the present invention shown in FIGS.

【図5】前述の図4における期間W1,W2の具体的な
動作を説明するための波形図である。
5 is a waveform diagram for explaining a specific operation in periods W1 and W2 in FIG. 4 described above.

【図6】メモリ18のストア状態を示すメモリマップ図
である。
FIG. 6 is a memory map diagram showing a stored state of the memory 18.

【図7】処理回路17の動作を説明するためのフローチ
ャートである。
FIG. 7 is a flowchart for explaining the operation of the processing circuit 17.

【図8】本発明の実施の他の形態の一部の電気回路図で
ある。
FIG. 8 is a partial electric circuit diagram of another embodiment of the present invention.

【図9】出力用ホトカプラPH20〜PH27の代わり
に用いられるリレー37の電気回路図である。
FIG. 9 is an electric circuit diagram of a relay 37 used in place of the output photocouplers PH20 to PH27.

【図10】先行技術の簡略化した電気回路図である。FIG. 10 is a simplified electrical circuit diagram of the prior art.

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

16 データバス 17 処理回路 18 メモリ 19 表示出力手段 21 ゲート手段 22 直流電源 24 ラッチ手段 25 アドレス設定器 28 入力機器用共通接続点 29 電源 31 出力機器の共通接続点 36 制御回路 37 リレー 38 リレースイッチ 39 リレーコイル U0〜U15 入出力ユニット L11〜L157 出力機器 S10〜S150 入力機器 T0〜T7 接続端子 TC1 第1共通端子 TC2 第2共通端子 CPL0〜CPL7 結合回路 PH10〜PH17 入力用ホトカプラ PH20〜PH27 出力用ホトカプラ D10〜D17 発光素子 P10〜P17 受光素子 P20〜P27 出力用受光素子 16 Data Bus 17 Processing Circuit 18 Memory 19 Display Output Means 21 Gate Means 22 DC Power Supply 24 Latch Means 25 Address Setter 28 Common Connection Point for Input Equipment 29 Power Supply 31 Common Connection Point for Output Equipment 36 Control Circuit 37 Relay 38 Relay Switch 39 Relay coil U0 to U15 Input / output unit L11 to L157 Output device S10 to S150 Input device T0 to T7 Connection terminal TC1 1st common terminal TC2 2nd common terminal CPL0 to CPL7 Coupling circuit PH10 to PH17 Input photocoupler PH20 to PH27 Output photocoupler D10 to D17 Light emitting element P10 to P17 Light receiving element P20 to P27 Output light receiving element

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 (a)外部の回路に接続される複数の接
続端子と、 (b)第1共通端子と、 (c)第2共通端子と、 (d)接続端子に個別的に対応して設けられる複数の入
力用ホトカプラであって、 各入力用ホトカプラは、 入力用発光素子と、 その入力用発光素子からの光を受光する入力用受光素子
とを有し、 各入力用発光素子の一端部は、その入力用発光素子が備
えられるホトカプラに対応する各接続端子に接続され、 各入力用発光素子の他端部は、第1共通端子に接続され
る、そのような入力用ホトカプラと、 (e)接続端子に個別的に対応して設けられる複数のス
イッチング手段であって、 各スイッチング手段は、 スイッチング素子と、 そのスイッチング素子をスイッチング動作させる作動素
子とを有し、 各スイッチング素子の一端部は、そのスイッチング素子
が備えられるスイッチング手段に対応する各接続端子に
接続され、 各スイッチング素子の他端部は、第2共通端子に接続さ
れる、そのようなスイッチング手段と、 (f)作動素子の動作を制御する動作と、受光素子の出
力を読出す読出し動作とを行う制御手段とを含むことを
特徴とする入力または出力のための装置。
1. A plurality of connection terminals connected to an external circuit, (b) a first common terminal, (c) a second common terminal, and (d) connection terminals individually corresponding to each other. A plurality of input photocouplers, each input photocoupler having an input light emitting element and an input light receiving element for receiving light from the input light emitting element. One end is connected to each connection terminal corresponding to the photocoupler provided with the input light emitting element, and the other end is connected to the first common terminal. (E) A plurality of switching means provided individually corresponding to the connection terminals, each switching means having a switching element and an actuating element for switching the switching element. Such a switching means, one end of which is connected to each connection terminal corresponding to the switching means provided with the switching element, and the other end of which is connected to the second common terminal; An apparatus for input or output, comprising a control means for controlling the operation of the actuating element and a read operation for reading the output of the light receiving element.
【請求項2】 スイッチング手段は、 スイッチング素子である出力用受光素子と、 その出力用受光素子に光を与えて出力用受光素子をスイ
ッチング動作させ、各接続端子から見た電流が流れる方
向は入力用発光素子とは逆方向性に結合される作動素子
である出力用発光素子とを有する出力用ホトカプラであ
ることを特徴とする請求項1記載の入力または出力のた
めの装置。
2. The switching means comprises an output light receiving element, which is a switching element, and light is applied to the output light receiving element to cause the output light receiving element to perform a switching operation. 2. A device for input or output as claimed in claim 1, characterized in that it is an output photocoupler having an output light-emitting element which is an actuating element which is reversely coupled to the output light-emitting element.
【請求項3】 データバスが設けられ、 制御手段は、 書込み動作の期間W20にデータバスを介して与えられ
る制御データによって作動素子はスイッチング素子を閉
じ、または開き、 その書込み動作の期間W20に後続する読出し動作の期
間W21中、そのスイッチング素子の閉じた状態または
開いた状態を保ち、 前記読出し動作の期間W21に、入力用受光素子からの
検出データをデータバスに読出し、 これによって、制御データと検出データとを比較して各
接続端子毎の接続状態の検出を行うことを特徴とする請
求項1記載の入力または出力のための装置。
3. A data bus is provided, and the control means is: the actuating element closes or opens the switching element in accordance with control data provided via the data bus during the write operation period W20, and follows the write operation period W20. During the read operation period W21, the switching element is maintained in the closed state or the open state, and the detection data from the input light receiving element is read to the data bus during the read operation period W21. The device for input or output according to claim 1, wherein the connection state is detected for each connection terminal by comparing with the detection data.
【請求項4】 (a)外部の回路に接続される複数の接
続端子と、 (b)第1共通端子と、 (c)第2共通端子と、 (d)接続端子に個別的に対応して設けられる複数の入
力用ホトカプラであって、 各入力用ホトカプラは、 入力用発光素子と、 その入力用発光素子からの光を受光する入力用受光素子
とを有し、 各入力用発光素子の一端部は、その入力用発光素子が備
えられるホトカプラに対応する各接続端子に接続され、 各入力用発光素子の他端部は、第1共通端子に接続され
る、そのような入力用ホトカプラと、 (e)接続端子に個別的に対応して設けられる複数の出
力用ホトカプラであって、 各出力用ホトカプラは、 各接続端子から見た電流が流れる方向は入力用発光素子
とは逆方向性に結合される出力用受光素子と、 その出力用受光素子に光を与えて出力用受光素子をスイ
ッチング動作させる出力用発光素子とを有し、 各出力用受光素子の一端部は、出力かその出力用受光素
子が備えられる出力用ホトカプラに対応する各接続端子
に接続され、 各出力用受光素子の他端部は、第2共通端子に接続され
る、そのような出力用ホトカプラと、 (f)データバスと、 (g)読出しパルスに応答し、入力用受光素子から与え
られる検出データをデータバスに導出するゲート手段
と、 (h)書込みパルスに応答し、その書込みパルスの受信
中に、出力用受光素子をスイッチング動作するためのデ
ータバスが与えられている制御データを、ストアして、
その書込みパルスが与えられなくなった後も、そのスト
ア状態を保ち、ストアされた制御データを出力用発光ダ
イオードに与えるラッチ手段と、 (i)データバスに接続される処理手段であって、 データバスに制御データを与えている書込み期間W20
内で、書込みパルスをラッチ手段に与えて出力用発光素
子による出力用受光素子のスイッチング動作を行い、 書込み期間W20後の読出し期間W21で、ゲート手段
に読出しパルスを与えてデータバスからの検出データを
読出す読出し動作を行い、 書込み期間W20と読出し期間W21とを繰返し、 制御データと検出データとを各接続端子毎に比較して接
続状態の検出を行う処理手段とを含むことを特徴とする
入力または出力のための装置。
4. (a) a plurality of connection terminals connected to an external circuit; (b) a first common terminal; (c) a second common terminal; and (d) a connection terminal. A plurality of input photocouplers, each input photocoupler having an input light emitting element and an input light receiving element for receiving light from the input light emitting element. One end is connected to each connection terminal corresponding to the photocoupler provided with the input light emitting element, and the other end is connected to the first common terminal. , (E) A plurality of output photocouplers provided individually corresponding to the connection terminals, wherein each output photocoupler has a direction opposite to that of the input light emitting element in the direction of current flow seen from each connection terminal. Output light receiving element coupled to the It has an output light emitting element that applies light to the light receiving element to switch the output light receiving element, and one end of each output light receiving element corresponds to an output or an output photocoupler provided with the output light receiving element. Responsive to such an output photocoupler connected to each connection terminal and each output light-receiving element to the second common terminal, (f) a data bus, and (g) a read pulse. , A gate means for deriving the detection data given from the input light receiving element to the data bus, and (h) a data bus for responding to the write pulse and for switching the output light receiving element while receiving the write pulse. Store the given control data,
Latch means for maintaining the stored state even after the write pulse is not given and for giving the stored control data to the output light emitting diode; and (i) a processing means connected to the data bus, Write period W20 in which control data is given to
Inside, the write pulse is given to the latch means to perform the switching operation of the output light receiving element by the output light emitting element, and the read pulse is given to the gate means in the read period W21 after the write period W20 to detect the data from the data bus. A read operation for reading, a write period W20 and a read period W21 are repeated, and control means and detection data are compared for each connection terminal to detect a connection state. A device for input or output.
JP14261696A 1996-06-05 1996-06-05 Device for input or output Pending JPH09326683A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14261696A JPH09326683A (en) 1996-06-05 1996-06-05 Device for input or output

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14261696A JPH09326683A (en) 1996-06-05 1996-06-05 Device for input or output

Publications (1)

Publication Number Publication Date
JPH09326683A true JPH09326683A (en) 1997-12-16

Family

ID=15319481

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14261696A Pending JPH09326683A (en) 1996-06-05 1996-06-05 Device for input or output

Country Status (1)

Country Link
JP (1) JPH09326683A (en)

Similar Documents

Publication Publication Date Title
US4593349A (en) Power sequencer
US4829596A (en) Programmable controller with fiber optic input/output module
CA1235519A (en) Local power switching control subsystem
EP0178642B1 (en) Power control network for multiple digital modules
US4251883A (en) Fault detection apparatus for a programmable controller
JPS60122407A (en) Programmable controller
US5832194A (en) Electronic apparatus, process for its duplication, and arrangement for data transfer between two similarly constructed electronic apparatus
EP0048848B1 (en) Device controlled by programmed modular controller means with selfchecking
JPH09326683A (en) Device for input or output
JP3838037B2 (en) Communication slave station and control device
JP2782601B2 (en) Power control fault isolation indicator
JP3471914B2 (en) System switching device for optical cable power supply system
US4423322A (en) Self diagnostic switch circuit
KR200157438Y1 (en) Controller using microsoft
JP3358089B2 (en) Photoelectric switch
KR930003034B1 (en) Distinguishing device of remote controller
KR200359921Y1 (en) Slave device
JPH11136848A (en) Overcurrent protection circuit and communication device
KR950001258Y1 (en) Parallel interface power detecting circuit
JP2769258B2 (en) Communication error detection device for programmable controller
JP3076157B2 (en) Plug-in power supply
JPH04177530A (en) Managing method for electronic apparatus
JPH0830304A (en) Controller provided with switching circuit
JP2001093028A (en) Automatic vending machine controller
JPH0414374B2 (en)