Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0312340B2 - - Google Patents
[go: Go Back, main page]

JPH0312340B2 - - Google Patents

Info

Publication number
JPH0312340B2
JPH0312340B2 JP2242982A JP2242982A JPH0312340B2 JP H0312340 B2 JPH0312340 B2 JP H0312340B2 JP 2242982 A JP2242982 A JP 2242982A JP 2242982 A JP2242982 A JP 2242982A JP H0312340 B2 JPH0312340 B2 JP H0312340B2
Authority
JP
Japan
Prior art keywords
input
output
signal
shift register
circuit
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
JP2242982A
Other languages
Japanese (ja)
Other versions
JPS58140841A (en
Inventor
Masaji Miura
Takao Oota
Seitaro Iwahashi
Kyoto Hirase
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp filed Critical Omron Corp
Priority to JP2242982A priority Critical patent/JPS58140841A/en
Publication of JPS58140841A publication Critical patent/JPS58140841A/en
Publication of JPH0312340B2 publication Critical patent/JPH0312340B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4208Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being a system bus, e.g. VME bus, Futurebus, Multibus
    • G06F13/4217Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being a system bus, e.g. VME bus, Futurebus, Multibus with synchronous protocol

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Programmable Controllers (AREA)
  • Small-Scale Networks (AREA)
  • Information Transfer Systems (AREA)
  • Control By Computers (AREA)

Description

【発明の詳細な説明】 この発明はプログラマブル・コントローラの入
出力装置に関し、特に、コントローラ本体との間
で直列データ伝送により入出力データを交換でき
るようにした入出力装置に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an input/output device for a programmable controller, and more particularly to an input/output device that can exchange input/output data with a controller main body by serial data transmission.

最近では、一般の機械プラント等の制御システ
ムにおいて、プログラマブル・コントローラを用
いた比較的大規模な集中制御システムがよく見ら
れる。このような集中制御システムにおいては、
多くの場合、例えばリミツトスイツチ、温度スイ
ツチ、近接スイツチ、光電スイツチ等の各種入力
機器やモータ、プランジヤ、電磁弁等の各種出力
機器がそれぞれ別個の信号線で中央の制御装置に
接続されている。この場合、これらの入出力機器
の数が多くて、しかも各入出力機器が比較的広い
空間に分散しているシステムでは、各入出力機器
と中央制御装置を結ぶ配線スペースや配線コスト
が大きく問題となつており、この間の信号伝送を
適宜な多重伝送を応用して簡便化したいとの要望
が強い。
Recently, relatively large-scale centralized control systems using programmable controllers are often seen in control systems for general mechanical plants and the like. In such a centralized control system,
In many cases, various input devices, such as limit switches, temperature switches, proximity switches, photoelectric switches, etc., and various output devices, such as motors, plungers, solenoid valves, etc., are each connected to a central control device by separate signal lines. In this case, in systems where there are a large number of these input/output devices and each input/output device is dispersed over a relatively wide space, the wiring space and wiring cost that connect each input/output device and the central control unit become a major problem. Therefore, there is a strong desire to simplify signal transmission during this time by applying appropriate multiplex transmission.

従来から各種の多重伝送システムが知られてお
り、これをプログラマブル・コントローラにおけ
る入出力データの伝送に利用したものもある。し
かし、従来の多重伝送システムは、各端末に固有
のアドレスを割り当て、各端末にはそのアドレス
を判断する回路を有し、このアドレス判別回路を
含む伝送制御手順が非常に複雑かつ高度であり、
従つて高価な装置となつている。勿論、そのよう
な高度な回路方式とする意義はある訳であるが、
プログラマブル・コントローラにおける入出力デ
ータ伝送システムに不必要な機能が多く、そのた
め上述の要望に適切に応え得るものではなかつ
た。
Various multiplex transmission systems have been known in the past, and some have been used to transmit input/output data in programmable controllers. However, in the conventional multiplex transmission system, a unique address is assigned to each terminal, and each terminal has a circuit for determining the address, and the transmission control procedure including this address determination circuit is extremely complicated and sophisticated.
Therefore, it is an expensive device. Of course, there is some significance in using such an advanced circuit system, but
The input/output data transmission system in the programmable controller has many unnecessary functions, and therefore cannot adequately meet the above-mentioned demands.

この発明は上述した従来の問題点に鑑みなされ
たものであり、その目的は、入出力装置をコント
ローラ本体と別体に構成し、この入出力装置を必
要数だけコントローラ本体に対して直列データ線
とクロツク信号線の2系統の信号線で接続するだ
けで、入出力装置側にはアドレス判別回路が不要
で、しかも面倒な伝送制御手順を介することなく
コントローラ本体から入出力装置への出力データ
の転送および入出力装置からコントローラ本体へ
の入力データの伝送を行なえるようにしたプログ
ラマブル・コントローラの入出力装置を提供する
ことにある。
This invention was made in view of the above-mentioned conventional problems, and its purpose is to configure an input/output device separately from the controller main body, and to connect the required number of input/output devices to the controller main body through serial data lines. By simply connecting with two signal lines, the and clock signal line, there is no need for an address discrimination circuit on the input/output device side, and the output data from the controller main body to the input/output device can be transferred without going through troublesome transmission control procedures. An object of the present invention is to provide an input/output device for a programmable controller that can transfer and transmit input data from the input/output device to the controller main body.

以下、この発明の実施例を図面に基づいて詳細
に説明する。
Hereinafter, embodiments of the present invention will be described in detail based on the drawings.

第1図はこの発明を適用したプログラマブル・
コントローラ・システムの全体の概略構成を示す
ブロツク図である。このプログラマブル・コント
ローラは、コントローラ本体1と複数台の入出力
装置2,2,……とに分割構成されている。この
実施例における複数台の入出力装置2,2,……
は全く同一構成である。各入出力装置2には、リ
ミツトスイツチ等の各種入力機器が接続される4
つの入力端子と、モータやプランジヤ等の各種出
力機器が接続される4つの処理端子を備えず。各
入力端子に印加される信号を外部入力信号と称
し、この信号にIN1〜IN4,IN5〜IN8,IN
9〜IN12という各別の番号を付ける。同様に
入出力装置2の出力端子から出力される信号を外
部出力信号と称し、この信号にOUT1〜OUT
4,OUT5〜OUT8,OUT9〜OUT12とい
う各別の識別番号を付ける。
Figure 1 shows a programmable system to which this invention is applied.
1 is a block diagram showing the overall schematic configuration of a controller system. FIG. This programmable controller is divided into a controller body 1 and a plurality of input/output devices 2, 2, . . . . In this embodiment, a plurality of input/output devices 2, 2,...
have exactly the same configuration. Each input/output device 2 is connected to various input devices such as limit switches 4
It does not have one input terminal and four processing terminals to which various output devices such as motors and plungers are connected. The signals applied to each input terminal are called external input signals, and these signals are applied to IN1 to IN4, IN5 to IN8, IN
Assign a different number from 9 to IN12. Similarly, the signal output from the output terminal of the input/output device 2 is called an external output signal, and this signal is
4. Assign separate identification numbers to OUT5 to OUT8 and OUT9 to OUT12.

コントローラ本体1は、全体の制御の中枢とな
るCPT3(中央処理ユニツト)と、CPU3によ
つて実行されるシステムプログラムを格納したシ
ステムプログラムメモリ4と、CPU3によつて
各種可変データの一時格納エリアと使われるシス
テムデータメモリ5と、使用者が任意に設定した
シーケンス制御プログラムが格納されるユーザプ
ログラムメモリ6と、上記入出力装置2における
外部入出力信号と対応した入出力データのバツフ
アメモリとなる入出力メモリ7と、コントローラ
本体1から入出力装置2に出力データを与えると
ともに、入出力装置2からの入力データをコント
ローラ本体1に取込むためのインターフエイスと
なる入出力ポート8を備えている。
The controller main body 1 includes a CPT 3 (central processing unit) that serves as the center of overall control, a system program memory 4 that stores system programs executed by the CPU 3, and a temporary storage area for various variable data by the CPU 3. A system data memory 5 to be used, a user program memory 6 in which a sequence control program arbitrarily set by the user is stored, and an input/output memory serving as a buffer memory for input/output data corresponding to external input/output signals in the input/output device 2. It is provided with a memory 7 and an input/output port 8 serving as an interface for providing output data from the controller main body 1 to the input/output device 2 and for taking input data from the input/output device 2 into the controller main body 1.

周知のように、この種のプログラマブル・コン
トローラにおけるユーザプログラムの実行動作
は、基本的に、ユーザプログラムメモリ6からユ
ーザ命令を順次読出し、各ユーザ命令に従つて入
出力メモリ7に格納されている入出力データ間の
演算処理をし、かつその演算結果によつて入出力
メモリ7中の出力データを更新することであり、
またユーザプログラムの実行と同期して入出力装
置2からの入力データを入出力メモリ7の所定エ
リアに書込む入力更新動作と、入出力メモリ7の
所定エリアの出力データを入出力装置2に転送す
る出力更新動作が行なわれ、これにより入出力装
置2に与えられる入力データと入出力装置2から
出力する出力データとの関係において、ユーザプ
ログラムにて指定されたシーケンス状態が作り出
される訳である。この発明に係る入出力データの
伝送は、上記入力更新動作および出力更新動作を
行なうために、コントローラ本体1と入出力装置
2との間で行なわれる入出力データの伝送であ
る。
As is well known, the execution operation of a user program in this type of programmable controller basically involves sequentially reading out user instructions from the user program memory 6, and executing the input/output memory 7 stored in the input/output memory 7 according to each user instruction. It is to perform arithmetic processing between output data and update the output data in the input/output memory 7 according to the result of the calculation,
In addition, an input update operation that writes input data from the input/output device 2 to a predetermined area of the input/output memory 7 in synchronization with the execution of the user program, and transfers output data of the predetermined area of the input/output memory 7 to the input/output device 2 An output update operation is performed, and as a result, a sequence state specified by the user program is created in the relationship between the input data applied to the input/output device 2 and the output data outputted from the input/output device 2. The input/output data transmission according to the present invention is the input/output data transmission performed between the controller main body 1 and the input/output device 2 in order to perform the above-mentioned input update operation and output update operation.

コントローラ本体1はデータ伝送のための端子
として、直列データ入出力端子SDTとクロツク
信号出力端子CKTとを備えている。直列データ
入出力端子SDTに印加される信号はレシーバ9
を介して入力ポートP1に印加される。出力ポー
トP2からの信号はドライバ10を介して直列デ
ータ入出力端子SDTに出力される。このドライ
バ10は出力ポートP3からの信号によつて禁止
される。クロツク信号出力端子CKTには出力ポ
ートP4から出力されるクロツク信号がドライバ
11を介して出力される。
The controller body 1 includes a serial data input/output terminal SDT and a clock signal output terminal CKT as terminals for data transmission. The signal applied to the serial data input/output terminal SDT is the receiver 9
is applied to input port P1 via. The signal from the output port P2 is outputted to the serial data input/output terminal SDT via the driver 10. This driver 10 is inhibited by a signal from output port P3. A clock signal outputted from output port P4 is outputted via driver 11 to clock signal output terminal CKT.

入出力装置2はデータ伝送を行なうための端子
として、左直列データ入出力端子SDLと右直列
データ入出力端子SDR,クロツク信号入力端子
CKLを有している。3台の入出力装置2は、互
いの右直列データ入出力装置SDRと左直列デー
タ入出力端子SDLが直列データ線12で接続さ
れ、互いのクロツク信号入力端子CKLがクロツ
ク信号線13で接続され、この両伝送線12,1
3によつて3台が直列的に接続されている。また
左端の入出力装置2の左直列データ入出力端子
SDLはコントローラ本体1の直列データ入出力
端子SDTと直列データ線12でもつて接続され、
またそのクロツク信号入力端子CKLはコントロ
ーラ本体1のクロツク信号出力端子CKTとクロ
ツク信号線13でもつて接続されている。すなわ
ち、3台の入出力装置2はコントローラ本体1と
直列データ線12を介して直列に接続されてお
り、クロツク信号線13には並列に接続されてい
る。また、右端の入出力装置2の右直列データ入
出力端子SDRは開放され、この開放されている
右直列データ入出力端子SDRに更に直列に他の
入出力装置2を接続することができる。
The input/output device 2 has a left serial data input/output terminal SDL, a right serial data input/output terminal SDR, and a clock signal input terminal as terminals for data transmission.
Has CKL. In the three input/output devices 2, each other's right serial data input/output device SDR and left serial data input/output terminal SDL are connected by a serial data line 12, and each other's clock signal input terminal CKL is connected by a clock signal line 13. , these two transmission lines 12,1
3, the three units are connected in series. Also, the left serial data input/output terminal of the leftmost input/output device 2
SDL is also connected to the serial data input/output terminal SDT of the controller main body 1 by a serial data line 12,
The clock signal input terminal CKL is also connected to the clock signal output terminal CKT of the controller body 1 via a clock signal line 13. That is, the three input/output devices 2 are connected in series to the controller body 1 via the serial data line 12, and are connected in parallel to the clock signal line 13. Further, the right serial data input/output terminal SDR of the rightmost input/output device 2 is opened, and another input/output device 2 can be further connected in series to this open right serial data input/output terminal SDR.

第2図は1台の入出力装置2の詳細な回路図を
示している。同図に示すように、この入出力装置
2は、4ビツトの一方向シフトレジスタ14と、
このシフトレジスタ14の並列出力端Q1〜Q4
に接続されたラツチ回路15と、このラツチ回路
15の出力を外部出力信号OUT1〜OUT4とし
て並列に出力するドライバ16と、外部入力信号
IN1〜IN4を並列に受けて上記シフトレジスタ
14の並列入力端D1〜D4に印加するレシーバ
17と、左直列データ入出力端子SDLに印加さ
れる信号を受けるレシーバ19と、左直列データ
入出力端子SDLに信号を送出するゲート付きド
ライバ20と、右直列データ入出力端子SDRに
印加される信号を受けるレシーバ21と、右直列
データ入出力端子SDRに信号を送出するゲート
付きドライバ22と、クロツク信号入力端子
CKLに印加される信号を受けるレシーバ23と、
上記シフトレジスタ14の直列入力端SIおよび直
列出力端Q4に対する左直列データ入出力端子
SDLと右直列データ入出力端子SDRの接続関係
を反転させる切換回路(上記ゲート付きドライバ
20,22および論理ゲートG1,G2,G3に
よつて構成される)と、クロツク信号入力端子
CKLに印加される信号のレベルが一定時間以上
固定されたのを検出し、上記ラツチ回路15のラ
ツチ信号、上記シフトレジスタ14の並列入力読
込み信号および切換回路の反転信号を作る制御回
路18とを備える。
FIG. 2 shows a detailed circuit diagram of one input/output device 2. As shown in FIG. As shown in the figure, this input/output device 2 includes a 4-bit unidirectional shift register 14,
Parallel output terminals Q1 to Q4 of this shift register 14
A latch circuit 15 connected to the latch circuit 15, a driver 16 that outputs the output of the latch circuit 15 in parallel as external output signals OUT1 to OUT4, and an external input signal
A receiver 17 receives signals IN1 to IN4 in parallel and applies them to the parallel input terminals D1 to D4 of the shift register 14, a receiver 19 receives a signal applied to the left serial data input/output terminal SDL, and a left serial data input/output terminal. A gated driver 20 that sends a signal to SDL, a receiver 21 that receives a signal applied to the right serial data input/output terminal SDR, a gated driver 22 that sends a signal to the right serial data input/output terminal SDR, and a clock signal. input terminal
a receiver 23 that receives a signal applied to CKL;
Left serial data input/output terminal for the serial input terminal SI and serial output terminal Q4 of the shift register 14
A switching circuit (consisting of the gated drivers 20, 22 and logic gates G1, G2, G3) that inverts the connection relationship between SDL and the right serial data input/output terminal SDR, and a clock signal input terminal
A control circuit 18 detects that the level of the signal applied to CKL is fixed for a certain period of time or more, and generates a latch signal for the latch circuit 15, a parallel input read signal for the shift register 14, and an inverted signal for the switching circuit. Be prepared.

クロツク信号入力端子CKLに印加される信号
はレシーバ23を介して受信され、シフトレジス
タ14のシフトクロツク信号CKとして入力され
るとともに、制御回路18に入力される。
The signal applied to the clock signal input terminal CKL is received via the receiver 23 and is input as the shift clock signal CK to the shift register 14 as well as to the control circuit 18.

制御回路18は、コントローラ本体1からクロ
ツク信号線13に出力されるクロツク信号の周期
をTOとすると、そのクロツク信号が休止されて
信号線13の信号レベルがHレベルまたはLレベ
ルに固定され、上記クロツク周期TOより充分大
きな一定時間T1以上連続したことを検出するも
のである。この検出は、EOR回路25とタイマ
回路26とフリツプフロツプ27とによつて行な
われる。フリツプフロツプ27は電源投入時にパ
ワーオンリセツト回路50によつて初期リセツト
される。フリツプフロツプ27の出力Qとレシー
バ23の出力信号a(クロツク線13の信号)と
がEOR回路25に入力され、その出力信号bが
タイマ回路26に入力され、その出力信号cによ
つてフリツプフロツプ27が反転制御されるよう
になつている。
In the control circuit 18, when the period of the clock signal outputted from the controller body 1 to the clock signal line 13 is TO, the clock signal is stopped and the signal level of the signal line 13 is fixed at H level or L level. This is to detect that a certain period of time T1 or more, which is sufficiently larger than the clock period TO, has continued. This detection is performed by an EOR circuit 25, a timer circuit 26, and a flip-flop 27. Flip-flop 27 is initially reset by power-on reset circuit 50 when power is turned on. The output Q of the flip-flop 27 and the output signal a of the receiver 23 (signal on the clock line 13) are input to the EOR circuit 25, the output signal b of which is input to the timer circuit 26, and the output signal c of the flip-flop 27 causes the flip-flop 27 to be activated. It is now controlled in reverse.

タイマ回路26はその入力信号bがLレベルに
なり、上述した一定時間T1だけ連続してLレベ
ルになつたとき出力信号cを出力し、フリツプフ
ロツプ27を反転させる。従つてこのタイマ回路
26は、フリツプフロツプ27がリセツトされて
Q=Hとなつているときは、クロツク信号線13
の信号aがT1時間以上Hレベルになつたのを検
出するように作用し、またフリツプフロツプ27
がリセツトされてQ=Lとなつた場合は、クロツ
ク信号線13の信号aが時間T1以上Lレベルに
固定されたのを検出するように作用する。
The timer circuit 26 outputs an output signal c when the input signal b goes to the L level and remains at the L level continuously for the above-mentioned fixed time T1, and the flip-flop 27 is inverted. Therefore, when the flip-flop 27 is reset and Q=H, the timer circuit 26 outputs the clock signal line 13.
The flip-flop 27 acts to detect when the signal a of
When Q is reset and Q=L, it acts to detect that the signal a on the clock signal line 13 has been fixed at the L level for a period of time T1 or more.

フリツプフロツプ27の出力は上記切換回路の
制御信号となる。つまり、フリツプフロツプ27
がリセツトされていて、Q=L,=Hの場合、
ドライバ20と論理ゲートG2が禁止されるとと
もに、ドライバ22と論理ゲートG1が能動とな
り、この状態にては、左直列データ入出力端子
SDLに印加される信号がシフトレジスタ14の
直列入力端SIに入力されるとともに、シフトレジ
スタ14の直列出力端Q4からの信号が右直列デ
ータ入出力端子SDRに導出される。反対にフリ
ツプフロツプ27がセツトされ、Q=H,=L
となつた場合、右直列データ入出力端子SDRに
印加される信号がシフトレジスタ14の直列入力
端SIに入力され、シフトレジスタ14の直列出力
端Q4からの信号が左直列データ入出力端子
SDLに導出される。
The output of the flip-flop 27 becomes a control signal for the switching circuit. In other words, flip-flop 27
has been reset and Q=L,=H,
The driver 20 and logic gate G2 are disabled, and the driver 22 and logic gate G1 are activated. In this state, the left serial data input/output terminal
The signal applied to SDL is input to the serial input terminal SI of the shift register 14, and the signal from the serial output terminal Q4 of the shift register 14 is led to the right serial data input/output terminal SDR. On the contrary, flip-flop 27 is set and Q=H,=L
In this case, the signal applied to the right serial data input/output terminal SDR is inputted to the serial input terminal SI of the shift register 14, and the signal from the serial output terminal Q4 of the shift register 14 is applied to the left serial data input/output terminal.
Derived to SDL.

また、フリツプフロツプ27のQ出力がHレベ
ルに立上つたが立上り検出用の微分回路28で検
出され、この微分回路28の出力パルスが上記ラ
ツチ回路15のラツチ信号Tとして印加される。
フリツプフロツプ27のQ出力は遅延回路29で
僅かに遅延され、その遅延出力は立上り検出用の
微分回路30に入力され、この微分回路30から
の出力パルスが上記シフトレジスタ14の並列入
力読込信号LSDとして印加される。
Further, when the Q output of the flip-flop 27 rises to the H level, it is detected by a differentiation circuit 28 for detecting a rising edge, and the output pulse of this differentiation circuit 28 is applied as a latch signal T to the latch circuit 15.
The Q output of the flip-flop 27 is slightly delayed by a delay circuit 29, and the delayed output is input to a differentiation circuit 30 for rising edge detection, and the output pulse from this differentiation circuit 30 is used as the parallel input read signal LSD of the shift register 14. applied.

更に、レシーバ23の出力信号aは立上りおよ
び立上り検出用の微分回路51に入力され、信号
aの変化点で微小パルスが作られる。この微分回
路51から出力されるパルスはタイマ回路52の
トリガ信号となる。このタイマ回路52は、コン
トローラ本体1の故障によつてクロツク信号線1
3の信号が長時間一定レベルに固定されたのを検
出するためのもので、上記タイマ回路26の設定
時間T1より充分長い一定時間T3以上信号aが
固定されたとき、このタイマ回路52から出力信
号が生じる。このタイマ回路52の出力信号は上
記パワーオンリセツト回路50の出力信号ととも
にオアゲート53に入力され、オアゲート53の
出力がフリツプフロツプ27のリセツト信号とな
るとともに、ラツチ回路15のリセツト信号とな
る。これら微分回路51、タイマ回路52によつ
てコントローラ本体1の異常を検出して制御回路
18およびラツチ回路15を初期状態に戻すリセ
ツト回路が構成されている。
Furthermore, the output signal a of the receiver 23 is input to a differentiation circuit 51 for rising and rising edge detection, and a minute pulse is generated at a change point of the signal a. The pulse output from the differentiating circuit 51 becomes a trigger signal for the timer circuit 52. This timer circuit 52 is disconnected from the clock signal line 1 due to a failure in the controller main body 1.
This is to detect that the signal 3 has been fixed at a constant level for a long time, and when the signal a has been fixed for a fixed time T3 or more, which is sufficiently longer than the set time T1 of the timer circuit 26, the timer circuit 52 outputs the signal a. A signal is generated. The output signal of this timer circuit 52 is inputted to an OR gate 53 together with the output signal of the power-on reset circuit 50, and the output of the OR gate 53 becomes a reset signal for the flip-flop 27 and a reset signal for the latch circuit 15. These differentiating circuit 51 and timer circuit 52 constitute a reset circuit that detects an abnormality in controller body 1 and returns control circuit 18 and latch circuit 15 to their initial states.

次にコントローラ本体1側の入出力データの伝
送動作について説明する。コントローラ本体1
は、入出力ポート8のポートP4からドライバ1
1を介してクロツク信号線13に所定数のクロツ
ク信号を送出して上記シフトレジスタ14をシフ
トすると同時に、これに同期してポートP2から
ドライバ10を介して直列データ線12に出力デ
ータを順次直列に出力することにより、これら出
力データを上記シフトレジスタ14にセツトし、
その後クロツク信号線13のレベルを一定時間T
1以上固定することにより上記シフトレジスタ1
4にセツトされた上記出力データを上記ラツチ回
路15にラツチさせるとともに、上記レシーバ1
7からの入力データを上記シフトレジスタ14に
読込ませ、また上記切換回路を反転させ、その後
クロツク信号線13に所定数のクロツク信号を送
出してシフトレジスタ14を再びシフトさせ、シ
フトレジスタ14にセツトされた入力データを直
列データ線12、レシーバ9を介して入出力ポー
ト8のポートP1から順次コントローラ本体1に
取込むように動作する。この動作はCPU3がシ
ステムプログラムメモリ4に格納された入出力デ
ータ転送ルーチンを実行することによつて行なわ
れる。
Next, the transmission operation of input/output data on the controller main body 1 side will be explained. Controller body 1
is from port P4 of input/output port 8 to driver 1
A predetermined number of clock signals are sent to the clock signal line 13 via the clock signal line 13 to shift the shift register 14, and at the same time, output data is sequentially serially transmitted from the port P2 to the serial data line 12 via the driver 10 in synchronization with this. These output data are set in the shift register 14 by outputting them to
After that, the level of the clock signal line 13 is maintained for a certain period of time T.
By fixing 1 or more, the above shift register 1
The output data set to 4 is latched in the latch circuit 15, and the receiver 1
7 is read into the shift register 14, the switching circuit is inverted, and then a predetermined number of clock signals are sent to the clock signal line 13 to shift the shift register 14 again, and the shift register 14 is set. The input data is sequentially input into the controller main body 1 from the port P1 of the input/output port 8 via the serial data line 12 and the receiver 9. This operation is performed by the CPU 3 executing an input/output data transfer routine stored in the system program memory 4.

第3図はその入出力データ伝送ルーチンの概要
を示すフローチヤートである。このフローチヤー
トに従つてデータ伝送動作を詳細に説明すると、
最初のステツプ301で出力ポートP4をLレベル
にする。次のステツプ302では1番最後の出力デ
ータOUT12のアドレスを設定する。次のステ
ツプ303では設定されたアドレスの出力データ
OUT12を出力ポートP2から出力する。なお、
このとき出力ポートP3からの信号によつてドラ
イバ10を働かすのは勿論である。
FIG. 3 is a flowchart showing an outline of the input/output data transmission routine. A detailed explanation of the data transmission operation according to this flowchart:
In the first step 301, the output port P4 is set to L level. In the next step 302, the address of the last output data OUT12 is set. In the next step 303, the output data of the set address is
Output OUT12 from output port P2. In addition,
At this time, it goes without saying that the driver 10 is activated by the signal from the output port P3.

次のステツプ304では出力ポートP4の信号を
Hレベルにする。次のステツプ305ではクロツク
信号の周期T0より多小短いT時間だけカウント
する。T時間経過後のステツプ306では出力ポー
トP4の信号をLレベルにする。次のステツプ
307では出力データOUT1までの伝送を終了した
か否かを判断する。伝送を終了していない場合は
ステツプ308に進み、出力データのアドレスを1
だけ減算し、出力データOUT11のアドレスを
設定する。そして、先のステツプ303に戻る。
In the next step 304, the signal at the output port P4 is set to H level. In the next step 305, time T, which is slightly shorter than the period T0 of the clock signal, is counted. At step 306 after T time has elapsed, the signal at output port P4 is set to L level. next step
In 307, it is determined whether transmission up to output data OUT1 has been completed. If the transmission has not been completed, proceed to step 308 and set the address of the output data to 1.
and set the address of output data OUT11. Then, the process returns to step 303.

以上のステツプ303→304→305→306→307→308
が出力データOUT12〜OUT1について繰り返
されることにより、各出力データがクロツク信号
に同期してコントローラ本体1から出力される。
Above steps 303→304→305→306→307→308
is repeated for the output data OUT12 to OUT1, so that each output data is output from the controller main body 1 in synchronization with the clock signal.

上述の出力データ伝送動作が終了するとステツ
プ307からステツプ309に進み、出力ポートP4の
信号をHレベルにする。次のステツプ310では上
記制御回路18を働かすのに必要なT1時間をカ
ウントする。これによつてクロツク信号線13の
信号レベルがT1時間以上Hレベルに固定される
こととなり、制御回路18が動作し、シフトレジ
スタ14にセツトされた出力データがラツチ回路
15にラツチされてドライバ16を介して出力さ
れるとともに、レシーバ17からの入力データが
シフトレジスタ14に読込まれ、また上記切換回
路の接続関係が反転される。
When the above-described output data transmission operation is completed, the process proceeds from step 307 to step 309, and the signal at output port P4 is set to H level. In the next step 310, the time T1 required to operate the control circuit 18 is counted. As a result, the signal level of the clock signal line 13 is fixed at the H level for more than T1 time, the control circuit 18 is operated, the output data set in the shift register 14 is latched in the latch circuit 15, and the driver 16 is latched. At the same time, the input data from the receiver 17 is read into the shift register 14, and the connection relationship of the switching circuit is reversed.

コントローラ本体1側では次のステツプ311で
1番目の入力データIN1のアドレスを設定する。
次のステツプ312では上記遅延回路29の遅延時
間T2だけ待機する。また出力ポートP3からの
信号によりドライバ10を禁止する。次のステツ
プ313では入力ポートP1に印加される入力デー
タを読込み、設定されたアドレスに格納する。次
のステツプ314では出力ポートP4の信号をLレ
ベルにする。次のステツプ315では上記時間Tを
カウントする。次のステツプ316では出力ポート
P4の信号をHレベルにる。次のステツプ317で
は入力データIN12までのデータ取込みが終了
したか否かを判断する。終了していない場合はス
テツプ318に進み、入力データのアドレスを歩進
し、2番目の入力信号IN2のアドレスを設定す
る。その後先のステツプ313に戻る。なお、第2
図に示すようにシフトレジスタ14の並列入力端
D1〜D4と入力端子IN1〜IN4の番号の対応
は逆になつている。
On the controller main body 1 side, in the next step 311, the address of the first input data IN1 is set.
In the next step 312, the process waits for the delay time T2 of the delay circuit 29. Further, the driver 10 is inhibited by a signal from the output port P3. In the next step 313, the input data applied to the input port P1 is read and stored at the set address. In the next step 314, the signal at the output port P4 is set to L level. In the next step 315, the above-mentioned time T is counted. In the next step 316, the signal at the output port P4 is set to H level. In the next step 317, it is determined whether data up to input data IN12 has been captured. If it has not been completed, the process advances to step 318, where the address of the input data is incremented and the address of the second input signal IN2 is set. Thereafter, the process returns to step 313. In addition, the second
As shown in the figure, the numbers of the parallel input terminals D1 to D4 of the shift register 14 and the input terminals IN1 to IN4 are reversed.

以上のステツプ313→314→315→316→317→318
が入力データIN1〜IN12分だけ繰り返される
ことにより、シフトレジスタ14にセツトされた
各入力信号が順番に入力ポートP1に取込まれ、
入出力メモリ7の所定エリアに順次書込まれる。
この入力データの取込み動作が終了すると、ステ
ツプ317からステツプ319に進み、出力ポートP4
の信号をHレベルにする。次のステツプ320で制
御回路18を動作させるのに必要な時間T1をカ
ウントする。これにより制御回路18および上記
切換回路は初期状態に復帰する。以上の動作をユ
ーザプログラムの実行行動と並行して行なうもの
である。
Above steps 313→314→315→316→317→318
is repeated for the input data IN1 to IN12, so that each input signal set in the shift register 14 is sequentially taken into the input port P1,
The data are sequentially written into predetermined areas of the input/output memory 7.
When this input data capture operation is completed, the process advances from step 317 to step 319, and the output port P4
signal to H level. In the next step 320, the time T1 required to operate the control circuit 18 is counted. This returns the control circuit 18 and the switching circuit to their initial states. The above operations are performed in parallel with the execution of the user program.

ところで、クロツク信号線13が断線したりあ
るいはコントローラ本体1のクロツク信号送出系
が故障して入出力装置のクロツク信号入力端子
CKLに印加される信号が長時間(前記時間T3
以上)一定レベルに固定されたままになると、そ
の異常が先に説明した微分回路51およびタイマ
回路52からなるリセツト回路によつて検出さ
れ、その検出信号によつてラツチ回路15がリセ
ツトされ、出力信号OUT1〜OUT4が全てLレ
ベルになるとともに、制御回路18のフリツプフ
ロツプ27がリセツトされて初期状態に戻され
る。
By the way, if the clock signal line 13 is disconnected or the clock signal transmission system of the controller body 1 is broken, the clock signal input terminal of the input/output device
The signal applied to CKL is for a long time (time T3
(above)) When the level remains fixed at a certain level, the abnormality is detected by the reset circuit consisting of the differential circuit 51 and the timer circuit 52 described earlier, and the latch circuit 15 is reset by the detection signal, and the output is output. When the signals OUT1 to OUT4 all go to L level, the flip-flop 27 of the control circuit 18 is reset and returned to its initial state.

以上詳細に説明したように、この発明に係るプ
ログラマブル・コントローラの入出力装置によれ
ば、コントローラ本体と必要数の入出力装置とを
直列データ線とクロツク信号線の2系統の信号線
で結ぶだけで、入力データの取込みおよび出力デ
ータの送出という双方向の信号伝送が行なえ、伝
送線の布設が非常に簡単でかつ安価となる。また
入出力装置には、アドレスを判定する回路を設け
る必要がなく、面倒な伝送制御手順を扱う制御回
路も必要なく、単にクロツク信号が休止されてク
ロツク信号線レベルが一定以上固定されたのを検
出するためのタイマ回路やフリツプフロツプ等か
らなる極く簡単な制御回路を設けるだけで良く、
入出力装置における伝送制御部分の構成は極めて
簡単となり、これを安価に製作することができ
る。特にこの発明の装置では、コントローラ本体
のクロツク信号送出系の故障やクロツク信号線の
断線等の異常が生じた場合に、外部出力信号を与
えるラツチ回路が初期状態にリセツトされるとと
もに制御回路が初期状態にリセツトされるので、
制御対象機器を混乱に陥れることがなく、安全で
あるとともに、異常の復旧もし易いものとなる。
As explained in detail above, according to the programmable controller input/output device according to the present invention, the controller main body and the required number of input/output devices are simply connected using two signal lines, a serial data line and a clock signal line. This allows bidirectional signal transmission of input data input and output data transmission, making the installation of transmission lines extremely simple and inexpensive. In addition, the input/output device does not need a circuit to judge addresses or a control circuit to handle complicated transmission control procedures; it simply detects when the clock signal is stopped and the clock signal line level is fixed above a certain level. All you need to do is provide a very simple control circuit consisting of a timer circuit, flip-flop, etc. for detection.
The configuration of the transmission control section in the input/output device is extremely simple and can be manufactured at low cost. In particular, in the device of the present invention, if an abnormality occurs such as a failure in the clock signal transmission system of the controller body or a break in the clock signal line, the latch circuit that provides the external output signal is reset to the initial state, and the control circuit is reset to the initial state. It will be reset to the state
The device to be controlled will not be thrown into confusion, and it will be safe and it will be easy to recover from an abnormality.

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

第1図はこの発明を適用したプログラマブル・
コントローラ・システムの概略構成を示すブロツ
ク図、第2図は入出力装置の具体的構成を示すブ
ロツク図、第3図はコントローラ本体側が実行す
る入出力データ伝送ルーチンの概要を示すフロー
チヤートである。 1……コントローラ本体、2……入出力装置、
12……直列データ線、13……クロツク信号
線、14……シフトレジスタ、15……ラツチ回
路、16……ドライバ、17……レシーバ、18
……制御回路、51……微分回路、52……タイ
マ回路、SDL……左直列データ入出力端子、
SDR……右直列データ入出力端子、CKL……ク
ロツク信号入力端子、SI……直列入力端、Q4…
…直列出力端、Q1〜Q4……並列データ出力
端、D1〜D4……並列データ入力端、LD……
並列データ読込信号。
Figure 1 shows a programmable system to which this invention is applied.
FIG. 2 is a block diagram showing the general structure of the controller system, FIG. 2 is a block diagram showing the specific structure of the input/output device, and FIG. 3 is a flowchart showing the outline of the input/output data transmission routine executed by the controller main body. 1... Controller main body, 2... Input/output device,
12...Serial data line, 13...Clock signal line, 14...Shift register, 15...Latch circuit, 16...Driver, 17...Receiver, 18
... Control circuit, 51 ... Differential circuit, 52 ... Timer circuit, SDL ... Left serial data input/output terminal,
SDR...Right serial data input/output terminal, CKL...Clock signal input terminal, SI...Series input terminal, Q4...
...Series output terminal, Q1-Q4...Parallel data output terminal, D1-D4...Parallel data input terminal, LD...
Parallel data read signal.

Claims (1)

【特許請求の範囲】[Claims] 1 2つの直列データ入力端子AおよびBと、ク
ロツク信号入力端子と、このクロツク信号入力端
子に印加されるクロツク信号によつてシフトされ
るシフトレジスタと、このシフトレジスタの並列
出力端に接続されたラツチ回路と、このラツチ回
路の出力を外部出力信号として並列に導出するド
ライバと、外部入力信号を並列に受けて上記シフ
トレジスタの並列入力端に印加するレシーバと、
上記入力端子Aに印加される信号を上記シフトレ
ジスタの直列入力とし該シフトレジスタの直列出
力を上記入出力端子Bに導出する状態か、あるい
は上記入出力端子Bに印加される信号を上記シフ
トレジスタの直列入力とし該シフトレジスタの直
列出力を上記入出力端子Aに導出する状態に切換
える切換回路と、上記クロツク信号入力端子に印
加される信号のレベルが一定時間T1以上固定さ
れたのを検出し、上記ラツチ回路のラツチ信号、
上記シフトレジスタの並列入力読込信号および上
記切換回路の反転信号を作る制御回路と、上記ク
ロツク信号入力端子に印加される信号のレベルが
上記時間T1より充分長い一定時間以上固定され
たのを検出し、上記ラツチ回路および上記制御回
路を初期状態に戻すリセツト回路とを備えるプロ
グラマブル・コントローラの入出力装置。
1. Two serial data input terminals A and B, a clock signal input terminal, a shift register shifted by the clock signal applied to this clock signal input terminal, and a parallel output terminal connected to the shift register. a latch circuit, a driver that derives the output of the latch circuit in parallel as an external output signal, and a receiver that receives an external input signal in parallel and applies it to the parallel input terminal of the shift register;
Either the signal applied to the input terminal A is a serial input to the shift register and the serial output of the shift register is output to the input/output terminal B, or the signal applied to the input/output terminal B is input to the shift register. a switching circuit that switches the serial input of the shift register to a state where the serial output of the shift register is output to the input/output terminal A, and detects that the level of the signal applied to the clock signal input terminal is fixed for a certain period of time T1 or more. , the latch signal of the above latch circuit,
A control circuit that generates a parallel input read signal of the shift register and an inverted signal of the switching circuit detects that the level of the signal applied to the clock signal input terminal is fixed for a certain period of time that is sufficiently longer than the time T1. , a reset circuit for returning the latch circuit and the control circuit to an initial state.
JP2242982A 1982-02-15 1982-02-15 Input/output device for programmable controller Granted JPS58140841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2242982A JPS58140841A (en) 1982-02-15 1982-02-15 Input/output device for programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2242982A JPS58140841A (en) 1982-02-15 1982-02-15 Input/output device for programmable controller

Publications (2)

Publication Number Publication Date
JPS58140841A JPS58140841A (en) 1983-08-20
JPH0312340B2 true JPH0312340B2 (en) 1991-02-20

Family

ID=12082443

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2242982A Granted JPS58140841A (en) 1982-02-15 1982-02-15 Input/output device for programmable controller

Country Status (1)

Country Link
JP (1) JPS58140841A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4630233A (en) * 1984-06-25 1986-12-16 Allen-Bradley Company, Inc. I/O scanner for an industrial control

Also Published As

Publication number Publication date
JPS58140841A (en) 1983-08-20

Similar Documents

Publication Publication Date Title
JPS6224802B2 (en)
US4843539A (en) Information transfer system for transferring binary information
KR910014953A (en) Redundant Serial Memory
US5754823A (en) Configurable I/O system using logic state arrays
US4570215A (en) Input/output device for programmable controller
JPH039498B2 (en)
JPH037985B2 (en)
JPH0312340B2 (en)
JPS58155405A (en) Input/output device of programmable controller
JPS58119026A (en) Input and output data transmission system of programmable controller
JPS58158703A (en) Input and output device of programmable controller
JP3909509B2 (en) Serial interface circuit
JPS58158702A (en) Input and output device of programmable controller
JPH03139094A (en) Communication equipment for vehicle
JPS622688Y2 (en)
JPS6222085A (en) Test circuit
JP2591173B2 (en) Vehicle communication device
SU1658157A1 (en) Device for computer network users diagnostics
SU1381506A1 (en) Microprogram controller
SU1444787A1 (en) Device for interfacing data transmission channel with trunk line
SU1275416A1 (en) Information input-output device
SU1100766A1 (en) Device for indicating failures in redundant systems
JPS62224848A (en) Logic circuit switching circuit
SU365733A1 (en) ALL-UNION} PATENT-];: cj ^! R- ^ cd 1
JP2897774B2 (en) Output select circuit