JPH037985B2 - - Google Patents
Info
- Publication number
- JPH037985B2 JPH037985B2 JP2147282A JP2147282A JPH037985B2 JP H037985 B2 JPH037985 B2 JP H037985B2 JP 2147282 A JP2147282 A JP 2147282A JP 2147282 A JP2147282 A JP 2147282A JP H037985 B2 JPH037985 B2 JP H037985B2
- Authority
- JP
- Japan
- Prior art keywords
- input
- output
- signal
- shift register
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4204—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
- G06F13/4208—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being a system bus, e.g. VME bus, Futurebus, Multibus
- G06F13/4217—Bus 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)
- Information Transfer Systems (AREA)
- Programmable Controllers (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 distributed 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 necessary number of input/output devices to the controller main body by 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 has two input terminals and four output 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 different identification numbers to each of them: OUT5 to OUT8, and OUT9 to OUT12.
コントローラ本体1は、全体の制御の中枢とな
るCPU3(中央処理ユニツト)と、CPU3によ
つて実行されるシステムプログラムを格納したシ
ステムプログラムメモリ4と、CPU3によつて
各種可変データの一時格納エリアと使われるシス
テムデータメモリ5と、使用者が任意に設定した
シーケンス制御プログラムが格納されるユーザプ
ログラムメモリ6と、上記入出力装置2における
外部入出力信号と対応した入出力データのバツフ
アメモリとなる入出力メモリ7と、コントローラ
本体1から入出力装置2に出力データを与えると
ともに、入出力装置2からの入力データをコント
ローラ本体1に取込むためのインターフエイスと
なる入出力ポート8を備えている。 The controller body 1 includes a CPU 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. The three input/output devices 2 have their right serial data input/output terminal SDR and left serial data input/output terminal SDL connected to each other by a serial data line 12, and each other's clock signal input terminal CKL to each other 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に出力されるクロツク信号の周期
をT0とすると、そのクロツク信号が休止されて
信号線13の信号レベルがHレベルまたはLレベ
ルに固定され、上記クロツク周期T0より充分大
きな一定時間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 T0, 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 the clock cycle continues for a certain period of time T1 or more, which is sufficiently larger than the clock cycle T0. 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 and inverts the flip-flop 27 when the input signal b goes to the L level and remains at the L level continuously for the above-mentioned fixed time T1. Therefore, when the flip-flop 27 is set 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 time T1 or longer.
フリツプフロツプ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出力は遅延回路2
9で僅かに遅延され、それ遅延出力は立上り検出
用の微分回路30に入力され、この微分回路30
からの出力パルスが上記シフトレジスタ14の並
列入力読込信号LDとして印加される。 Furthermore, the rise of the Q output of the flip-flop 27 to the H level is detected by a differentiation circuit 28 for rising edge detection, 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 flip-flop 27 is connected to delay circuit 2.
9, and the delayed output is input to a differentiating circuit 30 for detecting a rising edge, and this differentiating circuit 30
An output pulse from the shift register 14 is applied as a parallel input read signal LD to the shift register 14.
次にコントローラ本体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. The controller operates to sequentially input the input data 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 OUT12 at the set address is output from the output port P2.
Incidentally, 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の
アドレスを設定する。そして、先のステツプ30
3に戻る。 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 somewhat 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. In the next step 307, it is determined whether the transmission up to the output data OUT1 has been completed. If the transmission has not been completed, the process advances to step 308, where the address of the output data is subtracted by 1 and the address of the output data OUT11 is set. And then step 30
Return to 3.
以上のステツプ303→304→305→30
6→307→308が出力データOUT12〜
OUT1について繰り返されることにより、各出
力データがクロツク信号に同期してコントローラ
本体1から出力される。 Above steps 303→304→305→30
6 → 307 → 308 is output data OUT12~
By repeating the process for OUT1, each output data is outputted from the controller body 1 in synchronization with the clock signal.
上述の出力データ伝送動作が終了するとステツ
プ307からステツプ309に進み、出力ポート
P4の信号をHレベルにする。次のステツプ31
0では上記制御回路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. Next step 31
At 0, the T1 required to operate the control circuit 18 above is
Count time. 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 operates, and 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
のアドレスを設定する。その後先のステツプ31
3に戻る。なお、第2図に示すようにシフトレジ
スタ14の並列入力端D1〜D4と入力端子IN
1〜IN4の番号の対応は逆になつている。 On the controller main body 1 side, the next step 311
Set the address of the first input data IN1. In the next step 312, the process waits for the delay time T2 of the delay circuit 29. Also output port P3
The driver 10 is inhibited by a signal from. 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. Next step 316
Then, the signal at 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, increments the address of the input data, and outputs the second input signal IN2.
Set the address. Next step 31
Return to 3. In addition, as shown in FIG. 2, the parallel input terminals D1 to D4 of the shift register 14 and the input terminal IN
The correspondence of numbers 1 to IN4 is reversed.
以上のステツプ313→314→315→31
6→317→318が入力データIN1〜IN12
分だけ繰り返されることにより、シフトレジスタ
14にセツトされた各入力信号が順番に入力ポー
トP1に取込まれ、入出力メモリ7の所定エリア
に順次書込まれる。また入力データの取込み動作
が終了すると、ステツプ317からステツプ31
9に進み、出力ポートP4の信号をHレベルにす
る。次のステツプ320で制御回路18を動作さ
せるのに必要な時間T1をカウントする。これに
より制御回路18および上記切換回路は初期状態
に復帰する。以上の動作をユーザプログラムの実
行動作と並行して行なうものである。 Above steps 313→314→315→31
6 → 317 → 318 are input data IN1 to IN12
By repeating this process, each input signal set in the shift register 14 is sequentially taken in to the input port P1, and sequentially written into a predetermined area of the input/output memory 7. Further, when the input data import operation is completed, the process moves from step 317 to step 31.
Proceeding to step 9, the signal at the output port P4 is set 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.
以上詳細に説明したように、この発明に係るプ
ログラマブル・コントローラの入出力装置によれ
ば、コントローラ本体と必要数の入出力装置とを
直列データ線とクロツク信号線の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. It is only necessary to provide a very simple control circuit consisting of a timer circuit for detection, a flip-flop, etc., and the configuration of the transmission control section in the input/output device is extremely simple, and it can be manufactured at low cost. In particular, the present invention is inexpensive because it is constructed using a unidirectional shift register which is considerably cheaper than a bidirectional shift register.
第1図はこの発明を適用したプログラマブル・
コントローラ・システムの概略構成を示すブロツ
ク図、第2図は入出力装置の具体的構成を示すブ
ロツク図、第3図はコントローラ本体側が実行す
る入出力データ伝送ルーチンの概要を示すフロー
チヤートである。
1……コントローラ本体、2……入出力装置、
12……直列データ線、13……クロツク信号
線、14……シフトレジスタ、15……ラツチ回
路、16……ドライバ、17……レシーバ、18
……制御回路、SDL……左直列データ入出力端
子、SDR……右直列データ入出力端子、CKL…
…クロツク信号入力端子、SI……直列入力端、Q
4……直列出力端、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, SDL...Left serial data input/output terminal, SDR...Right serial data input/output terminal, CKL...
...Clock signal input terminal, SI...Series input terminal, Q
4...Series output terminal, Q1-Q4...Parallel data output terminal, D1-D4...Parallel data input terminal, LD...
...Parallel data read signal.
Claims (1)
号入力端子と、このクロツク信号入力端子に印加
されるクロツク信号によつて一方向にのみシフト
されるシフトレジスタと、このシフトレジスタの
並列出力端に接続されたラツチ回路と、このラツ
チ回路の出力を外部出力信号として並列に導出す
るドライバと、外部入力信号を並列に受けて上記
シフトレジスタの並列入力端に印加するレシーバ
と、上記シフトレジスタの直列入力端および直列
出力端に対する上記2つの直列データ入出力端子
の接続関係を反転させる切換回路と、上記クロツ
ク信号入力端子に印加される信号のレベルが一定
時間以上固定されたのを検出し、上記ラツチ回路
のラツチ信号、上記シフトレジスタの並列入力読
込信号および上記切換回路の反転信号を作る制御
回路とを備えたプログラマブル・コントローラの
入出力装置。1 Connected to two serial data input/output terminals, a clock signal input terminal, a shift register that is shifted in only one direction by the clock signal applied to this clock signal input terminal, and a parallel output terminal of this shift register. a latch circuit, a driver that derives the output of the latch circuit in parallel as an external output signal, a receiver that receives an external input signal in parallel and applies it to the parallel input end of the shift register, and a serial input of the shift register. a switching circuit that inverts the connection relationship of the two serial data input/output terminals with respect to the clock signal input terminal and the serial output terminal; An input/output device for a programmable controller, comprising a control circuit for producing a latch signal for the circuit, a parallel input read signal for the shift register, and an inversion signal for the switching circuit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2147282A JPS58139233A (en) | 1982-02-13 | 1982-02-13 | Input-output device of programmable controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2147282A JPS58139233A (en) | 1982-02-13 | 1982-02-13 | Input-output device of programmable controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS58139233A JPS58139233A (en) | 1983-08-18 |
| JPH037985B2 true JPH037985B2 (en) | 1991-02-04 |
Family
ID=12055912
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2147282A Granted JPS58139233A (en) | 1982-02-13 | 1982-02-13 | Input-output device of programmable controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS58139233A (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS60100207A (en) * | 1983-11-02 | 1985-06-04 | Mitsubishi Electric Corp | Plant control system |
| JPS61118802A (en) * | 1984-11-15 | 1986-06-06 | Fuji Electric Co Ltd | Process input and output device of sequence controller |
| CN102495555B (en) * | 2011-11-29 | 2014-04-09 | 台达电子企业管理(上海)有限公司 | Multifunctional signal output device |
-
1982
- 1982-02-13 JP JP2147282A patent/JPS58139233A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS58139233A (en) | 1983-08-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4843539A (en) | Information transfer system for transferring binary information | |
| US4250547A (en) | Information processing apparatus capable of effecting parallel processings by using a divided common bus | |
| US4570215A (en) | Input/output device for programmable controller | |
| US4845667A (en) | Method and apparatus for data exchange between microprocessors | |
| JPH039498B2 (en) | ||
| JPH037985B2 (en) | ||
| JPH0312340B2 (en) | ||
| JP3909509B2 (en) | Serial interface circuit | |
| JPS58119026A (en) | Input and output data transmission system of programmable controller | |
| JPS58155405A (en) | Input/output device of programmable controller | |
| JPS6386630A (en) | Frame synchronization system in parallel transmission line | |
| JPS58158703A (en) | Input and output device of programmable controller | |
| MXPA94005782A (en) | Feedforward control system, method and control module. | |
| JPS58158702A (en) | Input and output device of programmable controller | |
| JPH05342172A (en) | Multiprocessor system | |
| SU1444787A1 (en) | Device for interfacing data transmission channel with trunk line | |
| SU1003064A1 (en) | Information exchange device | |
| SU1658157A1 (en) | Device for computer network users diagnostics | |
| SU1152038A1 (en) | Counting-shifting device | |
| JP2504615B2 (en) | Signal transmission timing control system | |
| JPS6222085A (en) | Test circuit | |
| JPH08279298A (en) | Forward/backward shift register and its driving method | |
| SU1381506A1 (en) | Microprogram controller | |
| JP2897774B2 (en) | Output select circuit | |
| JPH05108119A (en) | Communication processing method using serial transmission line |