JPS6027401B2 - sequence controller - Google Patents

sequence controller

Info

Publication number
JPS6027401B2
JPS6027401B2 JP15701277A JP15701277A JPS6027401B2 JP S6027401 B2 JPS6027401 B2 JP S6027401B2 JP 15701277 A JP15701277 A JP 15701277A JP 15701277 A JP15701277 A JP 15701277A JP S6027401 B2 JPS6027401 B2 JP S6027401B2
Authority
JP
Japan
Prior art keywords
input
output
data
data memory
arithmetic processing
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
JP15701277A
Other languages
Japanese (ja)
Other versions
JPS5489173A (en
Inventor
俊彦 蓬田
毅 横田
勝己 杉浦
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.)
Toyoda Koki KK
Original Assignee
Toyoda Koki 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 Toyoda Koki KK filed Critical Toyoda Koki KK
Priority to JP15701277A priority Critical patent/JPS6027401B2/en
Publication of JPS5489173A publication Critical patent/JPS5489173A/en
Publication of JPS6027401B2 publication Critical patent/JPS6027401B2/en
Expired legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Control By Computers (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 本発明は演算処理部と入出力ユニットの間にデータメモ
リを設け、このデータメモリを介して入出力要素からの
オンオフ情報と演算処理部からのオンオフ信号を交換す
るようにしたシーケンスコントローラに関するもので、
その目的とするところは、演算処理部によるプログラム
の謙出、実行とは独立して、オンオフデータの交換が行
えるようにしてデータ交換の高速化を図るとともに、入
力ユニットと出力ユニットが接続される番地、および入
力ユニットと出力ユニットの割合を自由に変更できるよ
うにしてフレキシビリティーを高めることにある。
Detailed Description of the Invention The present invention provides a data memory between an arithmetic processing section and an input/output unit, and exchanges on/off information from the input/output elements and on/off signals from the arithmetic processing section via this data memory. This is related to the sequence controller that was
The purpose of this is to speed up data exchange by making it possible to exchange on/off data independently of the program execution and execution by the arithmetic processing unit, and to connect the input unit and output unit. The purpose is to increase flexibility by allowing the address and the ratio of input units and output units to be changed freely.

近年、生産機械の大形化に伴って、リミットスイッチ等
の入力要素およびリレー等の出力要素が接続された入出
力ユニットを演算処理部から離れた位置に分散して設け
た、いわゆるリモート10方式のシーケンスコントロー
ラが生産機械等の制御に使用されるようになった。
In recent years, with the increase in the size of production machines, the so-called remote 10 method has been adopted, in which input/output units connected to input elements such as limit switches and output elements such as relays are distributed at locations away from the processing section. Sequence controllers have come to be used to control production machinery, etc.

この方式のシーケンスコントローラにおいては、入出力
ユニットと演算処理部との間で直接的に信号の交換を行
うと信号の伝送遅れのために、演算処理を高速で行なえ
なくなるため、一般的には、演算処理部の側に入出力ユ
ニットからのオンオフ情報と演算処理部から入出力ユニ
ットへ送出するオンオフ信号とを記憶するデータメモリ
を設け、このデータメモリを介してオンオフ情報とオン
オフ信号とを交換するようにしている。すなわち、デー
タメモリと入出力ユニットとの間にデータ交換装置を設
けて周期的にオンオフ情報とオンオフ信号が交換される
ようにしておき、シーケンスコントローラの演算処理部
はデータメモリに記憶されているオンオフ情報を入出力
要素からの情報としてテストを行うとともに、このテス
ト結果に基づいてプログラムで指定された出力要素を付
勢または無勢すべく、データメモリの指定された出力要
素に対応する記憶エリアにオンオフ信号の書込みを行う
ようになつている。ところで、データメモリとして一般
に使用される書換えが可能な半導体メモリは、データの
書込みと議出しとを同時に行うことができないため、演
算処理部によるデータの議出し書込みと、データ交換装
置によるデータの議出しと書込みが同時に行われないよ
うにしなければならない。
In this type of sequence controller, if signals are exchanged directly between the input/output unit and the arithmetic processing section, the arithmetic processing cannot be performed at high speed due to the signal transmission delay. A data memory is provided on the side of the arithmetic processing unit to store on/off information from the input/output unit and an on/off signal sent from the arithmetic processing unit to the input/output unit, and the on/off information and the on/off signal are exchanged via this data memory. That's what I do. In other words, a data exchange device is provided between the data memory and the input/output unit so that on/off information and on/off signals are periodically exchanged, and the arithmetic processing section of the sequence controller uses the on/off information stored in the data memory. In order to test information as information from input/output elements and to energize or deenergize output elements specified by the program based on the test results, on/off information is stored in the storage area corresponding to the specified output element in the data memory. It is designed to write signals. By the way, rewritable semiconductor memory, which is generally used as data memory, cannot write and issue data at the same time. It must be ensured that reading and writing do not occur at the same time.

このため、従来においては、1つの基準クロックを演算
処理部とデータ交換装置とに交互に切換えて与えられる
ようにしている。これにより演算処理部によって数個の
シーケンスプログラムが実行される毎に、入出力ユニッ
トとデータメモリの間で入出力要素のオンオフ信号また
はオンオフ情報が1ビットずつ伝送され、シーケンスプ
ログラムが−回通り実行されると、出力要素を付勢また
は無勢するオンオフ信号の全てが入出力ユニットに転送
され、入力要素からのオンオフ情報の全てがデータメモ
リに書込まれる。このようにすれば、データメモリが演
算処理部とデータ交換装置によって同時にアクセスされ
ることは防止されるが、このものにおいては、演算処理
部を基準クロックに同期して間欠的に動作させる必要が
あるため、演算処理部は基準クロックが与えられるたび
にシーケンスプログラムを1つづつ実行し、シーケンス
ブログラムの実行が完了する度に演算処理動作を停止す
るようにしなければならない。
For this reason, conventionally, one reference clock is alternately applied to the arithmetic processing section and the data exchange device. As a result, each time the arithmetic processing unit executes several sequence programs, the on/off signal or on/off information of the input/output element is transmitted bit by bit between the input/output unit and the data memory, and the sequence program is executed - times. Then, all of the on-off signals that energize or de-energize the output elements are transferred to the input/output unit, and all of the on-off information from the input elements is written to the data memory. This prevents the data memory from being accessed simultaneously by the arithmetic processing section and the data exchange device, but in this case, the arithmetic processing section must be operated intermittently in synchronization with the reference clock. Therefore, the arithmetic processing unit must execute the sequence program one by one each time the reference clock is applied, and must stop the arithmetic processing operation each time the execution of the sequence program is completed.

また、シーケンスプログラムの実行が完了する前に次の
基準パルスが与えられると、動作が異常となるため、演
算処理部と基準パルスを発生する回路との間でインター
ロックを取る回路が必要となる。このため、リモート1
0方式でない一般のシーケンスコントローラに使用され
る演算処理部をそのまま流用することができず、リモー
ト10方式専用の演算処理部を新たに設計、製作しなけ
ればならない欠点があった。また、従来のシーケンスコ
ントローラでは、入力ユニットが接続された番地につい
ては入力ユニットからデータメモリへオンオフ情報を転
送し、出力ユニットが接続された番地については逆にデ
ータメモリから出力ユニットにオンオフ情報を転送する
必要があるため、入力ユニットを装着する番地と出力ユ
ニットを装着する番地とを完全に区別し、各ユニットが
接続された番地によって、各ユニットが入力ユニットで
あるのか出力ユニットであるのかを判別するようにして
いた。
Additionally, if the next reference pulse is given before the sequence program has finished executing, the operation will become abnormal, so an interlock circuit is required between the arithmetic processing unit and the circuit that generates the reference pulse. . For this reason, remote 1
The arithmetic processing section used in a general sequence controller other than the 0 method cannot be used as is, and a new arithmetic processing section dedicated to the remote 10 method must be designed and manufactured. In addition, in conventional sequence controllers, on/off information is transferred from the input unit to the data memory for the address where the input unit is connected, and on/off information is transferred from the data memory to the output unit for the address where the output unit is connected. Therefore, the address where the input unit is installed is completely distinguished from the address where the output unit is installed, and the address to which each unit is connected is used to determine whether each unit is an input unit or an output unit. I was trying to do that.

このため入力ユニットを装着する番地と出力ユニットを
装着する番地が固定化されてしまい、入力ユニットと出
力ユニットの接続できる番地および、これらの混合割合
を変更できない問題があった。本発明はかかる点に鑑み
てなされたもので、演算処理部に接続された入出力用の
バスラインと、入出力ユニットに接続される入出力要素
の各アドレスに対応した記憶エリアを有する2組のデー
タメモリと、少なくとも演算処理部によるシーケンスプ
ログラムの講出し実行時間よりも長い時間間隔で信号を
出力するタイミング信号発生手段と、タイミング信号発
生手段からの信号によってゲートの切換えを行い一方の
データメモリがた前記入出力用バスラィンに接続されて
いる期間は他方のデータメモリが入出力ユニットに接続
され他方のデータメモリが前記入出力用バスラィンに後
続されている期間は前記一方のデータメモリが入出力ユ
ニットに接続されるようにする〆モリ切換手段と、デー
タメモリの切換えが行われる度に全ての入出力要素に対
応したオンオフ信号をデータメモリから入出力ユニット
に送出し、この後で、全ての入出力要素のオンオフ情報
を入出力ユニットから読込んでデータメモリに書込むデ
ータ交換手段とを設けたことを特徴とするものである。
For this reason, the address at which the input unit is installed and the address at which the output unit is installed are fixed, and there is a problem in that the address at which the input unit and output unit can be connected and the mixing ratio thereof cannot be changed. The present invention has been made in view of this point, and includes two sets of input/output bus lines connected to the arithmetic processing unit and storage areas corresponding to the respective addresses of input/output elements connected to the input/output unit. a data memory, a timing signal generating means for outputting a signal at a time interval longer than at least the execution time of the sequence program by the arithmetic processing unit, and one data memory for switching the gate according to the signal from the timing signal generating means. During the period when the other data memory is connected to the input/output bus line, the other data memory is connected to the input/output unit, and during the period when the other data memory is connected to the input/output bus line, the one data memory is input/output. A terminal switching means is provided to connect the data memory to the unit, and each time the data memory is switched, on/off signals corresponding to all input/output elements are sent from the data memory to the input/output unit. The present invention is characterized by being provided with a data exchange means for reading on/off information of input/output elements from the input/output unit and writing it into the data memory.

以下本発明の実施例を図面に基づいて説明する。Embodiments of the present invention will be described below based on the drawings.

第1図において11,12はそれぞれ入力ユニットおよ
び出力ユニットで、これらの入出力ユニット11,12
はシーケンスコントローラ本体201こ対して離れた位
置に配談された接続端子13に任意の割合で任意の位置
に接続されている。この接続端子13は3本のバスラィ
ンADB,mB,ODBと信号線14を介してシーケン
スコントローラ本体2川こ接続されている。なお、バス
ラインADBはアドレスバスを示し、バスラインmB,
ODBはそれぞれ入力データバス、出力データバスを示
す。前記入力ユニット11は入力端子11aに接続され
た押ボタンスイッチ凶10,凶20、リミットスイッチ
は10,LS20等の入力要素の開閉状態をTTLレベ
ルのオンオフ情報に変換するもので、本実施例では1つ
の入力ユニット11に8個の入力要素が接続されるよう
になっている。
In FIG. 1, 11 and 12 are an input unit and an output unit, respectively.
are connected to the connection terminals 13 arranged at a remote position with respect to the sequence controller main body 201 at an arbitrary ratio and at an arbitrary position. This connection terminal 13 is connected to two sequence controller bodies via three bus lines ADB, mB, and ODB and a signal line 14. Note that the bus line ADB indicates an address bus, and the bus lines mB,
ODB indicates an input data bus and an output data bus, respectively. The input unit 11 converts the open/close states of input elements such as pushbutton switches 10 and 20, limit switch 10, and LS 20 connected to the input terminal 11a into TTL level on/off information. Eight input elements are connected to one input unit 11.

そして、アドレスバスADBに出力されるアドレスデー
タによって入力ユニット11の1つが選択されると、選
択された入力ユニット11に接続されている8個の入力
要素の開閉状態が8ビットのオンオフ情報として入力デ
ータバスIDBに出力されるようになっている。一方、
出力ユニット12は出力端子12aに接続されたりレー
、ソレノイド等の出力要素を出力データバスODBに出
力されるオンオフ信号に基づいて付勢または無勢するも
ので、本実施例では8個の出力要素が8ビットのオソオ
フ信号によって同時に付勢または無勢されるようになっ
ている。
When one of the input units 11 is selected by the address data output to the address bus ADB, the open/close states of the eight input elements connected to the selected input unit 11 are input as 8-bit on/off information. It is designed to be output to the data bus IDB. on the other hand,
The output unit 12 energizes or deenergizes output elements such as relays and solenoids connected to the output terminal 12a based on on/off signals output to the output data bus ODB. In this embodiment, eight output elements are connected to the output terminal 12a. They are simultaneously activated or deactivated by an 8-bit on/off signal.

この出力ユニット12の内部には出力端子I2aに接続
された出力要素に対応して8個のフリップフロツプが設
けられており、信号線14に出力されるラツチ用信号に
よって出力データバスODBのオンオフ信号が8個のフ
リツプフロツプに同時に取り込まれ、このフリツプフロ
ップのセットリセットによって出力要素が付勢または無
勢されるようになっている。また、この出力ユニット1
2は、アドレスバスADBに出力されるアドレスデータ
によって選択されると、8個のフリツプフロツプのセッ
ト、リセット状態が出力要素のオンオフ状態を示す情報
として入力データバスmBに出力されるようになってい
る。次にシーケンスコントローラ本体2川こついて説明
する。
Inside the output unit 12, eight flip-flops are provided corresponding to the output elements connected to the output terminal I2a, and the on/off signal of the output data bus ODB is controlled by the latch signal output to the signal line 14. The output element is loaded into eight flip-flops at the same time, and the output element is activated or deactivated by setting or resetting the flip-flops. Also, this output unit 1
2, when selected by the address data output to the address bus ADB, the set and reset states of eight flip-flops are output to the input data bus mB as information indicating the on/off states of the output elements. . Next, we will explain the two main parts of the sequence controller.

このシーケンスコントローラ本体20は大きく分けて、
演算処理部21、2組のデータメモリ22,23、デー
タ交換回路24、アドレスデコーダ25およびデータメ
モリ22,23を切換えるためのゲートGI〜GI2と
このゲートGI〜GI2を開閉するための制御回路とに
よって構成されている。演算処理部21はリモート10
方式のシーケンスコントローラ専用のものでなく一般の
シーケンスコントローラと共通のものが使用されている
This sequence controller main body 20 can be roughly divided into:
An arithmetic processing unit 21, two sets of data memories 22 and 23, a data exchange circuit 24, an address decoder 25, gates GI to GI2 for switching between the data memories 22 and 23, and a control circuit for opening and closing the gates GI to GI2. It is made up of. Arithmetic processing unit 21 is remote 10
This system uses a sequence controller that is common to general sequence controllers, rather than a dedicated sequence controller.

この演算処理部21は演算処理部30とプログラムメモ
リ31とプログラムカウンタ32とによって構成され、
プログラムメモリ31には図略のプログラムローダによ
って所定のシーケンスプログラムがストアされている。
演算処理装置30は内部クロックに同期してプログラム
カウンタ32を順次歩進させ、プログラムメモリ31に
記憶されているシーケンスプログラムを零番地から順番
に講出して実行するようになっている。
This arithmetic processing section 21 is composed of an arithmetic processing section 30, a program memory 31, and a program counter 32.
A predetermined sequence program is stored in the program memory 31 by a program loader (not shown).
The arithmetic processing unit 30 sequentially increments a program counter 32 in synchronization with an internal clock, and sequentially reads and executes the sequence programs stored in the program memory 31 starting from address zero.

また、この演算処理装置3川ま、8ビットを単位として
データの入出力を行うようになっているため、演算処理
装置30はシーケンスプログラムとしてプログラムされ
ている入出力アドレスデータの上位ビット、例えばアド
レスデータが8ビットであれば上位5ビットのデータを
アドレス出力バスAOBに出力し、入出力ユニットを単
位としてアドレス指定を行う。そして、謙出されたシー
ケソスプログラムがテスト命令である場合には、データ
入力バスDIBに出力されている8ビットのオンオフ情
報を謙込んでアドレスデータの下位3ビットによって8
ビットのオンオフ情報の中からプログラムで指定された
オンオフ情報を選択し、この選択されたオンオフ情報に
よってテストを行う。一方、読出されたシーケンスプロ
グラムが出力命令である場合には、データ入力バスDI
Bに出力されている8ビットのオンオフ情報を議込み、
この読込まれた8ビットのデータの中からアドレスデー
タの下位3ビットによって指定されるビットをテスト結
果に基づいて書換え、書換えられた8ビットのオンオフ
信号をデータ出力バスDOBに出力するようになってい
る。なお、演算処理装置30からは、オンオフ信号の送
出と同期してラッチ用のストロープ信号DOSが出力さ
れるようになっている。したがって、上記横成の演算処
理部21によってリモート10方式でない通常のシーケ
ンス制御を行う場合には、演算処理部21のデータバス
DIB,DOB,AOBを入出力ユニット1 1,1
2側のデータバスIDB,ODB,ADBにそれぞれ接
続し、また、演算処理装置30から出力されるストロー
ブ信号DOSが信号線1 4に出力されるようにすれば
よい。
In addition, since this arithmetic processing unit 3 is designed to input and output data in units of 8 bits, the arithmetic processing unit 30 uses the upper bits of the input/output address data programmed as a sequence program, such as the address If the data is 8 bits, the upper 5 bits of data are output to the address output bus AOB, and addressing is performed in units of input/output units. If the extracted Sequesos program is a test instruction, the 8-bit on/off information output to the data input bus DIB is extracted and the lower 3 bits of the address data are used to
The on/off information specified by the program is selected from the on/off information of the bit, and a test is performed using the selected on/off information. On the other hand, if the read sequence program is an output instruction, the data input bus DI
Inputs the 8-bit on/off information output to B,
From this read 8-bit data, the bit specified by the lower 3 bits of the address data is rewritten based on the test result, and the rewritten 8-bit on/off signal is output to the data output bus DOB. There is. Note that the arithmetic processing unit 30 outputs a latching strobe signal DOS in synchronization with the sending of the on/off signal. Therefore, when performing normal sequence control other than the remote 10 method using the above-mentioned arithmetic processing section 21, the data buses DIB, DOB, and AOB of the arithmetic processing section 21 are connected to the input/output units 1, 1, and 1.
The strobe signal DOS outputted from the arithmetic processing unit 30 may be outputted to the signal line 14.

2組のデータメモリ22,23は、演算処理部21から
送出される出力要素のオンオフ信号と入出力ユニット1
1,12から送出されるオンオフ情報とを記憶するため
のもので、このデータメモリ22,23を設けることに
よって、シーケンスコントローラ本体20と入出力ユニ
ット1 1,12の間の距離が遠く信号の伝達に時間が
かかる場合でも、演算処理装置30は最高の速度で演算
処理を行うことが可能となる。
Two sets of data memories 22 and 23 store the on/off signals of the output elements sent from the arithmetic processing section 21 and the input/output unit 1.
By providing the data memories 22 and 23, the distance between the sequence controller main body 20 and the input/output units 1 and 12 is increased, and signal transmission is facilitated. Even if it takes a long time, the arithmetic processing device 30 can perform the arithmetic processing at the highest speed.

このデータメモリ22,23はともに、書換えが可能な
半導体メモリによって構成されており、シーケンスコン
トローラ本体2川こ接続される入出力ユニット11,1
2の最大数に応じた記憶容量のものが使用される。本実
施例では入出力ユニット11,12を指定するアドレス
データが5ビットで構成され、入出力ユニット11,1
2のそれぞれには8個の入出力要素が接続されるように
なっているため、データメモリ22,23にはそれぞれ
32ワード256ビットのメモリが使用されている。こ
れらのデータメモリ22,23にはアドレス端子ADD
、データ入力端子D1、データ出力端子DOが設けられ
ており、データメモリ22,23のアドレス端子ADD
は、それぞれゲートG1,G2を介してアドレス出力バ
スAOBに接続されトゲートG3,G4を介してアドレ
スデータバスADBに接続されている。
The data memories 22 and 23 are both composed of rewritable semiconductor memories, and the input/output units 11 and 1 are connected to the sequence controller main body 2.
A storage capacity corresponding to the maximum number of 2 is used. In this embodiment, the address data specifying the input/output units 11, 12 is composed of 5 bits, and the input/output units 11, 1
Since eight input/output elements are connected to each of the data memories 22 and 23, a memory of 32 words and 256 bits is used for each of the data memories 22 and 23. These data memories 22 and 23 have address terminals ADD.
, a data input terminal D1, a data output terminal DO, and an address terminal ADD of the data memories 22 and 23.
are connected to address output bus AOB via gates G1 and G2, and to address data bus ADB via gates G3 and G4, respectively.

一方、データメモリ22,23のデータ入力端子DIは
、それぞれゲ−トG5,G6を介してデータ出力バスD
OBに接続されるとともに、ゲードG7,G8を介して
入力データバスIDBに接続され、データ出力端子DO
は、それぞれゲートG9,GI Oを介してデータ入力
バスDIBに接続されるとともに、ゲートGI 1,G
1 2を介して出力データバスODBに接続されている
。また、データメモリ22,23には謙出書込切換端子
RWCが設けられており、この切換端子RWCに信号が
与えられるとデータの書込みが行われ、信号が与えられ
ないときはデータの読出しが行われるようになっている
。このデータメモリ22,23の切換端子RWCには演
算処理部21から出力されるストロープ信号DOSとデ
ータ交換回路24から出力される書込指令信号lOWが
、それぞれアンドゲートAG1,AG3、アンドゲート
AG2,AG4を介して与えられるようになっている。
次にゲートGI〜GI2とアンドゲートAGI〜AG4
の開閉を制御する制御回路について説明する。
On the other hand, the data input terminals DI of the data memories 22 and 23 are connected to the data output bus D via gates G5 and G6, respectively.
It is connected to the input data bus IDB via gates G7 and G8, and the data output terminal DO
are connected to the data input bus DIB via gates G9 and GIO, respectively, and gates GI1 and GIO are connected to the data input bus DIB via gates G9 and GIO, respectively.
12 to the output data bus ODB. Further, the data memories 22 and 23 are provided with an output write switching terminal RWC, and when a signal is applied to this switching terminal RWC, data is written, and when no signal is applied, data is read. It is about to be done. The strobe signal DOS output from the arithmetic processing unit 21 and the write command signal lOW output from the data exchange circuit 24 are applied to the switching terminals RWC of the data memories 22 and 23, respectively, and the AND gates AG1, AG3, AND gate AG2, It is designed to be given via AG4.
Next, gates GI to GI2 and AND gates AGI to AG4
The control circuit that controls the opening and closing of the will be explained.

アドレスデコーダ25は、プログラムの実行と同期して
所定の時間間隔で信号を出力するタイミング信号発生手
段をなすもので、本実施例ではプログラムカウンタ32
から出力されるアドレスデータが零となる度にタイミン
グ信号を出力するようになっている。したがって、第3
図bに示すように演算処理装置30によって、プログラ
ムメモリ31に記憶されているシーケンスプログラムが
1回通り実行され、シーケンスプログラムが零番地に戻
る度にタイミング信号が出力される。このアドレスデコ
ーダ25から出力されるタイミング信号はフリツプフロ
ップFFIのトリが端子Tと、データ交換回路24内の
フリツプフロツプFF3とFF4のセット端子Sに与え
られるようになつている。フリツプフロツプFFIはJ
、K形のフリップフロップで入力端子J、Kはともに/
・ィレベルの状態に保持されている。このため、トリが
端子Tにタイミング信号が与えられる度に反転し、セッ
ト出力端子Qとりセット出力端子Qとの2つの出力端子
から交互に信号が出力される。この出力端子Q,Qから
出力される信号は、オアゲートOG1,OG2の入力様
子にそれぞれ与えられ、このオアゲートOG1,OG2
の出力端子からゲート制御信号SC,RCがそれぞれ出
力されるようになっている。そして、これらのゲート制
御信号SC,RCの内、ゲート制御信号SCはゲートG
I,G4,G5,G8,G9,GI2とアンドゲートA
G1,AG4に与えられ、ゲート制御信号RCはゲート
G2,G3,G6,GI0,G7,GI Iとアンドゲ
−トAG2,AG3に与えられるようになっている。し
たがって、フリツプフロツプFFIがセットされている
プログラム実行サイクルではデータメモリ22が演算処
理部21側のバスラインに接続され、データメモリ23
が入出力ユニット11,12側のバスラィンに接続され
る。そして、データメモリ22が演算処理部21からの
ストローブ信号DOSによって書込み読み出しの切換が
行われ、データメモIJ23がデータ交換回路24から
の書込指令信号lOWによって書込み読み出しが切換え
られる。これに対し、フリツプフロツプFFIがリセツ
トされているプログラム実行サイクルでは、上記の場合
とは反対に、演算処理部21側のバスラインにデータメ
モリ23が接続され、入出力ユニット11,12側のバ
スラインにデータメモリ22が接続される。そして、デ
ータメモリ23が演算処理部からの信号で謙出し書込み
が制御され、データメモリ22がデータ交換回路24か
らの信号によって議出し書込みが制御されるようになる
。フリツプフロツプFF2は、シーケンスプログラムの
実行に先立って、入出力ユニット11,12から送出さ
れる入出力要素の初期状態をデータメモリ22と23の
両方に記憶させるために設けられているもので、演算処
理装置30から出力されるイニシャル信号IRSでセッ
トされ、データ交換回路24のアンドゲートAG5から
出力される信号によってリセツトされるようになってい
る。
The address decoder 25 constitutes a timing signal generating means that outputs a signal at predetermined time intervals in synchronization with the execution of a program.
A timing signal is output every time the address data output from the address data becomes zero. Therefore, the third
As shown in FIG. b, the sequence program stored in the program memory 31 is executed once by the arithmetic processing unit 30, and a timing signal is output every time the sequence program returns to address zero. The timing signal outputted from the address decoder 25 is applied to the trigger terminal T of the flip-flop FFI and the set terminal S of the flip-flops FF3 and FF4 in the data exchange circuit 24. Flipflop FFI is J
, the input terminals J and K of the K-type flip-flop are both /
・It is maintained at the same level. Therefore, the signal is inverted every time a timing signal is applied to the terminal T, and signals are alternately output from the two output terminals, the set output terminal Q and the set output terminal Q. The signals output from these output terminals Q and Q are given to the input states of OR gates OG1 and OG2, respectively.
Gate control signals SC and RC are outputted from the output terminals of the circuit. Of these gate control signals SC and RC, the gate control signal SC is the gate G
I, G4, G5, G8, G9, GI2 and AND gate A
The gate control signal RC is applied to gates G2, G3, G6, GI0, G7, GII and AND gates AG2 and AG3. Therefore, in a program execution cycle in which the flip-flop FFI is set, the data memory 22 is connected to the bus line on the arithmetic processing section 21 side, and the data memory 23
is connected to the bus line on the input/output units 11 and 12 side. The data memory 22 is switched between writing and reading by the strobe signal DOS from the arithmetic processing section 21, and the writing and reading of the data memo IJ 23 is switched by the write command signal lOW from the data exchange circuit 24. On the other hand, in a program execution cycle in which the flip-flop FFI is reset, contrary to the above case, the data memory 23 is connected to the bus line on the arithmetic processing unit 21 side, and the bus line on the input/output unit 11, 12 side is connected to the data memory 23. A data memory 22 is connected to. Then, the data memory 23 is controlled to start writing by a signal from the arithmetic processing section, and the data memory 22 is controlled to start writing by a signal from the data exchange circuit 24. The flip-flop FF2 is provided to store the initial states of the input/output elements sent from the input/output units 11 and 12 in both the data memories 22 and 23 prior to execution of the sequence program. It is set by the initial signal IRS outputted from the device 30, and reset by the signal outputted from the AND gate AG5 of the data exchange circuit 24.

そして、このフリツプフロツプFFSのセット出力端子
Qから出力される信号がオアゲートOG1,OG2の両
方の入力端子に与えられるようになっている。したがっ
て、演算処理装置30からのイニシャル信号瓜Sによっ
てフリツプフロツプFF2がセットされると、オアゲー
トOG1,OG2の両方からゲート制御信号SC,RC
が出力されるようになり、ゲートGI〜GI2とアンド
ゲートAGI〜AG4が全く開かれる。なおこのとき、
演算処理装置30からはデータが出力されずに演算処理
装置30のデータ出力端子およびアドレスデータ端子は
インピーダンスの高い状態に保持され、またストローブ
信号DOSも出力されないようになっている。したがっ
て、データメモリ22と23の両方が入出力ユニット1
1,12側のバスラィンに接続されたことになり、アド
レスデータバスADBに零から順番に変化するアドレス
データを出力するとともに、アンドゲートAG2,AG
4の入力端子に書込指令信号lOWを与えるようにすれ
ば、入出力ユニット11,12に接続された入出力要素
の初期状態をデータメモリ22,23の両方に書込むこ
とができる。次に、上記のような、入出力要素の初期状
態の書込みをシーケンス制御の開始に先立って行い、シ
ーケンス制御中においては、各プログラム実行サイクル
毎に演算処理装置30によって書込まれた出力要素のオ
ンオフ信号を出力ユニット12に転送するとともに、入
力ユニット1 1から送出されるオンオフ情報をデータ
メモリーこ書込むデータ交換回路24について説明する
A signal output from the set output terminal Q of this flip-flop FFS is applied to both input terminals of OR gates OG1 and OG2. Therefore, when the flip-flop FF2 is set by the initial signal S from the arithmetic processing unit 30, the gate control signals SC and RC are sent from both OR gates OG1 and OG2.
is now output, and the gates GI to GI2 and the AND gates AGI to AG4 are completely opened. Furthermore, at this time,
No data is output from the arithmetic processing unit 30, the data output terminal and address data terminal of the arithmetic processing unit 30 are held in a high impedance state, and the strobe signal DOS is also not output. Therefore, both data memories 22 and 23 are connected to input/output unit 1
It is connected to the bus lines on the 1 and 12 sides, and outputs address data that changes sequentially from zero to the address data bus ADB, and AND gates AG2 and AG
By applying the write command signal lOW to the input terminal 4, the initial states of the input/output elements connected to the input/output units 11 and 12 can be written to both the data memories 22 and 23. Next, the initial states of the input/output elements as described above are written prior to the start of sequence control, and during sequence control, the initial states of the input/output elements written by the arithmetic processing unit 30 are written in each program execution cycle. The data exchange circuit 24 which transfers the on/off signal to the output unit 12 and also writes the on/off information sent from the input unit 11 into the data memory will be described.

このデータ交換回路24はクロック発生回路34、入出
力アドレスカウンタ35、フリツブフロツプFF3,F
F4、アンドゲートAG5,AG6、オアゲートOG6
,OG7によって構成されており、入出力アドレスカウ
ンタ35の計数値が入出力ユニット11,12とデータ
メモリ22,23のアドレス指定を行うアドレスデータ
としてアドレスデータバスADBに出力されるようにな
っている。この入出力アドレスカウンタ35はデータメ
モリ22,23の記憶エリアに対応した32進のカウン
タで、クロック発生回路34から出力される歩進パルス
がアンドゲートAG6を介して与えられる度に歩進し、
計数値を変更して行く。そして、計数値が32になると
キヤリー信号CARを出力して計数値を零リセットする
ようになっている。また、フリツプフロツプFF3は、
アンドゲートAG6の開閉を制御するもので、アドレス
デコーダ25から出力されるタイミング信号によってセ
ットされ、アンドゲートAG5からの信号によってリセ
ットされるようになっている。このフリツブフロップF
F3のセット出力端子Qからの信号は、フリップフロッ
プFF2のセット出力端子Qからの信号とともに、オア
ゲートOG6を介してアンドゲートAG6の他方の入力
端子に与えられるようになっている。したがって、フリ
ツプフロツプFF2,FF3のいずれかがセットされて
いる間、入出力アドレスカウンタ35が歩進クロツクに
同期して歩進され、アドレスデータバスADBに出力さ
れるアドレスデータが変更される。フリツプフロツプF
F4は、データメモリ22,23の議出し、書込みを制
御するもので、このフリップフロツプFF4のセット端
子Sにはアドレスデコーダ25から出力されるタイミン
グ信号が与えられるようになっており、リセット端子R
には、オアゲートOG7を介して入出力アドレスカウン
夕35から出力されるキャリー信号CARと演算処理装
置30からのイニシャル信号IRSが与えられるように
なっている。
This data exchange circuit 24 includes a clock generation circuit 34, an input/output address counter 35, and flip-flops FF3 and F.
F4, AND gate AG5, AG6, OR gate OG6
, OG7, and the count value of the input/output address counter 35 is output to the address data bus ADB as address data for specifying addresses of the input/output units 11, 12 and data memories 22, 23. . This input/output address counter 35 is a 32-ary counter corresponding to the storage areas of the data memories 22 and 23, and increments every time a step pulse outputted from the clock generation circuit 34 is applied via the AND gate AG6.
Change the count value. When the count value reaches 32, a carry signal CAR is output to reset the count value to zero. In addition, flip-flop FF3 is
It controls opening and closing of AND gate AG6, and is set by a timing signal output from address decoder 25 and reset by a signal from AND gate AG5. This fritsubflop F
The signal from the set output terminal Q of F3 is applied together with the signal from the set output terminal Q of flip-flop FF2 to the other input terminal of AND gate AG6 via OR gate OG6. Therefore, while either flip-flop FF2 or FF3 is set, the input/output address counter 35 is incremented in synchronization with the step clock, and the address data output to the address data bus ADB is changed. flip flop F
F4 controls the input and writing of the data memories 22 and 23, and the set terminal S of this flip-flop FF4 is supplied with a timing signal output from the address decoder 25, and the reset terminal R
is supplied with a carry signal CAR outputted from the input/output address counter 35 and an initial signal IRS from the arithmetic processing unit 30 via an OR gate OG7.

そして、このフリツプフロップFF4のセット端子Qか
ら出力される信号はストローブ信号SSとして入出力ユ
ニット11,12に与えられるようになっており、リセ
ット出力端子Qから出力される信号は書込指令信号lO
WとしてアンドゲートAG2,AG4に与えられるよう
になっている。したがって、演算処理装置30からイニ
シャル信号IRSが出力された場合には、フリツプフロ
ツプFF2のセットと同時にフリツプフロツプFF4が
リセットされて書込指令信号lOWが送出されるが、ア
ドレスデコーダ25からタイミング信号が与えられた場
合には、フリップフロップ4は最初にセットされてスト
ローブ信号SSが送出され、入出力アドレスカウンタ3
5からキヤIJ−信号CARが出力された時点でリセッ
トされて書込指令信号lOWが出力される。また、フリ
ツプフロツプFF4のリセット出力端子Qからの信号は
、入出力アドレスカウンタ35から出力されるキャリー
信号CARとともにアンドゲートAG5の入力端子に与
えられるようになっており、フリツプフロツプFF4が
リセットされている状態でキャリー信号CARが出力さ
れると、アンドゲートAG5から信号が出力される。第
2図はデータメモリ22,23と入出力ユニット11,
12との間で行われるデータ交換動作を説明するための
フローチャートで、データ交換の動作をこのフローチャ
ートに沿って説明する。
The signal output from the set terminal Q of flip-flop FF4 is given to the input/output units 11 and 12 as a strobe signal SS, and the signal output from the reset output terminal Q is a write command signal lO.
It is provided as W to AND gates AG2 and AG4. Therefore, when the initial signal IRS is output from the arithmetic processing unit 30, the flip-flop FF4 is reset at the same time as the flip-flop FF2 is set, and the write command signal lOW is sent out, but the timing signal is not given from the address decoder 25. In this case, the flip-flop 4 is initially set and the strobe signal SS is sent out, and the input/output address counter 3
When the carrier IJ-signal CAR is output from 5, it is reset and the write command signal lOW is output. Further, the signal from the reset output terminal Q of the flip-flop FF4 is applied to the input terminal of the AND gate AG5 together with the carry signal CAR output from the input/output address counter 35, so that the flip-flop FF4 is in a reset state. When the carry signal CAR is output, a signal is output from the AND gate AG5. FIG. 2 shows the data memories 22, 23 and the input/output unit 11,
This is a flowchart for explaining the data exchange operation performed with 12. The data exchange operation will be explained along this flowchart.

今、シーケンスコントローラ本体20の電源が投入され
ると、演算処理装置30からイニシャル信号IRSが送
出され、フリツプフロツプFF2がセットされるととも
にフリツプフロツプFF4がリセットされる。フリツプ
フロツプFF2がセットされると、フリツプフロツプF
F2のセット出力端子Qより信号が出力され、オアゲー
トOG1,002からそれぞれゲート制御信号SC,R
Cが送出される。
Now, when the sequence controller main body 20 is powered on, an initial signal IRS is sent from the arithmetic processing unit 30, flip-flop FF2 is set, and flip-flop FF4 is reset. When flip-flop FF2 is set, flip-flop F
A signal is output from the set output terminal Q of F2, and gate control signals SC and R are output from OR gates OG1 and 002, respectively.
C is sent.

これによってゲートGI〜GI2が全て開かれ、データ
メモリ22と23の両方が入出力ユニット11,1 2
側のバスラィンADB,ODB,mBに接続される。ま
た、これと同時にアンドゲートAGI〜AG4も開かれ
る。一方、フリップフロップFF2のセット出力端子Q
から出力される信号はオアゲートOG6を介してアンド
ゲートAG6の入力様子に与えられるため、クロック発
生回路34からの歩進クロックが入出力アドレスカゥン
タ35に与えられるようになり、入出力アドレスカウン
タ35の計数値は零から順番に歩進される。
As a result, all gates GI to GI2 are opened, and both data memories 22 and 23 are connected to input/output units 11, 12.
It is connected to the side bus lines ADB, ODB, and mB. At the same time, AND gates AGI to AG4 are also opened. On the other hand, the set output terminal Q of flip-flop FF2
Since the signal output from is applied to the input state of AND gate AG6 via OR gate OG6, the step clock from clock generation circuit 34 is applied to input/output address counter 35, and input/output address counter 35 The count value is incremented sequentially starting from zero.

また、フリップフロップFF4がリセツトされると、リ
セット出力端子Qから書込指令信号lOWが送出される
ようになり、この書込指令信号lOWがアンドゲートA
G2,AG4を介してデータメモリ22,23の両方に
与えられる。入出力アドレスカウンタ35の計数値が歩
進されると、入出力ユニット11,12が奪番地から順
番に指定され、指定された入出力ユニット11,12に
接続されている入出力要素のオンオフ状態がオンオフ情
報として入力データバスIDBに出力され、このオンオ
フ情報がそれぞれゲートG7,G8を介してデータメモ
リ22,23のデータ入力端子DIに与えられる。
Furthermore, when the flip-flop FF4 is reset, a write command signal lOW is sent from the reset output terminal Q, and this write command signal lOW is sent to the AND gate A.
It is applied to both data memories 22 and 23 via G2 and AG4. When the count value of the input/output address counter 35 is incremented, the input/output units 11 and 12 are designated in order from the stolen address, and the on/off state of the input/output elements connected to the designated input/output units 11 and 12 is changed. is output to the input data bus IDB as on/off information, and this on/off information is applied to the data input terminals DI of the data memories 22, 23 via gates G7, G8, respectively.

一方、入出力アドレスカウンタ35から出力されるアド
レスデータはゲートG3,G4を介して、データメモリ
22,23のアドレス端子ADDに与えられるため、入
出力ユニット11,12が零番地から順番に選択される
と、これと同時にデータメモリ22,23内の記憶エリ
アも琴番地から順番に選択される。そして、データメモ
リ22,23には書込指令のWが与えられているため、
選択された入出力ユニット11,12のオンオフ情報が
、データメモリ23と23の選択された入出力ユニット
11,12に対応する記憶エリアに場番に書込まれて行
く。入出力ユニット11,12からのオンオフ情報がデ
ータメモリ22,23に全て書込まれ入出力アドレスカ
ウン夕35の計数値が32になると、入出力アドレスカ
ウンタ35からキヤリー信号CARが出力される。
On the other hand, since the address data output from the input/output address counter 35 is applied to the address terminals ADD of the data memories 22, 23 via the gates G3, G4, the input/output units 11, 12 are selected in order from address zero. At the same time, storage areas in the data memories 22 and 23 are also selected in order from the koto address. Since the write command W is given to the data memories 22 and 23,
The on/off information of the selected input/output units 11, 12 is written in the storage areas of the data memories 23, 23 corresponding to the selected input/output units 11, 12 in accordance with the location number. When all the on/off information from the input/output units 11, 12 is written into the data memories 22, 23 and the count value of the input/output address counter 35 reaches 32, the input/output address counter 35 outputs a carry signal CAR.

すると、アンドゲートAG5から信号が出力されてフリ
ツプフロツプFF2がリセットされ、セット出力端子Q
から信号が出力されなくなる。これにより、ゲート制御
信号SC,RCの送出が停止されゲートGI〜G12と
アンドゲートAGI〜AC4の全てが閉じられる。また
、アンドゲートAG6を閉じられ、入出力アドレスカウ
ンタ35は計算値零の状態で歩進を停止する。一方、ア
ンドゲートAG5から出力される信号は演算処理装置3
0にも与えられるようになっているため、演算処理装置
30は、入出力要素の初期状態がデータメモリ22,2
3に書込まれたことを検知し、シーケンスプログラムの
謙出しを開始する。シーケンスプログラムの議出しは、
プログラムメモリ3−1の零番地から開始されるため、
シーケンスプログラムの議出しが開始されると、アドレ
スデコーダ25からタイミング信号が出力され、このタ
イミング信号がフリツプフロップFFIのトリが端子T
とフリツプフロツプFF3,FF4のセット端子Sに与
えられる。
Then, a signal is output from the AND gate AG5, the flip-flop FF2 is reset, and the set output terminal Q
The signal will no longer be output. As a result, the transmission of gate control signals SC and RC is stopped, and all gates GI to G12 and AND gates AGI to AC4 are closed. Furthermore, the AND gate AG6 is closed, and the input/output address counter 35 stops incrementing with the calculated value being zero. On the other hand, the signal output from AND gate AG5 is
0 is also given, so the arithmetic processing unit 30 has the initial state of the input/output element as the data memory 22, 2.
It detects that the program has been written to 3 and starts writing the sequence program. To propose a sequence program,
Since it starts from address zero of program memory 3-1,
When the sequence program is started, a timing signal is output from the address decoder 25, and this timing signal causes the trigger of the flip-flop FFI to be output to the terminal T.
is applied to the set terminals S of flip-flops FF3 and FF4.

フリップフロツプFFIのトリが端子Tに信号が与えら
れると、フリップフロツプFFIは反転される。
When a signal is applied to the terminal T of the flip-flop FFI, the flip-flop FFI is inverted.

例えば、フリツプフロツプFFIの初期状態がリセット
状態にあったものとすれば、反転してセット状態となり
、セット出力端子Qより信号が出力される。これにより
オアゲートOGIからゲート制御信号SCが出力され、
ゲートGI,G4,G5,G9,G8,GI2およびア
ンドゲートAG1,AG4が開かれる。これにより、演
算処理装置30はデータメモリ22に対してデータの議
出しと書込みが行なえるようになり、データ交換装置2
4はデータメモリ23に対してデータの読出しと書込み
が行なえるようになる。一方、フリツプフロツプFF3
がセットされると、オアゲートOG6を介してアンドゲ
ートAG6に信号が与えられるようになり、入出力アド
レスカウンタ35の計数値が零から順番に歩進される。
For example, if the initial state of the flip-flop FFI is a reset state, it is inverted and becomes a set state, and a signal is output from the set output terminal Q. As a result, the gate control signal SC is output from the OR gate OGI,
Gates GI, G4, G5, G9, G8, GI2 and AND gates AG1, AG4 are opened. As a result, the arithmetic processing device 30 can send and write data to the data memory 22, and the data exchange device 2
4 becomes able to read and write data to the data memory 23. On the other hand, flip-flop FF3
When is set, a signal is applied to AND gate AG6 via OR gate OG6, and the count value of input/output address counter 35 is sequentially incremented from zero.

また、これと同時にフリツプフロツプFF4がセットさ
れるため、入出力ユニット11,12に対してストロー
ブ信号SSが出力される。これによって、データメモリ
23に記憶されているオンオフ信号が雫番地か別項番に
諸出され入出力ユニット11,12に転送される。なお
、この場合にはデータメモリ23に入出力ユニットの初
期状態が記憶されているため、出力要素のオンオフ状態
は変化しない。このようにして、オンオフ信号の転送が
行われ、、データメモリ23に記憶されている32ワー
ドのオンオフ信号の全てが転送されると、入力出力アド
レスカウンタ35の計数値は31から零に戻り、キャリ
ー信号CARが出力される。そして、入出力アドレスカ
ウンタ35の計数値は歩進クロックに同期して再び零か
ら歩進されて行く。一方、入出力アドレスカウンタ35
からキャリー信号CARが出力されると、フリツプフロ
ツプFF4がリセットされるため、フリツプフロップF
F4から誓込信号lOWが出力され、データメモリ23
は書込動作を行うようになる。これにより、入出力ユニ
ット11,12が零番地から打頃番に選択され、選択さ
れた入出力ュニト11,12からのオンオフ情報が、選
択された入出力ユニット11,12に対応した記憶エリ
アに書込まれて行く。そして、オンオフ情報の書込みが
完了して入出力アドレスカウンタ35からキヤリー信号
CARが送出されると、アンドゲートAG5から信号が
出力されフリツブフロツプFF3がリセットされる。こ
れにより、アンドゲートAG6が閉じられ、入出力アド
レスカウンタ35の歩進は停止される。なお、上述した
ようなデータ交換は第3図e,fに示すごとく、演算処
理装置30がシーケンスプログラムを1回通り実行する
よりも早く完了し、アドレスデコーダ25からタイミン
グ信号が送出されるまで待機状態となる。
Furthermore, since flip-flop FF4 is set at the same time, strobe signal SS is output to input/output units 11 and 12. As a result, the on/off signal stored in the data memory 23 is outputted to the drop address or another item number and transferred to the input/output units 11 and 12. In this case, since the initial state of the input/output unit is stored in the data memory 23, the on/off state of the output element does not change. In this way, the on/off signals are transferred, and when all 32 words of on/off signals stored in the data memory 23 are transferred, the count value of the input/output address counter 35 returns from 31 to zero. A carry signal CAR is output. Then, the count value of the input/output address counter 35 is again incremented from zero in synchronization with the increment clock. On the other hand, the input/output address counter 35
When the carry signal CAR is output from the flip-flop FF4, the flip-flop FF4 is reset.
The oath signal lOW is output from F4, and the data memory 23
will perform a write operation. As a result, the input/output units 11, 12 are selected from the zero address to the prime number, and the on/off information from the selected input/output units 11, 12 is stored in the storage area corresponding to the selected input/output units 11, 12. It will be written. When writing of the on/off information is completed and a carry signal CAR is sent from the input/output address counter 35, a signal is output from the AND gate AG5 and the flip-flop FF3 is reset. As a result, AND gate AG6 is closed and the input/output address counter 35 stops incrementing. Note that, as shown in FIGS. 3e and 3f, the data exchange described above is completed faster than when the arithmetic processing unit 30 executes the sequence program once, and waits until the timing signal is sent from the address decoder 25. state.

演算処理装置301こよってシーケンスプログラムが1
回通り実行され再びプログラムメモリ31の零番地から
シーケンスプログラムの議出しを開始すると、アドレス
デコーダ25からタイミング信号が送出される。
The arithmetic processing unit 301 has one sequence program.
When the sequence program is executed once again and the sequence program is started again from address zero in the program memory 31, a timing signal is sent from the address decoder 25.

これにより、フリップフロツプFFIは反転されてリセ
ット状態となり、フリツプフロツプFF3,FF4は再
びセットされる。フリップフロップFFIがリセット状
態となると、ゲート制御信号SCのに代ってゲート制御
信号RCが出力されるようになり、ゲートGI,G4,
G5,G9,G8,GI2に代ってゲートG2,G3,
G6,GI0,G7,GIIが開かれ、アンドゲートA
G1,AG4に代ってアンドゲートAG2,AG3が開
かれる。これにより、データメモリ23が演算処理装置
301こよってアクセスされるようになり、データメモ
リ22がデータ交換回路24によってアクセスされるよ
うになる。データ交換回路24はフリップフロップFF
3,FF4のセットにより前記の場合と同様にして、前
のサイクルで演算処理装置3川こよって書込まれたオン
オフ信号をデータメモリ22から論出して入出力ユニッ
ト11,12に転送し、この転送が完了すると、入出力
ユニット11,12、から送出される入出力要素のオン
オフ情報をデータメモリ22に書込む。
As a result, flip-flop FFI is inverted and becomes a reset state, and flip-flops FF3 and FF4 are set again. When the flip-flop FFI enters the reset state, the gate control signal RC is output instead of the gate control signal SC, and the gates GI, G4,
Gates G2, G3, instead of G5, G9, G8, GI2,
G6, GI0, G7, GII are opened, and gate A
AND gates AG2 and AG3 are opened in place of G1 and AG4. As a result, the data memory 23 is accessed by the arithmetic processing unit 301, and the data memory 22 is accessed by the data exchange circuit 24. The data exchange circuit 24 is a flip-flop FF.
3. By setting FF4, in the same way as in the previous case, the on/off signal written by the arithmetic processing unit 3 in the previous cycle is extracted from the data memory 22 and transferred to the input/output units 11 and 12. When the transfer is completed, the on/off information of the input/output elements sent from the input/output units 11 and 12 is written into the data memory 22.

以下同様にして、演算処理装置3川こよってシーケンス
プログラムが1回実行される度に、演算処理装置3川こ
対して有効なデータメモリと、データ交換回路24に対
して有効なデータメモリとが切換えられる。これにより
、演算処理装置30から出力されるオンオフ信号と、入
出力ユニット11,12からのオンオフ情報とがデータ
メモリ22,23を介して交換される。このように、本
発明のシーケンスコントローフにおいては演算処理部の
動作を間欠的に行わせる必要はなく、リモート10方式
でないシーケンスコントローラの演算処理部を流用する
ことができる。
Similarly, each time the sequence program is executed once by the three arithmetic processing units, the data memory valid for the three arithmetic processing units and the data memory valid for the data exchange circuit 24 are changed. Can be switched. Thereby, the on/off signal output from the arithmetic processing unit 30 and the on/off information from the input/output units 11 and 12 are exchanged via the data memories 22 and 23. In this way, in the sequence controller of the present invention, there is no need to cause the arithmetic processing section to operate intermittently, and the arithmetic processing section of a sequence controller other than the remote 10 type can be used.

また、上記実施例においては、データメモリに書込まれ
たオンオフ信号を入出力ユニットの区別なく全ての入出
力ユニットに転送するようにし、このオンオフ信号の転
送が完了した後、全ての入出力ユニットに接続された入
出力要素のオンオフ情報を書込むようにしているから、
入出力ユニットに選択されたユニットが入力ユニットで
あるか出力ユニットであるかを識別する識別回路を設け
たり、入力ユニットを接続するアドレスと出力ユニット
を接続するアドレスとを分離して入出力ユニットを識別
するようなことをしなくても、データメモリと入出力ユ
ニットとの間でデ−夕の交換を行うことができ、入出力
ユニットの比率の変更、配置の変更等を自由に行うこと
が可能となる。なお、上記実施例においては、演算処理
装置3のがシーケンスプログラムを1回通り実行する度
にデータメモリを切換えてデータ交換を行っていたが、
データ交換が短時間で完了する場合にはシーケンスプロ
グラムが1回実行される間に、複数回データメモリの切
換えが行われるようにしてデータメモリの切換えの度に
データ交換を行うようにしてもよく、データ交換に時間
がかかる場合には、シーケンスプログラムが複数回実行
される度にデータメモリを切換えてデータ交換を行うよ
うにしてもよい。
Further, in the above embodiment, the on/off signal written in the data memory is transferred to all input/output units without distinction between input/output units, and after the transfer of this on/off signal is completed, all input/output units Since I am trying to write the on/off information of the input/output element connected to
The input/output unit can be configured with an identification circuit that identifies whether the selected unit is an input unit or an output unit, or by separating the address for connecting the input unit and the address for connecting the output unit. Data can be exchanged between the data memory and the input/output unit without any need for identification, and the ratio of the input/output units can be changed and the arrangement can be changed freely. It becomes possible. In the above embodiment, the data memory is switched and data is exchanged each time the arithmetic processing unit 3 executes the sequence program once.
If data exchange is to be completed in a short time, the data memory may be switched multiple times while the sequence program is executed once, so that data is exchanged each time the data memory is switched. If data exchange takes time, data may be exchanged by switching the data memories each time the sequence program is executed a plurality of times.

第4図は本発明の他の実施例を示すもので、本実施例の
出力ユニット12には出力要素の付勢、無勢を記憶する
フリップフロツプのオンオフ状態を入力データバスID
Bに出力するフィードバック回路が設けられていない。
FIG. 4 shows another embodiment of the present invention, in which the output unit 12 of this embodiment has an input data bus ID that stores the on/off states of flip-flops that store the energization and non-energization of output elements.
A feedback circuit for outputting to B is not provided.

このような出力ユニット12を使用した場合、入出力ユ
ニット11,12からのオンオフデータをデータメモリ
22,23に書込むときに出力ユニット12から送出さ
れるオール0の空の情報がデータメモリ22,23に書
込まれ、演算処理装置30によって書込まれたオンオフ
信号が無効にされてしまう。したがって、デ−タメモリ
22,23内には入力ユニット11からのオンオフ情報
のみが記憶されることになり、演算処理装置30は出力
要素のオンオフ状態をテストすることができない。この
ため、本実施例のシーケンスコントローフにおいては、
演算処理部21に出力要素のオンオフ状態を記憶する出
力データメモリ40が設けられている。
When such an output unit 12 is used, when writing on/off data from the input/output units 11 and 12 to the data memories 22 and 23, the all-0 empty information sent from the output unit 12 is transferred to the data memories 22 and 23. 23, and the on/off signal written by the arithmetic processing unit 30 is invalidated. Therefore, only the on/off information from the input unit 11 is stored in the data memories 22, 23, and the arithmetic processing unit 30 cannot test the on/off states of the output elements. Therefore, in the sequence control of this example,
The arithmetic processing unit 21 is provided with an output data memory 40 for storing on/off states of output elements.

この世力データメモリ4川まデータメモリ22,23と
同じ容量の半導体メモリであり、このデータメモリ40
のアドレス端子ADDはアドレス出力バスAOBに接続
され、データ入力端子DIはデータ出力バスDOBに接
続されている。一方、データ出力端子DOはデータ入力
バスDIBとともに論理ゲート41に接続され、この論
理ゲート41の出力が演算処理装置30のデータ入力端
子に与えられるようになっている。この論理ゲート41
‘ま入力された2つのデータの各ビットの間で論理和を
取って出力するもので、この論理ゲート41からはデー
タメモリ22,23に記憶されている入力ユニット11
からのオンオフ情報と、出力データメモリ40‘こ記憶
されている出力要素のオンオフ情報とが出力される。こ
れにより演算処理装置3川ま出力要素のオンオフ状態を
テストすることが可能となる。また、本実施例のように
、出力ユニット12からのフィールドバックがない場合
には、シーケンスプログラムが1回実行される間に、デ
ータメモリ22,23と入出力ユニット11,12との
間のデータ交換が2回以上行われると、出力ユニット1
2からフィードバックされるオール零の空情報によって
出力要素が全部無勢されてしまう恐れがある。このため
、データメモリ22,23を切換えてデータ交換を行う
周期はシーケンスプログラムが1回通り実行されるのに
要する時間よりも長くしなければならない。なお、上記
実施例は入出力ユニット11,12の識別を行わない実
施例であったが、入出力ユニット1 1,12を識別で
きる回路を設け、選択されたユニットが入力ユニット1
1である場合には入力ユニット11からのオンオフ情報
をデータメモリ22,23に書込み、選択されたユニッ
トが出力ユニット12である場合には、データメモリ2
2,23のオンオフ信号を出力ユニットに転送するよう
にしてもよい。
This data memory 40 is a semiconductor memory with the same capacity as the data memories 22 and 23.
The address terminal ADD of is connected to the address output bus AOB, and the data input terminal DI is connected to the data output bus DOB. On the other hand, the data output terminal DO is connected to the logic gate 41 along with the data input bus DIB, and the output of this logic gate 41 is applied to the data input terminal of the arithmetic processing unit 30. This logic gate 41
'The logic gate 41 calculates the logical sum between each bit of two input data and outputs the result.
The on/off information from the output element and the on/off information of the output element stored in the output data memory 40' are output. This makes it possible to test the on/off states of the output elements of the three arithmetic processing units. Further, as in this embodiment, when there is no feedback from the output unit 12, data between the data memories 22, 23 and the input/output units 11, 12 is transferred while the sequence program is executed once. If the exchange is performed more than once, output unit 1
There is a risk that all output elements will be inactive due to the all-zero empty information fed back from 2. For this reason, the period for switching the data memories 22 and 23 and exchanging data must be longer than the time required for executing the sequence program once. Note that although the above embodiment was an embodiment in which the input/output units 11 and 12 were not identified, a circuit that can identify the input/output units 1 and 12 is provided, and the selected unit is the input unit 1.
1, the on/off information from the input unit 11 is written to the data memories 22 and 23, and when the selected unit is the output unit 12, the on/off information from the input unit 11 is written to the data memory 2.
The on/off signals No. 2 and 23 may be transferred to the output unit.

この場合にはデータメモリ22,23を1回通りスキャ
ンニングするだけでデータの交換を行うことができ、デ
ータ交換を短時間に行える。また、演算処理装置30の
データバスAOB,DIB,DOBにリモート10でな
い一般の入出力ユニットを接続すれば1台の演算処理部
でリモート10と一般の10を同時に制御することがで
きる。さらに、上記実施例において、データメモリ22
,23と入出力ユニット11,12との間の転送をパラ
レルで行っていたが、これをシリアル転送で行うように
してもよい。以上述べたように本発明のシーケンスコン
トローラにおいては、データメモリを2組設け、この2
組のデータメモリを演算処理装置の入出力用バスラィン
と入出力ユニットとに交互にかつ相反的に接続するよう
に構成したので、データメモリと入出力ユニットとの間
でのオンオフデータの交換は、メモリの切換時を除いて
常時行うことができ、交換すべきオンオフ情報が多数あ
る場合でも、そのデータ交換を短時間で行える利点があ
る。
In this case, data can be exchanged by scanning the data memories 22 and 23 once, and data can be exchanged in a short time. Furthermore, if a general input/output unit other than the remote 10 is connected to the data buses AOB, DIB, and DOB of the arithmetic processing unit 30, the remote 10 and the general 10 can be controlled simultaneously by one arithmetic processing unit. Furthermore, in the above embodiment, the data memory 22
, 23 and the input/output units 11 and 12 is performed in parallel, but it may also be performed in serial. As described above, in the sequence controller of the present invention, two sets of data memories are provided, and these two sets of data memories are provided.
Since the two data memories are connected alternately and reciprocally to the input/output bus line of the processing unit and the input/output unit, on/off data exchange between the data memory and the input/output unit is easy. This has the advantage that it can be performed at all times except when switching memories, and even when there is a large amount of on/off information to be exchanged, the data can be exchanged in a short time.

また、本発明においては、全ての入出力要素に対応した
オンオフ信号をデータメモリから入出力ユニットに送出
し、この後で、全ての入出力要素のオンオフ情報を入出
力ユニットから読込んでデータメモリに書込むデータ交
換手段を備えているので、演算処理部がデータメモリに
書込んだオンオフ情報が、入出力ユニットに転送される
前に、入出力ユニットから謙込まれたオンオフ情報によ
って破壊されることがなく、各番地に接続されたユニッ
トが入力ユニットであるのか出力ユニットであるのかを
判別してオンオフ情報の転送を行わなくてもよい。
Further, in the present invention, on/off signals corresponding to all input/output elements are sent from the data memory to the input/output unit, and after this, on/off information of all the input/output elements is read from the input/output unit and stored in the data memory. Since it is equipped with a writing data exchange means, the on/off information written by the arithmetic processing unit to the data memory is not destroyed by the on/off information stored from the input/output unit before being transferred to the input/output unit. There is no need to determine whether the unit connected to each address is an input unit or an output unit and transfer on/off information.

したがって、入力ユニットと出力ユニットを任意の番地
に自由な比率で接続できる利点がある。
Therefore, there is an advantage that the input unit and the output unit can be connected to any address in any ratio.

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

第1図は本発明の第1実施例を示すブロック図、第2図
は第1図のシーケンスコントローラのデータ交換動作を
説明するためのフローチャート。 第3図はデータメモリ22,23に対して行われるデー
タ処理の変化を表わすタイムチャート、第4図は本発明
の第2実施例を示すブロック図である。11……入力ユ
ニット、12……出力ユニット、21・・・・・・演算
処理部、22,23・・・・・・データメモリ、24・
・・・・・データ交換回路、24・・・・・・アドレス
データ、30・・・・・・演算処理装置、31・・・・
・・プログラムメモリ、32……プログラムカウンタ、
34・・・・・・クロツク発生回路、35・・・・・・
入出力アドレスカウンタ、40……出力データメモリ、
41…・・・論理ゲート、AGI〜AG6・・・・・・
アンドゲート、FFI〜FF4・・・・・・フリツプフ
ロツプ、GI〜GI2……ゲート、OGI〜OG7……
オアゲート。 図 下 オ2図 図 〜 下 図 寸 七
FIG. 1 is a block diagram showing a first embodiment of the present invention, and FIG. 2 is a flowchart for explaining the data exchange operation of the sequence controller shown in FIG. 1. FIG. 3 is a time chart showing changes in data processing performed on the data memories 22 and 23, and FIG. 4 is a block diagram showing a second embodiment of the present invention. 11... Input unit, 12... Output unit, 21... Arithmetic processing unit, 22, 23... Data memory, 24...
...Data exchange circuit, 24...Address data, 30...Arithmetic processing unit, 31...
...Program memory, 32...Program counter,
34...Clock generation circuit, 35...
Input/output address counter, 40...output data memory,
41...Logic gate, AGI~AG6...
AND gate, FFI~FF4...Flip-flop, GI~GI2...gate, OGI~OG7...
Orgate. Diagram below: Diagram 2 - Diagram below: Dimensions:

Claims (1)

【特許請求の範囲】[Claims] 1 プログラムメモリに記憶されたシーケンスプログラ
ムを実行する演算処理部と、リミツトスイツチ等の入力
要素およびリレー等の出力要素が接続された入出力ユニ
ツトと、この入出力ユニツトと前記演算処理部との間に
設けられたデータメモリと、このデータメモリと前記入
出力ユニツトとの間でオンオフ情報を交換するデータ交
換手段とから成るシーケンスコントローラにおいて、前
記演算処理部に接続された入出力用のバスラインと、前
記入出力ユニツトに接続される入出力要素の各アドレス
に対応した記憶エリアを有する2組のデータメモリと、
少なくとも前記演算処理部によるシーケンスプログラム
の読出し実行時間よりも長い時間間隔で信号を出力する
タイミング信号発生手段と、このタイミング信号発生手
段からの信号によつてゲートの切換えを行い一方のデー
タメモリが前記入出力用バスラインに接続されている期
間は他方のデータメモリが入出力ユニツトに接続され他
方のデータメモリが前記入出力用バスラインに接続され
ている期間は前記一方のデータメモリが入出力ユニツト
に接続されるようにするメモリ切換手段と、前記データ
メモリの切換えが行われる度に全ての入出力要素に対応
したオンオフ信号を前記データメモリから前記入出力ユ
ニツトに送出し、この後で、全ての入出力要素のオンオ
フ情報を前記入出力ユニツトから読込んで前記データメ
モリに書込むデータ交換手段とを設けたことを特徴とす
るシーケンスコントローラ。
1. An arithmetic processing unit that executes a sequence program stored in a program memory, an input/output unit to which input elements such as limit switches and output elements such as relays are connected, and a connection between this input/output unit and the arithmetic processing unit. In a sequence controller comprising a data memory provided and a data exchange means for exchanging on/off information between the data memory and the input/output unit, an input/output bus line connected to the arithmetic processing section; two sets of data memories each having a storage area corresponding to each address of an input/output element connected to the input/output unit;
a timing signal generating means for outputting a signal at a time interval longer than at least the reading execution time of the sequence program by the arithmetic processing section; and a gate switching by the signal from the timing signal generating means so that one data memory is in front of the other. During the period when the other data memory is connected to the input/output bus line, the other data memory is connected to the input/output unit, and during the period when the other data memory is connected to the input/output bus line, the one data memory is connected to the input/output unit. memory switching means for connecting to the input/output unit, and sending on/off signals corresponding to all input/output elements from the data memory to the input/output unit each time the data memory is switched; A sequence controller comprising: data exchange means for reading on/off information of input/output elements from the input/output unit and writing it into the data memory.
JP15701277A 1977-12-26 1977-12-26 sequence controller Expired JPS6027401B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15701277A JPS6027401B2 (en) 1977-12-26 1977-12-26 sequence controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15701277A JPS6027401B2 (en) 1977-12-26 1977-12-26 sequence controller

Publications (2)

Publication Number Publication Date
JPS5489173A JPS5489173A (en) 1979-07-14
JPS6027401B2 true JPS6027401B2 (en) 1985-06-28

Family

ID=15640240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15701277A Expired JPS6027401B2 (en) 1977-12-26 1977-12-26 sequence controller

Country Status (1)

Country Link
JP (1) JPS6027401B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5815203U (en) * 1981-07-16 1983-01-31 オムロン株式会社 programmable controller
JPS638804A (en) * 1986-06-27 1988-01-14 Koyo Denshi Kogyo Kk Programmable controller

Also Published As

Publication number Publication date
JPS5489173A (en) 1979-07-14

Similar Documents

Publication Publication Date Title
KR100549910B1 (en) Flash memory access using a plurality of command cycles
US4298928A (en) Data transfer system for data exchange between two operation processors
CA2061599A1 (en) Storage-programmable control system
JPH06202942A (en) Flash memory circuit and operation method
JPH0130161B2 (en)
US5388230A (en) Parallel processor having multi-processing units either connected or bypassed in either series or parallel by the use of bus switching
US6629165B1 (en) Programmable controller including intelligent module
US4839852A (en) Programmable controller with self testing I/O structure
JPS6027401B2 (en) sequence controller
JPH0687221B2 (en) Information processing equipment
JPS6232483B2 (en)
JPS5925320B2 (en) Shared storage controller
JPS5948402B2 (en) sequence controller
JP2522412B2 (en) Communication method between programmable controller and input / output device
JPS5882304A (en) Programmable controller
EP0216336B1 (en) Programmable controller with self testing i/o structure
JPH0139123B2 (en)
JP2940722B2 (en) Development support system
JPS6144327B2 (en)
JPH0736178B2 (en) Memory controller
JPH035602B2 (en)
JP2507634B2 (en) Information processing device
KR100492985B1 (en) How to Control Working Register Blocks and Working Register Blocks for Microcontrollers or Microprocessors
JP3144979B2 (en) Program processing device and processing method
JPH0335335A (en) Storage device