JPH0827646B2 - Sequence Controller - Google Patents
Sequence ControllerInfo
- Publication number
- JPH0827646B2 JPH0827646B2 JP62-506079A JP50607987A JPH0827646B2 JP H0827646 B2 JPH0827646 B2 JP H0827646B2 JP 50607987 A JP50607987 A JP 50607987A JP H0827646 B2 JPH0827646 B2 JP H0827646B2
- Authority
- JP
- Japan
- Prior art keywords
- signal
- output
- outputting
- arithmetic processing
- interrupt
- 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 - Lifetime
Links
Landscapes
- Programmable Controllers (AREA)
Description
【発明の詳細な説明】
技術分野
本発明はシーケンスをサイクリックに実行するものに
於いて、割り込み要因が発生した場合に、割り込み処理
が可能なシーケンスコントローラに関するものである。Description: TECHNICAL FIELD The present invention relates to a sequence controller that cyclically executes a sequence and that is capable of performing interrupt processing when an interrupt factor occurs.
背景技術
プログラマブルシーケンサとして、外部から入力信号
が入る毎にシーケンスプログラムに基ずいて論理演算を
進める工程歩進型のものと、入力信号の到来に関係無
く、タイミング信号に同期してシーケンスプログラムに
基ずいて論理演算を実行するサイクリック型のものとが
ある。工程歩進型のもは比較的入力・出力点数の少ない
ものにのみ使用されており、それゆえ割り込み処理のよ
うな機能が要求されることは少ない。BACKGROUND ART There are two types of programmable sequencers: step-by-step type, which performs logical operations based on a sequence program each time an external input signal is received, and cyclic type, which executes logical operations based on a sequence program in synchronization with a timing signal regardless of the arrival of an input signal. Step-by-step type is used only in devices with a relatively small number of inputs and outputs, and therefore functions such as interrupt processing are rarely required.
サイクリック型のものは、シーケンスプログラムの長
さによってシーケンスプログラム、1サイクルの実行に
要する時間が左右されるが、最近では100ミリセコンド
を越えるようなシーケンスプログラムもある。つまり、
このようなものではシーケンスプログラムの夫々のステ
ップは、100ミリセコンドに1回だけしか実行されない
ことになる。しかし、入力信号によっては、例えば異常
の発生を知らせる信号が入った場合などは、次のスキャ
ニングが行なわれるまで、異常発生に対応した処理を待
てない場合がある。この様な場合に備えて割り込み処理
機能が要求されるのである。 In the case of cyclic type, the time required to execute one cycle of a sequence program depends on the length of the sequence program, but recently there are sequence programs that take more than 100 milliseconds.
In such a system, each step in the sequence program is executed only once every 100 milliseconds. However, depending on the input signal, for example, if a signal indicating the occurrence of an abnormality is received, it may not be possible to wait until the next scanning to process the abnormality. An interrupt processing function is required to handle such cases.
ところで入力・出力点数が多くなると、割り込み処理
の要求される入力信号は数10点におよぶことがある。 However, when the number of input and output points increases, the number of input signals requiring interrupt processing can reach several tens of points.
このような場合に、どの割り込み信号が入ったのかを
解析するのに時間がかかりすぎたのでは、せっかく割り
込み要求信号が入力されても、対応の遅れる心配があ
る。 In such a case, if it takes too much time to analyze which interrupt signal has been received, there is a risk that the response will be delayed even if an interrupt request signal has been received.
なお、割り込み処理機能を有するものとして実開昭57
−198645号や特開昭62−145329号公報に示してあるもの
が知られている。 In addition, the Japanese Utility Model Laid-Open Publication No. 1982 is known to have an interrupt processing function.
Those disclosed in Japanese Patent Application Laid-Open No. 62-145329 are known.
発明の開示
本発明はこの様な点に鑑み成されたものであって、そ
の主な目的とするところは、短い時間で割り込みを解析
できるシーケンスコントローラを提供することにある。DISCLOSURE OF THE INVENTION The present invention has been made in view of the above points, and its main object is to provide a sequence controller that can analyze an interrupt in a short time.
本発明の他の目的は、割り込みを要求される信号の入
力端子を比較的自由に設定出来るシーケンスコントロー
ラを提供することにある。 Another object of the present invention is to provide a sequence controller that allows relatively free setting of the input terminal for a signal that requests an interrupt.
本発明は、シーケンスプログラムを記憶するプログラ
ム記憶手段と、複数のブロックに別れており、更に前記
ブロック内の少なくとも1つは複数のグループに別れて
おり、その夫々に複数ずつ設けてある外部信号入力端子
と、タイミング信号を発生するタイミング信号発生部を
備えており、そのタイミング信号に同期し、プログラム
記憶手段から読み出したシーケンスプログラムの指示に
従って、外部信号入力端子から取り入れた外部信号を含
む複数の信号同志の論理演算を行なう演算処理手段と、
この演算処理手段の演算結果に応じた制御信号を出力す
る出力手段とを有するプログラマブルシーケンスコント
ローラに於いて、次のように構成したことを特徴とする
ものである。 The present invention comprises a program storage means for storing a sequence program, a calculation processing means divided into a plurality of blocks, at least one of which is further divided into a plurality of groups, each of which is provided with a plurality of external signal input terminals and a timing signal generating section for generating timing signals, and which performs logical operations on a plurality of signals including external signals input from the external signal input terminals in accordance with instructions of the sequence program read from the program storage means, in synchronization with the timing signals;
The programmable sequence controller has an output means for outputting a control signal according to the calculation result of the calculation processing means, and is characterized by the following configuration.
すなわち、グループに割り込み処理を要求する要因が
発生したときには、第1信号を出力する第1信号発生手
段と、ブロック内のいずれかが第1信号を出力している
ときには第2信号を出力する第2信号発生手段と、ブロ
ックの何れかに第2信号が出たときには、そのことを演
算処理手段に伝達する第2信号発生伝達手段と、演算処
理手段が第2信号発生伝達手段から第2信号が出ている
ことを伝達されたときには、演算処理手段はシーケンス
プログラムに基ずく論理演算の実行を中止し、夫々の第
2信号発生手段内を順次アクセスし、第2信号が出てい
るブロックを見つけたときには、そのブロックに属する
第1信号発生手段を順次アクセスするアクセス手段とを
有しており、そして、第1信号を出力しているグループ
を特定するように構成してある。 That is, the system has first signal generating means for outputting a first signal when a factor requiring interrupt processing occurs in a group, second signal generating means for outputting a second signal when any one of the blocks is outputting the first signal, second signal generating and transmitting means for transmitting the fact to the arithmetic processing means when the second signal is output in any of the blocks, and accessing means for sequentially accessing the first signal generating means belonging to a block when the arithmetic processing means is notified by the second signal generating and transmitting means that the second signal has been output, and for sequentially accessing the first signal generating means belonging to that block when the arithmetic processing means finds a block from which the second signal is output, and is configured to identify the group outputting the first signal.
タイミング信号発生部は、これが発生するタイミング
信号に同期してメモリアドレス信号を出力するプログラ
ムカウンタで構成し、演算処理手段はそのメモリアドレ
ス信号に関係して、プログラム記憶手段から読み出した
シーケンスプログラムの指示に従って、外部信号入力端
子から取り入れた外部信号を含む複数の信号同志の論理
演算を、行なうように構成することができる。 The timing signal generating section is composed of a program counter which outputs a memory address signal in synchronization with the timing signal generated by the timing signal generating section, and the arithmetic processing means can be configured to perform logical operations on a plurality of signals, including an external signal taken in from an external signal input terminal, in relation to the memory address signal and in accordance with instructions from a sequence program read from the program storage means.
第1信号発生手段は外部信号入力端子の特定の端子に
信号が入っているときに、第1信号を出力するように構
成することができる。 The first signal generating means can be configured to output a first signal when a signal is input to a specific terminal of the external signal input terminal.
そのために、外部信号入力端子の特定の端子が、割り
込み信号入力端子であることを指定する指定手段を設け
ることができる。この指定手段は特定のグループの外部
信号入力端子の全体を割り込み信号入力端子として指定
することも、またグループ内の特定の端子を割り込み信
号入力端子として指定することも可能である。 For this purpose, a designation means can be provided for designating a specific terminal of the external signal input terminals as an interrupt signal input terminal. This designation means can designate all of the external signal input terminals in a specific group as interrupt signal input terminals, or can designate a specific terminal within the group as an interrupt signal input terminal.
また外部信号入力端子に入った信号だけではなく、グ
ループ内で生じた信号も割り込み信号として扱うことが
可能である。 In addition to signals input to external signal input terminals, signals generated within a group can also be treated as interrupt signals.
図面の簡単な説明
第1図は本発明シーケンスコントローラの実施例を示
すブロックダイアグラムである。BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an embodiment of a sequence controller according to the present invention.
第2図は第1図に示したシーケンスコントローラの要
部の回路図である。 FIG. 2 is a circuit diagram of the main part of the sequence controller shown in FIG.
該3図は第2図に示した割り込みステイタスレジスタ
およびデータステイタスレジスタのゲートの開く順序を
示す図である。 FIG. 3 shows the order in which the gates of the interrupt status register and data status register shown in FIG. 2 are opened.
第4図は第2図に示した指定手段を構成しているフリ
ップフロップの設定状態を示す図である。 FIG. 4 is a diagram showing the setting state of the flip-flops constituting the designation means shown in FIG.
第5図は第2図に示した割り込みステイタスレジスタ
のゲートを開いたときに得られる各ビットの信号状態を
示す図である。 FIG. 5 is a diagram showing the signal state of each bit obtained when the gate of the interrupt status register shown in FIG. 2 is opened.
第6図は本発明コントローラの動作を示すフローチャ
ートである。 FIG. 6 is a flowchart showing the operation of the controller of the present invention.
第7図は第6図に示したステップSt4の、より詳細な
ステップを示す図である。 FIG. 7 is a diagram showing more detailed steps of step St4 shown in FIG.
第8図は本発明の変形実施例を示す回路図である。FIG. 8 is a circuit diagram showing a modified embodiment of the present invention.
第9図は本発明の更に異なる変形実施例を示す回路図
である。 FIG. 9 is a circuit diagram showing yet another modified embodiment of the present invention.
発明を実施するための最良の形態
全体を1で示すシーケンスコントローラは基本ユニッ
ト2と複数個(図では2つ)の入出力インタフェースブ
ロック3a,3bとで構成してある。入出力インタフェース
ブロック3a,3bは基本ユニット2に対して増設ユニット
ともいわれており、入出力点数に見合ったユニット数が
一定数の枠内で、基本ユニット2に接続できるように構
成してある。BEST MODE FOR CARRYING OUT THE INVENTION The sequence controller, generally designated by 1, is composed of a basic unit 2 and multiple (two in the figure) input/output interface blocks 3a and 3b. The input/output interface blocks 3a and 3b are also called expansion units for the basic unit 2, and are configured so that a number of units corresponding to the number of input/output points can be connected to the basic unit 2 within a certain limit.
基本ユニット2は演算処理手段としての中央演算処理
装置21とプログラム記憶手段としてのプログラムメモリ
22とで構成してある。中央演算処理装置21は更にプログ
ラムカウンタ21aと、演算処理部21bと、全体制御部21c
と、入出力制御部21dとを有している。プログラムメモ
リ22にはユーザーのシーケンスプログラムが記憶してあ
る。プログラムカウンタ21aは一定の周期でタイミング
信号を発生し、このタイミング信号に同期してメモリア
ドレス信号を出力するように構成してある。演算処理部
21bはプログラムメモリ22内のシーケンスプログラム
の、プログラムカウンタ21aからのメモリアドレス信号
で指定されたアドレス内の指示に従ってブロック3a,3b
から取り入れた外部情報を含む複数の信号同志の論理演
算処理を行なう、論理演算の結果はブロック3a,3b内の
出力モジュールO11,O12の出力端子に出力する。入出力
制御部21dはブロック3a,3bからの中央演算処理装置21へ
の信号の取り込み及び中央演算処理装置21からブロック
3a,3bへの信号の送出を、シーケンスプログラムからの
指令に基づいて制御する。全体制御部21cはシステムメ
モリを内蔵しており、中央演算処理装置21全体を統括制
御する。具体的には例えばシーケンスコントローラ1全
体の始動・停止入力を取り込み、プログラムカウンタ21
aのイニシャライズ、演算処理部21bの始動・停止を指令
する。更にブロック3a,3bからの緊急処理要求である入
出力割り込み要求を受け付け、その要因解析、演算処理
内容の変更などの割込処理を実行指令する。 The basic unit 2 includes a central processing unit 21 as a processing means and a program memory as a program storage means.
The central processing unit 21 further comprises a program counter 21a, a processing unit 21b, and an overall control unit 21c.
and an input/output control unit 21d. A user's sequence program is stored in the program memory 22. The program counter 21a generates a timing signal at a fixed cycle and outputs a memory address signal in synchronization with this timing signal.
21b executes the blocks 3a and 3b according to the instruction in the address specified by the memory address signal from the program counter 21a in the sequence program in the program memory 22.
The input/output control unit 21d takes in signals from the blocks 3a and 3b to the central processing unit 21 and outputs signals from the central processing unit 21 to the blocks 3a and 3b.
The overall control unit 21c has a built-in system memory and controls the overall central processing unit 21. Specifically, for example, it takes in start/stop inputs for the entire sequence controller 1 and controls the program counter 21.
It also receives input/output interrupt requests, which are urgent processing requests from the blocks 3a and 3b, and issues commands to execute interrupt processing such as analyzing the cause and changing the content of the processing.
ブロック3aは、入力モジュールIa1,Ia2と出力モジュ
ールOa1,Oa2とで構成してあり、ブロック3bは入力モュ
ールIb1,Ib2,Ib3と出力モジュールOb1とで構成してあ
る。夫々の入力モジュールIa1,Ia2,Ib1,Ib2,Ib3はt1〜t
nで示す外部信号入力端子を夫々有している。入力モジ
ュールIa1,〜Ib3はこれ等の端子に入った信号の電圧レ
ベルを一定値に変換し、且つ信号が入ると次、にその端
子の入力信号がアクセスされるまで、信号が入ったこと
が分かるようにラッチする機能を有している。夫々の出
力モジュールOa1〜Ob1もまたt1〜tnで示す信号出力端子
を夫々有している。出力モジュールOa1〜Ob1はこれ等の
端子から出力する信号を、必要な電圧レベルで必要な電
圧形態(直流又は交流)に変換し、且つ次にその端子の
出力信号がアクセスされるまで、ラッチする機能とを有
している。夫々ラッチと信号変換機能を備えた回路がia
1′,ia2′…ib3′,oa1′−−−ob1′で示してある。以
上から信号入力端子はブロック3a,3bで示す複数のブロ
ックに別れており、更に前記ブロック内の少なくとも1
つ(実施例の場合は両方共)はIa1〜Ib3で示す複数のグ
ループに別れており、その夫々に複数づつ設けてあるこ
とが分かる。 The block 3a is composed of input modules Ia1 and Ia2 and output modules Oa1 and Oa2, and the block 3b is composed of input modules Ib1, Ib2, and Ib3 and output module Ob1.
Each of the output modules Oa1 to Ob1 has an external signal input terminal indicated by t1 to tn. The input modules Ia1 to Ib3 convert the voltage level of the signal input to these terminals to a constant value, and when a signal is input, have the function of latching it so that it is known that a signal has been input until the next time the input signal of that terminal is accessed. Each of the output modules Oa1 to Ob1 also has a signal output terminal indicated by t1 to tn. The output modules Oa1 to Ob1 convert the signals output from these terminals to the required voltage form (DC or AC) at the required voltage level, and have the function of latching it until the next time the output signal of that terminal is accessed. Each of the circuits equipped with a latch and signal conversion function is ia.
From the above, the signal input terminals are divided into a plurality of blocks shown as blocks 3a and 3b, and at least one of the blocks
It can be seen that the first (both in the embodiment) are divided into a plurality of groups indicated by Ia1 to Ib3, and that a plurality of units are provided in each group.
入出力制御部21dとブロック3a,3bとはアドレスバスB
a,Baa,Bab,データバスBd,Bda,Bdb,及び割り込み信号伝
達線Bi,Bia,Bibを介して接続してある。 The input/output control unit 21d and the blocks 3a and 3b are connected by an address bus B
a, Baa, Bab, data buses Bd, Bda, Bdb, and interrupt signal transmission lines Bi, Bia, Bib.
この割り込み信号伝達線Bi,Bia,Bibは、割り込み信号
だけを伝達するのであれば,1ビット情報だけが送れれば
良い。 If the interrupt signal transmission lines Bi, Bia, and Bib are to transmit only interrupt signals, it is sufficient for them to transmit only 1-bit information.
データバスBda,Bdbの途中には双方向バスドライバDaD
bが設けてあり、中央演算処理装置21からのゲート信号
に依ってゲートが開閉するように構成してある。またア
ドレスバスBaa,BabにはアドレスデコーダAda,Adbが設け
てある。このアドレスデコーダAda.Adbの出力は第2図
に示したデータ出力切換部Ca1,Ca2,Cb1,Cb2に入力され
るようになっている。Ca1,Ca2,Cb1,Cb.2は夫々割込ステ
イタスレジスタSia,SibとデータステイタスレジスタSd
a,Sdbに信号を送るように構成してある。 The bidirectional bus driver DaD is located between the data buses Bda and Bdb.
b are provided, and the gates are configured to open and close in response to gate signals from the central processing unit 21. Address buses Baa and Bab are also provided with address decoders Ada and Adb. The outputs of these address decoders Ada and Adb are input to data output switching units Ca1, Ca2, Cb1 and Cb2 shown in FIG. 2. Ca1, Ca2, Cb1 and Cb2 are respectively connected to interrupt status registers Sia and Sib and data status register Sd.
a,It is configured to send a signal to Sdb.
中央演算処理装置21は割り込み信号伝達線Biを介して
割り込み処理を必要とする情報を受け取ったときはアド
レスデコーダAda,Adbが第3図に示した順序でデータ出
力切代部Ca1,Ca2,Cb1,Cb2を切り換えるように制御す
る。つまり、最初は入力モジュールIa1の割込ステイタ
スレジスタSiaゲートを開き、次にはそのゲートを閉
じ、代わって入力モジュールIa2の割込ステイタスレジ
スタSiaゲートを開く。次にそのゲートを閉じ、入力モ
ジュールIb1のゲートを開く。以下このようにしてIb3の
ゲートを開き、次にこのゲートを閉じて入力モジュール
Ia1のデータステイタスレジスタSbaのゲートを開く。次
には、そのゲートを閉じ、代わってIa2のSdaゲートを開
く。以下このようにして順次Sdbのゲートを順次1つづ
つ開く。 When the central processing unit 21 receives information requiring interrupt processing via the interrupt signal transmission line Bi, it controls the address decoders Ada and Adb to switch the data output switches Ca1, Ca2, Cb1, and Cb2 in the order shown in Figure 3. That is, first, it opens the gate of the interrupt status register Sia of the input module Ia1, then it closes that gate and opens the gate of the interrupt status register Sia of the input module Ia2 instead. Next, it closes that gate and opens the gate of the input module Ib1. In this way, it opens the gate of Ib3, then it closes that gate and opens the gate of the input module Ib2.
The gate of the data status register Sba of Ia1 is opened. Next, that gate is closed and the Sda gate of Ia2 is opened instead. In this manner, the gates of Sdb are opened one by one in sequence.
しかし割り込みステイタスレジスタSia,Sibのゲート
を開いた結果、その時いずれかの割込ステイタスレジス
タSia,Sibから割込を要求する第1信号が検出される
と、中央演算処理装置21はそれ以降の割り込みステイタ
スレジスタSia,Sibのゲートを開くのを止め、今後はブ
ロック3a,3bのうち、割込を要求する信号が検出された
ブロックの中のデータステイタスレジスタSda,Sdbのゲ
ートを開くようにジャンプする。 However, if, as a result of opening the gates of the interrupt status registers Sia and Sib, a first signal requesting an interrupt is detected from either of the interrupt status registers Sia and Sib at that time, the central processing unit 21 stops opening the gates of the interrupt status registers Sia and Sib thereafter, and instead jumps to open the gates of the data status registers Sda and Sdb in either of the blocks 3a and 3b in which the signal requesting an interrupt was detected.
さて第2図は紙面の大きさの関係で夫々のブロックあ
たり2つの入出力モジュールIa1,Ia2,Ib1,Ib2だけが図
示してある。本発明の構成及び動作を説明するのには充
分である。 2, due to the size of the paper, only two input/output modules Ia1, Ia2, Ib1, and Ib2 are shown for each block, which is sufficient for explaining the configuration and operation of the present invention.
入出力モジュールIa1〜Ib3のラッチ回路ia1′,ia2′
−−−ib2′の出力は、夫々論理和回路OR1に入力されて
いる。論理和回路OR1の出力は夫々割り込みステイタス
レジスタSia、Sibに入力される。割り込みステイタスレ
ジスタSia,Sibにはこの他、割り込み信号伝達線Bia,Bib
上の信号を否定回路Nを介して入力してある。 Latch circuits ia1' and ia2' of input/output modules Ia1 to Ib3
The outputs of the OR circuits OR1 and OR2' are input to the interrupt status registers Sia and Sib, respectively. The interrupt status registers Sia and Sib also have interrupt signal transmission lines Bia and Bib.
The above signal is input via a NOT circuit N.
一方論理和回路OR1の出力は夫々否定論理積回路(NAN
D回路)NAで指定手段の一部を構成しているフリップフ
ロップFa1〜Fb3(図にはFa1,Fa2,Fb1,Fb2のみが示して
ある)の出力と論理演算される。否定論理積回路NAの出
力端子に生じる信号が第1信号である。 On the other hand, the outputs of the OR circuit OR1 are NAND circuits (NAN
The NAND circuit NA performs a logical operation with the outputs of flip-flops Fa1 to Fb3 (only Fa1, Fa2, Fb1, and Fb2 are shown in the figure) that constitute part of the designation means. The signal generated at the output terminal of the NAND circuit NA is the first signal.
第1信号は夫々割り込み信号伝送線Bia,Bibに接続さ
れている。割り込み信号伝送線Bia,Bibは通常は抵抗r
を介して5Vを与えられているので通常は2進信号を“H"
と“L"であらわせばHレベルになっているが、否定論理
積回路NAから割り込み処理が要求されたことを示す信号
が出るとLレベルとなる。 The first signal is connected to the interrupt signal transmission lines Bia and Bib, respectively. The interrupt signal transmission lines Bia and Bib are usually connected to resistors r
Since 5V is given through the
When the NAND circuit NA outputs a signal indicating that an interrupt process has been requested, the signal goes to L level.
さて、ここで指定手段について詳しく説明する。フリ
ップフロップFa1〜Fb3は全入力モジュールに設けられて
おり、これ等は運転を開始する前のイニシャライズ処理
に依って、中央演算処理装置21から第4図に示すデータ
が、データバスBdを介して送られ、割込処理を受け入れ
る入力モジュールのフリップフロップ出力はHに、割込
処理を受け入れない入力モジュールのフリップフロップ
出力はLにラッチされる。第4図は入力モジュールIa1,
Ib1,Ib2は割込処理を受けられるが、Ia2,Ib3は割込処理
は受け入れないことを示している。 Now, the designation means will be explained in detail. Flip-flops Fa1 to Fb3 are provided in all input modules, and by initialization processing before starting operation, the data shown in Fig. 4 is sent from the central processing unit 21 via the data bus Bd, and the flip-flop outputs of input modules that accept interrupt processing are latched to H, and the flip-flop outputs of input modules that do not accept interrupt processing are latched to L. Fig. 4 shows input modules Ia1,
Ib1 and Ib2 indicate that they can receive interrupt processing, but Ia2 and Ib3 indicate that they cannot accept interrupt processing.
以上のことから、入力モジュールIa2内の否定論理積
回路NAの出力は常にHであり、入力モジュールIa2内の
入力端子t1〜tnのいずれに信号が入っても、これは割込
信号として受け入れられないことが理解できるであろ
う。 From the above, it can be understood that the output of the NAND circuit NA in the input module Ia2 is always H, and that no matter which signal is input to any of the input terminals t1 to tn in the input module Ia2, it will not be accepted as an interrupt signal.
さて、ブロック3a,3b内のいずれかのモジュールから
割込処理を要求する信号が出力されると、そのモジュー
ルが属しているブロックの割込信号伝送線Bia,BibがL
レベルとなる。この状態はワンウェイゲートGa,Gb、割
込信号伝送線Biを介して、基本ユニット2に伝送される
ようになっている。つまり、ワンウェイゲートGa,Gbの
出力が第2信号である。 Now, when a signal requesting interrupt processing is output from any module in the blocks 3a and 3b, the interrupt signal transmission lines Bia and Bib of the block to which that module belongs become L.
This state is transmitted to the basic unit 2 via the one-way gates Ga and Gb and the interrupt signal transmission line Bi. In other words, the outputs of the one-way gates Ga and Gb are the second signals.
いずれかのブロック3a,3bから第2信号が出力される
と、基本ユニット2はに割込要求が出たことを知ること
ができるが、その要求がブロック3a,3bのうちのどちら
のブロックの、どのモジュールから出たものであるかは
まだわからない。 When the second signal is output from either block 3a or 3b, the basic unit 2 knows that an interrupt request has been issued, but it does not yet know which of the blocks 3a or 3b the request came from, or which module.
そこで、直ちにシーケンスプログラムに基づく論理演
算の実行を中止し、代わって第3図に示した順序でゲー
トを開いて行く。いま入力モジュールIb1の端子t1に割
込処理を要求する信号が入ったとすれば、Ia1内のSiaの
ゲートを開いたときには、第5図のa1に示す情報がデー
タバスBda及びBdを介して基本ユニット2に取り込まれ
る。このときはモジュールIa1の否定論理積回路NAの出
力もOR1の出力も共にLであるから、モジュールIa1から
は勿論、このブロック内のいずれのモジュールからも割
込要求信号が出力されていないことが分かる。従って、
そのゲートを閉じ代わって次のブロックのゲート、つま
りモジュールIb1内のSibのゲートを開く。このゲートを
開いたときの状態は第5図のb1に示したように0ビット
目はHで,1ビット目は共にLである。否定論理積回路NA
の1ビット目のの出力がLであるときには、そのブロッ
クから割込要求が出ていることが分かり、OR1の出力が
Hのときはそのモジュールから信号が出ていることが分
かるので、結局この割込処理を要求する信号はプロック
3bの入力モジュールIb1から出たことが、基本ユニット
2内で認識できる。この認識が終了すると、今度は基本
ユニット2はアドレスバスAdbを介して
データ出力切代部Cb1にSdbのゲートを開く指令を与え
る。これによって、モジュールIb1でt1〜tnの信号をラ
ツチした出力は、データバスBdb,Bdを介して基本ユニッ
ト2に伝送されるから、割込要求信号は結局ユニットIb
1内の入力端子t1に入ったことが認識される。従って基
本ユニット2は、この認識に基づく処理を行なう。 Therefore, the execution of logical operations based on the sequence program is immediately stopped, and instead the gates are opened in the order shown in Figure 3. If a signal requesting interrupt processing is now input to terminal t1 of input module Ib1, when the gate of Sia in Ia1 is opened, the information shown in a1 in Figure 5 is taken into basic unit 2 via data buses Bda and Bd. At this time, the output of NAND circuit NA and the output of OR1 in module Ia1 are both L, so it can be seen that no interrupt request signal is being output from module Ia1, or any other module in this block. Therefore,
The gate is closed and the gate of the next block, that is, the gate of Sib in module Ib1, is opened instead. When this gate is opened, the 0th bit is H and the 1st bit is L, as shown in b1 of Figure 5. NAND circuit NA
When the output of the first bit of OR1 is L, it is understood that an interrupt request has been issued from that block, and when the output of OR2 is H, it is understood that a signal has been issued from that module, so in the end, the signal requesting this interrupt processing is
The interrupt request signal is then sent to the basic unit 2 via the data bus Bdb and Bd.
It is recognized that the signal has entered the input terminal t1 in the basic unit 1. Therefore, the basic unit 2 performs processing based on this recognition.
なお第5図のa2,b2は夫々モジュールIa2,Ib2の割り込
みステイタスレジスタSia,Sibを開くと得られる信号状
態である。第5図のa2に示したように0ビット目はL又
はHとなるが、Hとなっているときもフリップフロップ
Fa2の出力がLである関係で、このモジュールIa2の端子
t1〜tnは割込要求信号とはならない。 Note that a2 and b2 in Figure 5 are the signal states obtained by opening the interrupt status registers Sia and Sib of the modules Ia2 and Ib2, respectively. As shown in a2 in Figure 5, the 0th bit is either L or H, but even when it is H, the flip-flop
Since the output of Fa2 is L, the terminal of this module Ia2
t1 to tn do not become interrupt request signals.
第6図,第7図は動作を説明するためのフローであ
る。スタートののちSt1ではイニシャライズが行なわれ
る。このときに第4図で説明したフリップフロップFa1
〜Fb3のセツトが行なわれる。 6 and 7 are flowcharts for explaining the operation. After the start, initialization is performed in St1. At this time, the flip-flop Fa1 explained in FIG.
~Fb3 is set.
St2ではシーケンスプログラムに基づいた処理が行な
われる。つまり、基本ユニット2は所定の入力モジュー
ル内にラッチしてある信号入力端子の情報を取込み、シ
ーケンスプログラムに応じた論理演算を実行して、その
結果を出力モジュール内の所定の出力端子に出力するよ
うにする。このとき時分割で基本ユニット2は割込処理
要求が入ったかどうかをSt3で見ている。もし割込処理
要求が入っていなければSt2に戻り、入っていればSt4に
進む。St4では第5図を見ながら説明した処理を行な
い、その後割込要因が分かったらSt5へ進み、必要な処
理を実行する。 In St2, processing is performed based on the sequence program. In other words, the basic unit 2 takes in information from the signal input terminal latched in a specified input module, performs logical operations according to the sequence program, and outputs the results to a specified output terminal in the output module. At this time, the basic unit 2 checks in St3 in a time-sharing manner to see if an interrupt processing request has been received. If an interrupt processing request has not been received, it returns to St2; if it has, it proceeds to St4. In St4, the processing explained with reference to Figure 5 is performed, and then once the cause of the interrupt is determined, it proceeds to St5 and performs the necessary processing.
St4内の詳細フローが第7図に示してある。これの詳
細は以上行なってきた説明から容易に理解できるであろ
う。なおST43に示す最後のユニットで割込信号を出した
端子が発見できないときは、割り込み信号伝達線Bi,Bi
a,Bibにノイズが入ったことも考えられるので、St2に戻
ることが望ましい。 The detailed flow in ST4 is shown in Figure 7. The details of this will be easily understood from the above explanation. If the terminal that issued the interrupt signal cannot be found in the last unit shown in ST43, the interrupt signal transmission lines Bi, Bi
It is possible that noise has entered a,Bib, so it is advisable to return to St2.
第8図は本発明の異なる実施例である。この実施例で
は割込を要求する信号は信号入力端子t1〜tnの他に、内
部端子t11,t12が設けてある。そして例えばモジュールI
a1内の図示しないマイクロコンピュータに異常が発生し
たようなときは、t11,t12の内の所定の端子に情報を出
力し、例えば外部に異常発生合図を出すのに用いる。 8 shows another embodiment of the present invention. In this embodiment, in addition to the signal input terminals t1 to tn, internal terminals t11 and t12 are provided for signals requesting interrupts. For example, in module I,
If an abnormality occurs in the microcomputer (not shown) in a1, information is output to a predetermined terminal of t11 or t12, which is used to issue a signal to the outside to indicate the occurrence of the abnormality, for example.
第9図は本発明の更に異なる実施例である。この回路
によれば、入力モジュールの入力端子毎に割込処理を要
求する端子と要求しない端子を設定できる。つまり全体
をFa1で示すフリップフロップは入力端子t1〜tnと同数
のフリップフロップ素子F1〜Fnを有している。割込処理
を要求する端子に対応する素子はイニシャライズにおい
てHとされ、要求しないものはLとする。フリップフロ
ップ素子F1〜Fnの出力は各入力端子に入った信号のラッ
チされたものと、論理積回路ANで夫々論理演算される。
N1は否定回路である。 Figure 9 shows yet another embodiment of the present invention. With this circuit, it is possible to set for each input terminal of the input module which terminals require interrupt processing and which do not. That is, the flip-flop indicated as a whole by Fa1 has the same number of flip-flop elements F1 to Fn as the number of input terminals t1 to tn. Elements corresponding to terminals requiring interrupt processing are set to H during initialization, and those not requiring interrupt processing are set to L. The outputs of flip-flop elements F1 to Fn are subjected to logical operations with the latched signals input to each input terminal in logical AND circuit AN.
N1 is a NOT circuit.
Claims (6)
ム記憶手段と、複数のブロックに別れており、更に前記
ブロック内の少なくとも1つは複数のグループに別れて
おり、その夫々に複数ずつ設けてある外部信号入力端子
と、タイミング信号を発生するタイミング信号発生部を
備えており、前記タイミング信号に同期し、前記プログ
ラム記憶手段から読み出した前記シーケンスプログラム
の指示に従って、前記外部信号入力端子から取り入れた
前記外部信号を含む複数の信号同志の論理演算を行なう
演算処理手段と、該演算処理手段の演算結果に応じた制
御信号を出力する出力手段とを有するものに於いて、前
記グループに割り込み処理を要求する要因が発生したと
きには、第1信号を出力する第1信号発生手段と、前記
ブロック内のいずれかが前記第1信号を出力していると
きには第2信号を出力する第2信号発生手段と、前記ブ
ロックの何れかに前記第2信号が出たときには、そのこ
とを前記演算処理手段に伝達する第2信号発生伝達手段
と、前記演算処理手段が前記第2信号発生伝達手段から
前記第2信号が出ていることを伝達されたときには、前
記演算処理手段は前記シーケンスプログラムに基ずく論
理演算の実行を中止し、夫々の前記第2信号発生手段内
を順次アクセスし、前記第2信号が出ている前記ブロッ
クを見つけたときには、そのブロックに属する前記第1
信号発生手段を順次アクセスするアクセス手段とを有し
ており、前記第1信号を出力している前記ユニットを特
定することを特徴とするシーケンスコントローラ。[Claim 1] A device comprising: program storage means for storing a sequence program; a plurality of blocks, at least one of which is further divided into a plurality of groups, each of which is provided with a plurality of external signal input terminals; a timing signal generating section for generating timing signals; arithmetic processing means for performing logical operations on a plurality of signals, including the external signal received from the external signal input terminal, in accordance with instructions of the sequence program read from the program storage means, in synchronization with the timing signals; and output means for outputting a control signal according to the operation result of the arithmetic processing means, a first signal generating means for outputting a first signal when a factor requesting the first signal occurs; a second signal generating means for outputting a second signal when any of the blocks is outputting the first signal; a second signal generating and transmitting means for transmitting the second signal to the arithmetic processing means when the second signal is output from any of the blocks; and when the arithmetic processing means is notified by the second signal generating and transmitting means that the second signal is being output, the arithmetic processing means stops executing the logical operation based on the sequence program, sequentially accesses each of the second signal generating means, and when it finds the block from which the second signal is being output, accesses the first signal belonging to that block.
and access means for sequentially accessing the signal generating means, and for identifying the unit that is outputting the first signal.
ローラに於いて、前記タイミング信号発生部は前記タイ
ミング信号に同期してメモリアドレス信号を出力するプ
ログラムカウンタであり、前記演算処理手段は前記メモ
リアドレス信号に関係して前記プログラム記憶手段から
読み出した前記シーケンスプログラムの指示に従って、
前記外部信号入力端子から取り入れた前記外部信号を含
む複数の信号同志の論理演算を行なうように構成してあ
ることを特徴とするシーケンスコントローラ2. The sequence controller according to claim 1, wherein said timing signal generating section is a program counter which outputs a memory address signal in synchronization with said timing signal, and said arithmetic processing means executes the following in accordance with instructions of said sequence program read from said program storage means in relation to said memory address signal:
a sequence controller configured to perform a logical operation on a plurality of signals including the external signal received from the external signal input terminal;
ローラに於いて、前記第1信号発生手段は、前記外部信
号報入力端子の特定の端子に信号が入っているときに、
第1信号を出力するように構成してあることを特徴とす
るシーケンスコントローラ。3. The sequence controller according to claim 1, wherein said first signal generating means generates a signal when a signal is input to a specific terminal of said external signal input terminal.
A sequence controller configured to output a first signal.
ム記憶手段と、複数のブロックに別れており、更に前記
ブロック内の少なくとも1つは複数のグループに別れて
おり、その夫々に複数ずつ設けてある外部信号入力端子
と、タイミング信号に同期してメモリアドレス信号を出
力するプログラムカウンタを備えており、前記メモリア
ドレス信号に関係して、前記プログラム記憶手段から読
み出した前記シーケンスプログラムの指示に従って、前
記外部信号入力端子から取り入れた前記外部信号を含む
複数の信号同志の論理演算を行なう演算処理手段と、該
演算処理手段の演算結果に応じた制御信号を出力する出
力手段とを有するものに於いて、前記外部信号入力端子
の特定の端子が、割り込み信号入力端子であることを指
定する指定手段と、前記割り込み信号入力端子が属して
いる前記グループ内の前記特定の端子に、割り込みを要
求する信号が入っているときには、第1信号を出力する
第1信号発生手段と、前記ブロック内のいずれかが前記
第1信号を出力しているときには第2信号を出力する第
2信号発生手段と、前記ブロックの何れかに前記第2信
号が出たときには、そのことを前記演算処理手段に伝達
する第2信号発生伝達手段と、前記演算処理手段が前記
第2信号発生伝達手段から前記第2信号が出ていること
を伝達されたときには、前記演算処理手段は前記シーケ
ンスプログラムに基ずく論理演算の実行を中止し、夫々
の前記第2信号発生手段内を順次アクセスし、前記第2
信号が出ている前記ブロックを見つけたときには、その
ブロックに属する前記第1信号発生手段を順次アクセス
するアクセス手段とを有しており、前記第1信号を出力
している前記ユニットを特定することを特徴とするシー
ケンスコントローラ。4. A device comprising: program storage means for storing a sequence program; a plurality of external signal input terminals divided into a plurality of blocks, at least one of said blocks being further divided into a plurality of groups, each of said blocks being provided with a plurality of external signal input terminals; a program counter for outputting a memory address signal in synchronization with a timing signal; arithmetic processing means for performing logical operations on a plurality of signals including said external signal received from said external signal input terminals in accordance with instructions of said sequence program read from said program storage means in relation to said memory address signal; and output means for outputting a control signal in accordance with the operation result of said arithmetic processing means, a designation means for designating the terminal as a signal input terminal; a first signal generation means for outputting a first signal when a signal requesting an interrupt is input to the specific terminal in the group to which the interrupt signal input terminal belongs; a second signal generation means for outputting a second signal when any of the blocks is outputting the first signal; a second signal generation and transmission means for transmitting to the arithmetic processing means when the second signal is output to any of the blocks; and when the arithmetic processing means is notified by the second signal generation and transmission means that the second signal is output, the arithmetic processing means stops execution of a logical operation based on the sequence program, and sequentially accesses each of the second signal generation means and executes the second signal generation and transmission means.
and an access means for sequentially accessing the first signal generating means belonging to the block when the block from which the signal is being output is found, thereby identifying the unit outputting the first signal.
ローラに於いて、前記指定手段は、前記グループ単位で
前記外部信号入力端子を、割り込み信号入力端子として
指定するように構成してある事を特徴とするシーケンス
コントローラ5. The sequence controller according to claim 4, wherein said designation means is configured to designate said external signal input terminals as interrupt signal input terminals in said group units.
ローラに於いて、前記指定手段は、前記グループ内の前
記外部信号入力端子を夫々の単位で割り込み信号入力端
子として指定するように構成してある事を特徴とするシ
ーケンスコントローラ6. The sequence controller according to claim 4, wherein said designation means is configured to designate said external signal input terminals in said group as interrupt signal input terminals on an individual basis.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62-506079A JPH0827646B2 (en) | 1986-10-08 | 1987-10-07 | Sequence Controller |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61-238076 | 1986-10-08 | ||
| JP23807686 | 1986-10-08 | ||
| JP62-506079A JPH0827646B2 (en) | 1986-10-08 | 1987-10-07 | Sequence Controller |
| PCT/JP1987/000757 WO1988002883A1 (en) | 1986-10-08 | 1987-10-07 | Sequence controller |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JPWO1988002883A1 JPWO1988002883A1 (en) | 1988-10-06 |
| JPH0827646B2 true JPH0827646B2 (en) | 1996-03-21 |
| JPH0827646B1 JPH0827646B1 (en) | 1996-03-21 |
Family
ID=26533518
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62-506079A Expired - Lifetime JPH0827646B2 (en) | 1986-10-08 | 1987-10-07 | Sequence Controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0827646B2 (en) |
-
1987
- 1987-10-07 JP JP62-506079A patent/JPH0827646B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0827646B1 (en) | 1996-03-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4349873A (en) | Microprocessor interrupt processing | |
| CA1127268A (en) | Engine control system with apparatus for producing pulse width modulated signals | |
| US4112490A (en) | Data transfer control apparatus and method | |
| US4499536A (en) | Signal transfer timing control using stored data relating to operating speeds of memory and processor | |
| KR970007764B1 (en) | Program controller | |
| US3766526A (en) | Multi-microprogrammed input-output processor | |
| US5608867A (en) | Debugging system using virtual storage means, a normal bus cycle and a debugging bus cycle | |
| CN110875867B (en) | Bus access arbitration device and method | |
| US3639911A (en) | Digital processor having automatic conflict-resolving logic | |
| US4592010A (en) | Memory-programmable controller | |
| EP0285667B1 (en) | Sequence controller | |
| JPH0420496B2 (en) | ||
| JP2710151B2 (en) | How the automation device works | |
| EP0230536A1 (en) | I/O processor for programmable sequence controller | |
| KR900005284B1 (en) | Micro computer | |
| JPWO1988002883A1 (en) | Sequence Controller | |
| KR0134365B1 (en) | Single chip microprocessor with program data memory flag | |
| JPH0330175B2 (en) | ||
| JPS5840619A (en) | Sequence controller and its control method | |
| JP2758257B2 (en) | Computer system | |
| KR880001399B1 (en) | Data processor | |
| SU446060A1 (en) | Computer control unit | |
| JPH0232650B2 (en) | ||
| JPS58200363A (en) | Input and output control system of virtual system | |
| JPS6073736A (en) | Information processor |