JPH0792690B2 - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH0792690B2
JPH0792690B2 JP59232816A JP23281684A JPH0792690B2 JP H0792690 B2 JPH0792690 B2 JP H0792690B2 JP 59232816 A JP59232816 A JP 59232816A JP 23281684 A JP23281684 A JP 23281684A JP H0792690 B2 JPH0792690 B2 JP H0792690B2
Authority
JP
Japan
Prior art keywords
event
signal
processing
input
information
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
Application number
JP59232816A
Other languages
Japanese (ja)
Other versions
JPS61110205A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP59232816A priority Critical patent/JPH0792690B2/en
Publication of JPS61110205A publication Critical patent/JPS61110205A/en
Publication of JPH0792690B2 publication Critical patent/JPH0792690B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、制御対象の各種の状態を示す状態信号にもと
づき、あらかじめ設定されたプログラムを実行して上記
制御対象を制御する制御信号を出力する制御手段を備え
たプログラマブルコントローラ(以下PCと略記する)に
関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Industrial field of use] The present invention outputs a control signal for controlling a control target by executing a preset program based on a status signal indicating various states of the control target. The present invention relates to a programmable controller (hereinafter abbreviated as PC) equipped with control means for controlling.

〔従来の技術〕[Conventional technology]

第6図は一般的なPCの構成を示すブロック図である。図
において1は演算処理手段としての中央演算処理装置
(以下CPUと略記する)、2は制御信号に対する出力イ
ンタフェース、3は図示しない状態検出手段からの状態
信号に対する入力インタフェース、4はランダムアクセ
スメモリ(以下RAMと略記する)、5はユーザプログラ
ムメモリ、6はシステムプログラムメモリ、7はシステ
ムコンソールである。尚、CPU1,RAM4,及びシステムプロ
グラム6より制御手段が構成される。
FIG. 6 is a block diagram showing the configuration of a general PC. In the figure, 1 is a central processing unit (hereinafter abbreviated as CPU) as an arithmetic processing unit, 2 is an output interface for control signals, 3 is an input interface for a state signal from a state detection unit (not shown), and 4 is a random access memory ( Hereinafter, abbreviated as RAM), 5 is a user program memory, 6 is a system program memory, and 7 is a system console. The CPU 1, RAM 4, and system program 6 constitute a control means.

入力インタフェース3を介しての状態信号が所定の条件
に合致したときは過去に出力された制御信号の順序とは
関係なく出力インタフェース2を介して所定の制御信号
を出力し、又は状態信号を考慮しながら所定の順序で制
御信号を出力するのであるが、これらの動作はユーザプ
ログラムメモリ5から読出されるプログラムによって決
定される。
When the status signal through the input interface 3 meets a predetermined condition, the predetermined control signal is output through the output interface 2 regardless of the order of the control signals output in the past, or the status signal is considered. However, the control signals are output in a predetermined order, and these operations are determined by the program read from the user program memory 5.

したがって、PCのユーザは制御対象に適したプログラム
をあらかじめ作成しシステムコンソール7を用いてユー
ザプログラムメモリ5に格納しておく。CPU1はシステム
プログラムメモリ6内の制御アルゴリズムに従ってユー
ザプログラムメモリ5の内容を解釈して、状態信号の条
件に従って制御信号を作成し出力インタフェース2を介
して出力し制御対象を制御する。
Therefore, the user of the PC creates a program suitable for the control target in advance and stores it in the user program memory 5 using the system console 7. The CPU 1 interprets the contents of the user program memory 5 according to the control algorithm in the system program memory 6, creates a control signal according to the condition of the status signal, and outputs it through the output interface 2 to control the controlled object.

ところで、この種のPCの状態信号と制御信号との間の関
係を定める制御アルゴリズムとしては、リレー回路シミ
ュレーション方式、テーブルルックアップ方式、及び工
程歩進方式の3種類がある。
By the way, there are three types of control algorithms that determine the relationship between the status signal and the control signal of this type of PC: a relay circuit simulation method, a table lookup method, and a process step method.

第7図及び第8図はそれぞれリレー回路シミュレーショ
ン方式を示す回路接続図であり、これらの図において
「入力」として示す部分は入力インタフェース3からの
状態信号を示し、第7図ではリレー接点の閉接又は開
放、第8図においては信号論理の「1」「0」により、
対応する状態信号の論理を表し、「出力」として示す部
分は出力インタフェース2からの制御信号を示し、第7
図ではリレーコイルの付勢又は消勢、第8図においては
信号論理の「1」「0」により対応する制御信号の論理
を表す。
FIG. 7 and FIG. 8 are circuit connection diagrams showing the relay circuit simulation method, respectively, and the portion shown as “input” in these figures shows the status signal from the input interface 3, and in FIG. Contact or open, in FIG. 8 by signal logic "1""0",
The part indicating the logic of the corresponding status signal, the part indicated as “output” shows the control signal from the output interface 2,
In the figure, energization or de-energization of the relay coil is shown, and in FIG. 8, the logic of the corresponding control signal is represented by "1" or "0" of the signal logic.

第9図はリレー回路シミュレーション方式の制御アルゴ
リズムを示すフロー図である。図において8a,8bは状態
信号のそれぞれ特定の条件を示しOKはこの条件に適合す
る場合、NGは然らざる場合を示す。条件8aでOKの時は制
御出力9a2となりNGの時は制御出力9a1となり、そのいず
れの場合も条件8bの判断にうつる。
FIG. 9 is a flowchart showing the control algorithm of the relay circuit simulation method. In the figure, 8a and 8b indicate specific conditions of the status signal, and OK indicates a case where this condition is met, and NG indicates that it does not. When the condition 8a is OK, the control output is 9a2, and when the condition 8a is NG, the control output is 9a1. In either case, the condition 8b is judged.

第10図はテーブルルックアップ方式に用いるテーブルの
一例を示す図でテーブル番号(TABLE NO)、状態信号論
理(INPUT)、制御信号論理(OUTPUT)を対応させて記
憶している。したがってこのテーブルはテーブル番号順
に読出す。第11図はテーブルルックアップ方式における
制御アルゴリズムを示すフロー図で、たとえば、条件8c
でTABLE NO 001を読出しINPUTの条件を調べOKならば制
御出力9cとなってこのテーブルのOUTPUTに示す制御信号
RY2=1,L1=1を出力した後条件8d(すなわちTABLE NO
002)にうつり、条件8cでNGなら直ちに条件8dにうつ
る。
FIG. 10 is a diagram showing an example of a table used in the table lookup method, in which a table number (TABLE NO), a status signal logic (INPUT), and a control signal logic (OUTPUT) are stored in association with each other. Therefore, this table is read in the order of table numbers. FIG. 11 is a flow chart showing a control algorithm in the table lookup method.
Read TABLE NO 001 at and check the INPUT conditions, and if it is OK, the control output will be 9c and the control signal shown at OUTPUT of this table will be output.
After outputting RY2 = 1, L1 = 1, condition 8d (that is, TABLE NO
002), if condition 8c is NG, immediately move to condition 8d.

第12図及び第13図はそれぞれ工程歩進方式を示す図で、
第12図は工程テーブルをメモリに記憶する場合を示し、
第13図は工程テーブルをピンボードに設定する場合を示
す。第13図において10はピンボードパネル、11は制御ピ
ンである。第14図は工程歩進方式の制御アルゴリズムを
示すフロー図であって、たとえば条件8fが第12図STEP N
O 01の条件LS2=1であるとすれば、OKの時だけ制御出
力9fとして第12図に示すSOL=1,SOL2=0の制御信号を
出力し、もしNGならば条件がOKになるまで次のステップ
へは進まない。なお第9図、第11図、第14図に示す各ス
テップのうち説明を省略したものもあるが、8(アルフ
ァベット小文字のサフィックスを伴い)は状態信号の条
件を示し、9(アルファベット小文字のサフィックスを
伴い)は出力インタフェース2を介して出力する制御信
号を示す。
12 and 13 are diagrams showing the step progress method,
FIG. 12 shows a case where the process table is stored in the memory,
FIG. 13 shows the case where the process table is set in the pinboard. In FIG. 13, 10 is a pin board panel and 11 is a control pin. FIG. 14 is a flow chart showing a control algorithm of the step progress method. For example, the condition 8f is shown in FIG.
If the condition LS2 of O 01 is 1, the control output 9f outputs the control signal of SOL = 1 and SOL2 = 0 shown in FIG. 12 only when OK, and if NG, until the condition becomes OK. Do not proceed to the next step. Although some of the steps shown in FIG. 9, FIG. 11 and FIG. 14 have been omitted from the description, 8 (with a suffix in lower case alphabet) indicates the condition of the status signal, and 9 (suffix in lower case alphabet) Indicates the control signal output via the output interface 2.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

従来のPCは以上のように構成されているので、制御対象
に応じて上記3種類の制御アルゴリズムが用いられてい
る。しかしながら上記従来のPCにあっては、それぞれ以
下に示すような問題点を本質的に有している。
Since the conventional PC is configured as described above, the above three types of control algorithms are used according to the control target. However, the above-mentioned conventional PCs inherently have the following problems.

まず、順序回路の設計つまり、プログラミングに関し
て、リレー回路シミュレーション方式とテーブルルック
アップ方式では、過去に出力された制御信号の順序とは
関係なく現時点における状態信号によって定められる条
件に対応する制御信号を出力するよう構成されているの
で、もしこれらの方式によって順序制御を表現しようと
すると、複雑な非同期順序回路が必要となり、この非同
期順序回路の設計とその動作確認が必要となる。他方、
工程歩進方式では、順序制御とは無関係に、状態信号の
所定の条件が成立した時はいつでも制御信号を出力する
場合、すなわち非常停止、インタロック等を記述するこ
とができない。
First of all, regarding the design of the sequential circuit, that is, the programming, in the relay circuit simulation method and the table lookup method, the control signal corresponding to the condition determined by the state signal at the present time is output regardless of the order of the control signals output in the past. Therefore, if attempting to express sequential control by these methods, a complicated asynchronous sequential circuit is required, and the design of this asynchronous sequential circuit and its operation confirmation are required. On the other hand,
In the step progress method, it is not possible to describe a case where a control signal is output whenever a predetermined condition of a status signal is satisfied, that is, an emergency stop, an interlock, etc., regardless of sequence control.

また、状態信号入力の変化に対する制御信号の出力応答
性に関して、リレー回路シミュレーション方式とテーブ
ルルックアップ方式では、CPU1が処理プログラムにもと
づき状態信号の入力をスキャンし、サイクリックに全命
令を演算処理する為、応答速度は非常に遅いものとな
る。他方、工程歩進方式では、ある時点において一つの
条件判定(例えば第14図の8f)のみを行うので、対応す
る制御出力(同じく9f)の応答は高速で行なわれるが、
同時に複数の条件判定を行なって全制御出力の応答を高
速化することは不可能となる。
Regarding the output responsiveness of the control signal to the change of the status signal input, in the relay circuit simulation method and the table lookup method, the CPU1 scans the status signal input based on the processing program and cyclically processes all the instructions. Therefore, the response speed is very slow. On the other hand, in the step progress method, only one condition judgment (for example, 8f in FIG. 14) is performed at a certain time point, so the response of the corresponding control output (also 9f) is performed at high speed,
It is impossible to make a plurality of condition judgments at the same time to speed up the response of all control outputs.

本発明は係る問題点を解決するためになされたもので、
順序回路設計上の制約をなくし、かつ応答性の優れたプ
ログラマブルコントローラを得ることを目的とするもの
である。
The present invention has been made to solve the above problems,
The purpose of the present invention is to obtain a programmable controller with excellent responsiveness and eliminating restrictions on sequential circuit design.

〔問題点を解決するための手段〕[Means for solving problems]

本発明に係るプログラマブルコントローラは、制御対象
の状態を検出する複数の検出手段の検出出力である入力
信号(各現在状態信号Pi)のうちの所定数の入力信号が
所定の状態にあることを条件に成立が確定される入力状
態条件(条件8hj)とこの入力状態条件の成立にもとづ
き実行される制御出力情報9hjとからなる情報であり制
御対象を制御する処理情報の最小単位情報であるイベン
ト処理最小単位18jの処理を実行可能な制御手段を有
し、各検出手段毎に、検出手段の検出出力である入力信
号の状態を示す情報を記憶する入力信号記憶手段(過去
状態信号メモリ12)と、現在の入力信号Piと過去におけ
る入力信号を示す入力信号記憶手段の記憶内容Liとが一
致しているか否かを判定し、不一致であればイベント信
号を出力するイベント信号出力手段(EOR回路14i)と、
イベント処理最小単位の集まりであるイベント処理最小
単位群の中から当該入力信号の状態が入力状態条件に関
与する所定数のイベント処理最小単位の選択を可能にす
る情報が格納されるイベント対応処理内容記憶手段(イ
ベント対応表19i)とを備えて成るものである。
The programmable controller according to the present invention has a condition that a predetermined number of input signals among input signals (each current state signal Pi) which are detection outputs of a plurality of detecting means for detecting a state of a controlled object are in a predetermined state. Event processing, which is the information that consists of the input status condition (condition 8hj) that is confirmed to be satisfied in the above and control output information 9hj that is executed based on the satisfaction of this input status condition, and is the minimum unit information of the processing information that controls the control target An input signal storage means (past state signal memory 12) that has control means capable of executing the processing of the minimum unit 18j, and stores, for each detection means, information indicating the state of the input signal that is the detection output of the detection means; , The current input signal Pi and the stored content Li of the input signal storage means indicating the input signal in the past are judged whether or not they match, and if they do not match, an event signal is output. And means (EOR circuit 14i),
Event-corresponding processing content that stores information that enables selection of a predetermined number of event processing minimum units in which the state of the input signal is involved in the input state condition from the event processing minimum unit group that is a group of event processing minimum units And a storage means (event correspondence table 19i).

[作用] 本発明においては、現在の入力信号と過去における入力
信号を示す入力信号記憶手段の記憶内容とが、イベント
信号出力手段により比較され、現在と過去の入力信号が
不一致であればイベント信号が出力される。そして、い
ずれの検出手段に対応するイベント信号が制御手段に入
力された場合にも、当該イベント信号に対応するイベン
ト対応処理内容記憶手段の記憶内容により示される所定
数のイベント処理最小単位の処理が、制御手段により実
行される。
[Operation] In the present invention, the current input signal and the stored content of the input signal storage means indicating the past input signal are compared by the event signal output means, and if the current and past input signals do not match, the event signal Is output. Then, even when an event signal corresponding to any of the detection means is input to the control means, a predetermined number of minimum event processing units indicated by the stored content of the event-corresponding processing content storage means corresponding to the event signal are processed. , Executed by the control means.

〔実施例〕〔Example〕

以下、本発明を第1図ないし第4図に示す実施例にもと
づき説明する。なお、前記従来例と同一又は相当部分に
は同一符号を用いその説明は省略する。第1図及び第2
図は本実施例におけるPCの構成を示すブロック図であ
り、各図において12及び13は本発明により備えられた状
態信号記憶手段としての過去状態信号メモリ及びイベン
ト処理手段としてのイベント処理装置である。上記過去
状態信号メモリ12は読み書き可能なRAMで構成され、図
示しない検出手段、例えば状態検出手段から入力インタ
フェース3を介して入力される現在状態信号Pi(i=1
〜n:nは状態信号,以下同様)が書き込まれ、この書き
込まれた状態信号が過去状態信号Liとして読み出され上
記イベント処理装置13に入力されるように成っている。
一方、イベント処理装置13は第2図にその内部構成を示
すように上記現在状態信号Piと過去状態信号Liとを入力
とするEOR回路(排他的論理和回路)14iと、このEOR回
路14iの出力側に設けられたAND回路(論理積回路)15i
とから成る各状態信号毎に設けられた論理回路と、制御
対象の各種状態の変化、すなわちイベントの発生に際し
てCPU1に割込みをかけるか否かのイベントマスク信号
(割込み要否情報)Miが各状態信号毎に記憶され、対応
するAND回路15iに入力されるイベントマスクメモリ16
と、上記各AND回路15iからの出力を入力してあらかじめ
設定された優先度に従いCPU1に割込み信号Iiを出力する
割込み優先判定回路17とから構成されている。なお、上
記割込み優先判定回路17の優先度はここではもっとも最
近発生した割込み信号がもっとも低く設定されるように
なっている。
The present invention will be described below based on the embodiments shown in FIGS. 1 to 4. The same or corresponding parts as those of the conventional example are designated by the same reference numerals and the description thereof is omitted. 1 and 2
The figure is a block diagram showing the configuration of the PC in the present embodiment. In each figure, 12 and 13 are past state signal memory as state signal storage means and event processing device as event processing means provided by the present invention. . The past state signal memory 12 is composed of a readable / writable RAM and has a present state signal Pi (i = 1) input from a detection unit (not shown), for example, a state detection unit, via the input interface 3.
~ N: n is a state signal, the same applies hereinafter), and the written state signal is read as a past state signal Li and input to the event processing device 13.
On the other hand, the event processing device 13 has an EOR circuit (exclusive OR circuit) 14i to which the current state signal Pi and the past state signal Li are input, as shown in the internal configuration of FIG. 2, and the EOR circuit 14i. AND circuit (AND circuit) 15i provided on the output side
And a logic circuit provided for each status signal, and an event mask signal (interrupt necessity information) Mi indicating whether or not to interrupt the CPU 1 when a change occurs in various states of the controlled object, that is, an event. Event mask memory 16 that is stored for each signal and input to the corresponding AND circuit 15i
And an interrupt priority determination circuit 17 which inputs the output from each AND circuit 15i and outputs an interrupt signal Ii to the CPU 1 in accordance with a preset priority. The priority of the interrupt priority determination circuit 17 is set so that the interrupt signal generated most recently is the lowest here.

一方、第3図及び第4図は割込み発生時にCPU1が実行す
る処理プログラムのイベント処理最小単位のフロー図及
び上記イベント処理最小単位群とイベント対応表との関
係を示す説明図である。図においてイベント処理最小単
位群18はプログラマブルコントローラが制御対象を制御
する処理情報を構成する複数のイベント処理最小単位18
j(j=1〜m:mは処理最小単位数,以下同様)から成
り、各状態信号毎に設けられたイベント対応表19iにも
とづき選択される。又上記各イベント処理最小単位18i
はそれぞれ入力状態条件,例えば条件8hjと制御出力情
報9hjから成っている。
On the other hand, FIGS. 3 and 4 are a flow chart of the event processing minimum unit of the processing program executed by the CPU 1 when an interrupt occurs, and an explanatory diagram showing the relationship between the event processing minimum unit group and the event correspondence table. In the figure, an event processing minimum unit group 18 is a plurality of event processing minimum units 18 that constitute processing information for controlling a control target by a programmable controller.
j (j = 1 to m: m is the minimum processing unit number, the same applies hereinafter), and is selected based on the event correspondence table 19i provided for each state signal. The minimum unit for processing each event is 18i
Are input state conditions such as condition 8hj and control output information 9hj.

次に以上のように構成された本実施例の作用について説
明する。まず、イベント処理装置13の各EOR回路14iによ
り、入力インタフェース回路3を介して入力される入力
される各入力信号,例えば各現在状態信号Piと入力信号
記憶手段,例えば過去状態信号メモリ12内に上記現在状
態信号Piに対応して記憶された過去状態信号Liが比較判
定される。すなわち、イベント処理装置13の各EOR回路1
4iに対応して過去状態信号メモリ12が設けられ、これが
インタフェース3を介して複数の検出手段,すなわち各
状態検出手段に対応している。つまり、各状態検出手段
毎に、過去状態信号メモリ12とEOR回路14iと後述するイ
ベント対応表とを備えているものである。ここで、上記
各信号Pi,Liの値が異なれば、すなわち制御対象の対応
個所の状態に変化(イベント)が生じて状態信号が変化
していると、イベント信号出力手段,例えばEOR回路14i
の出力値,すなわちイベント信号は「1」(真)となり
イベントの発生が検出される。このEOR回路14iの出力値
はイベントマスクメモリ16の対応するイベントマスク信
号Miによってマスク回路、例えばAND回路15iによりマス
ク処理される。ここで、制御対象に従いイベント処理不
要な入力に対しては、上記イベントマスクメモリ16の設
定を任意に行うことで、制御上不要なイベント発生を防
ぐことができる。すなわち、イベントマスク信号Miの値
が「0」であるとEOR回路14iの値が「1」(イベント発
生)であってもこの情報は割込み優先判定回路17には伝
達されない。従って、EOR回路14iの出力値が「1」(イ
ベント発生)で、かつイベントマスク信号Miの値が
「1」の時だけAND回路15iの出力値も「1」となり、割
込み優先判定回路17を経て割込み信号IiがCPU1に出力さ
れる。上記割込み優先判定回路17は各AND回路15iの出力
値のうち優先度の高いもの、ここでは入力の発生順にイ
ベント信号に対応した割込み信号IiをCPU1に出力する。
Next, the operation of the present embodiment configured as described above will be described. First, by the respective EOR circuits 14i of the event processing device 13, the respective input signals input via the input interface circuit 3, for example, the respective current state signals Pi and the input signal storage means, for example, in the past state signal memory 12, are stored. The past state signal Li stored corresponding to the present state signal Pi is compared and determined. That is, each EOR circuit 1 of the event processing device 13
A past state signal memory 12 is provided corresponding to 4i, and this corresponds to a plurality of detecting means, that is, each state detecting means via the interface 3. That is, each state detecting means is provided with the past state signal memory 12, the EOR circuit 14i and the event correspondence table described later. Here, if the values of the signals Pi and Li are different, that is, if the status signal changes due to a change (event) in the status of the corresponding part of the controlled object, the event signal output means, for example, the EOR circuit 14i.
Output value, that is, the event signal becomes "1" (true), and the occurrence of the event is detected. The output value of the EOR circuit 14i is masked by the corresponding event mask signal Mi of the event mask memory 16 by a mask circuit, for example, an AND circuit 15i. Here, for an input that does not require event processing according to the control target, the event mask memory 16 can be arbitrarily set to prevent the occurrence of events that are unnecessary for control. That is, if the value of the event mask signal Mi is "0", this information is not transmitted to the interrupt priority determination circuit 17 even if the value of the EOR circuit 14i is "1" (event occurs). Therefore, the output value of the AND circuit 15i also becomes "1" only when the output value of the EOR circuit 14i is "1" (event occurrence) and the value of the event mask signal Mi is "1". After that, the interrupt signal Ii is output to the CPU1. The interrupt priority judgment circuit 17 outputs to the CPU 1 the interrupt signal Ii corresponding to the event signal in the order of occurrence of inputs, whichever has the highest priority among the output values of the AND circuits 15i.

次に割込み発生時のCPU1の作用について第3図及び第4
図にもとづき説明する。CPU1は前記したイベント処理装
置13から割込み信号Iiが入力されると、上記割込みに対
応するイベント対応処理内容記憶手段,例えばイベント
対応表19i(第4図)を参照し、上記イベント対応表19i
が示すいくつかのイベント処理最小単位18jを処理,実
行する。第3図に示すように各イベント処理最小単位18
jにおいては、CPU1が現在状態信号Piを含む条件8hj,す
なわち現在状態信号Piを含む所定数の入力信号が所定状
態にあることを条件に満足される条件8hjを評価し、条
件8hjが満足(OK)されると制御出力情報9hjを処理し、
制御対象に対して所定の制御を行なう。条件8hjが満足
されない(NG)と何も処理せずにこのイベント処理最小
単位18jを終了し、次のイベント処理最小単位18j+1の
処理に移行する。従って、本実施例によればCPU1の入力
状態信号のスキャンによらずイベントの発生が検出さ
れ、さらに検出されたイベントの処理の要否や優先度が
判定されてCPU1に割込みがかけられるので、イベントの
発生に対する応答速度が非常に速くなる。また、イベン
ト処理装置13のイベントマスクメモリ16や割込み優先判
定回路17の設定を管理することにより順序回路のプログ
ラミングも容易となる。
Next, the operation of the CPU1 when an interrupt occurs is shown in FIG. 3 and FIG.
It will be described with reference to the drawings. When the interrupt signal Ii is input from the event processing device 13, the CPU 1 refers to the event correspondence processing content storage means corresponding to the interrupt, for example, the event correspondence table 19i (FIG. 4), and refers to the event correspondence table 19i.
Processes and executes some event processing minimum units 18j. As shown in FIG. 3, the minimum unit of each event processing is 18
In j, the CPU 1 evaluates the condition 8hj including the current state signal Pi, that is, the condition 8hj which is satisfied on condition that a predetermined number of input signals including the current state signal Pi are in a predetermined state, and the condition 8hj is satisfied ( OK), the control output information 9hj is processed,
Predetermined control is performed on the controlled object. If the condition 8hj is not satisfied (NG), the event processing minimum unit 18j is terminated without performing any processing, and the process proceeds to the next event processing minimum unit 18j + 1. Therefore, according to the present embodiment, the occurrence of an event is detected regardless of the scanning of the input state signal of the CPU1, and the necessity or the priority of the processing of the detected event is determined and the CPU1 is interrupted. The response speed to the occurrence of is very fast. Further, by managing the settings of the event mask memory 16 and the interrupt priority determination circuit 17 of the event processing device 13, the programming of the sequential circuit becomes easy.

第5図はCPU1をマルチCPU化した場合の一実施例であ
る。この例では、イベントが発生すると、管理CPU1aが
割込み優先判定回路17より割込み信号Iiを受けとり、上
記実施例同様対応するイベント対応表19iを参照する。
上記イベント対応表19iが示すイベント処理最小単位18j
が複数の場合には、その個々のイベント処理最小単位18
jの処理を処理CPU1b〜1xに割当てる。イベント処理最小
単位18jの個数が処理CPU1b〜1xの個数を上まわる時に
は、管理CPU1aが多い分のイベント処理最小単位18jをバ
ッファリングしておき、処理の終了した処理CPU1b〜1x
に順次割当てる。このようにすることにより、更に高速
な処理が可能となる。
FIG. 5 shows an embodiment in which the CPU 1 is a multi-CPU. In this example, when an event occurs, the management CPU 1a receives the interrupt signal Ii from the interrupt priority determination circuit 17 and refers to the corresponding event correspondence table 19i as in the above embodiment.
Minimum event processing unit 18j shown in the above event correspondence table 19i
If there is more than one, the minimum event processing unit 18
The processing of j is assigned to the processing CPUs 1b to 1x. When the number of event processing minimum units 18j exceeds the number of processing CPUs 1b to 1x, the management CPU 1a has a large number of event processing minimum units 18j buffered, and the processing CPUs 1b to 1x that have finished processing are buffered.
Sequentially assigned to. By doing so, it is possible to perform even faster processing.

なお、上記各実施例においては、入力状態信号のみ過去
状態信号メモリ12に記憶し、イベント処理を行なった
が、PCの出力信号や内部メモリについてもイベント処理
(変化したことをイベントとする)ができることは言う
までもない。また、イベント対応表19iによりイベント
処理最小単位を選択するようにしたので、同一のイベン
ト処理最小単位を複数記憶しておく必要がなく、メモリ
容量を節約できる効果がある。また、イベント対応表19
iの内容を変更することにより、処理全体に影響を与え
ることなく部分的に動作を変更できるので、デバッグが
容易にできる効果がある。
In each of the above-described embodiments, only the input state signal is stored in the past state signal memory 12 and the event processing is performed, but the event processing (change is regarded as an event) is also performed on the output signal of the PC and the internal memory. It goes without saying that you can do it. Further, since the event processing minimum unit is selected according to the event correspondence table 19i, it is not necessary to store a plurality of the same event processing minimum units, and there is an effect that the memory capacity can be saved. Also, event correspondence table 19
By changing the contents of i, the operation can be partially changed without affecting the whole process, which has the effect of facilitating debugging.

また、マスク回路として機能するAND回路15i及び優先判
定回路として機能する割込み優先判定回路17を設けるよ
うにしたので、順序回路のプログラミングが容易にでき
る効果がある。
Further, since the AND circuit 15i functioning as a mask circuit and the interrupt priority determining circuit 17 functioning as a priority determining circuit are provided, there is an effect that programming of the sequential circuit can be facilitated.

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明によれば、制御対象の状態を
検出する各検出手段毎に、入力信号記憶手段と、現在と
過去の入力信号が一致しているか否かを判定し、不一致
であればイベント信号を出力するイベント信号出力手段
と、入力信号の状態が入力状態条件に関与する所定数の
イベント処理最小単位の選択を可能にする情報が格納さ
れるイベント対応処理内容記憶手段とを備え、いずれの
検出手段に対応するイベント信号が制御手段に入力され
た場合にも、当該イベント信号に対応するイベント対応
処理内容記憶手段の記憶内容にもとづき選択された所定
数のイベント処理最小単位による処理が制御手段により
実行されるようにしたので、入力信号に変化が発生した
場合にただちに当該イベント信号に関係する処理が実行
され、入力信号に変化がない箇所のスキャンに要する時
間等の無駄時間の発生が防止され、プログラマブルコン
トローラの処理を高速化できるとともに、メモリ容量の
大幅な増大が防止され、さらにデバッグが容易にできる
効果がある。
As described above, according to the present invention, for each detection means for detecting the state of the controlled object, it is determined whether or not the input signal storage means and the current and past input signals match, and if they do not match. For example, an event signal output means for outputting an event signal, and an event corresponding processing content storage means for storing information enabling selection of a predetermined number of event processing minimum units in which the state of the input signal is involved in the input state condition. Even when an event signal corresponding to any of the detecting means is input to the control means, processing by a predetermined number of event processing minimum units selected based on the stored content of the event corresponding processing content storage means corresponding to the event signal Since the control means is executed, when a change occurs in the input signal, the processing related to the event signal is immediately executed and the input signal is processed. Reduction is prevented the occurrence of dead time such as time required for scanning the locations not, it is possible to increase the processing speed of the programmable controller, a significant increase in the memory capacity can be prevented, the effect of further debugging can be easily.

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

第1図及び第2図は本発明によるプログラマブルコント
ローラの一実施例を示すブロック図、第3図はイベント
処理最小単位のフロー図、第4図はイベント処理最小単
位群とイベント対応表の関係を示す説明図、第5図は他
の実施例を示すブロック図、第6図は従来例の一般的な
構成を示すブロック図、第7図ないし第9図は上記従来
例におけるリレー回路シミュレーション方式の接続図な
いしフロー図、第10図及び第11図は同じくテーブルルッ
クアップ方式のテーブルの一例を示す図及びフロー図、
第12図ないし第14図は同じく工程歩進方式のテーブル及
びピンボードの一例を示す図ないしフロー図である。 1……演算処理手段、12……状態信号記憶手段、13……
イベント処理手段、14i,15i……論理回路、16……メモ
リ、17……割込み優先判定回路、Pi……現在状態信号、
Li……過去状態信号、Ii……割込み信号、Mi……割込み
要否情報。 なお、図中、同一または相当部分には同一符号を用いて
いる。
1 and 2 are block diagrams showing an embodiment of a programmable controller according to the present invention, FIG. 3 is a flow chart of the minimum unit of event processing, and FIG. 4 shows the relationship between the minimum unit of event processing and the event correspondence table. FIG. 5 is a block diagram showing another embodiment, FIG. 6 is a block diagram showing a general configuration of a conventional example, and FIGS. 7 to 9 show a relay circuit simulation method in the conventional example. Connection diagram or flow diagram, FIGS. 10 and 11 are diagrams and flow diagrams showing an example of a table of the table lookup method,
FIG. 12 to FIG. 14 are diagrams or flow charts showing an example of a step-progressing type table and pin board. 1 ... Arithmetic processing means, 12 ... Status signal storage means, 13 ...
Event processing means, 14i, 15i ... Logic circuit, 16 ... Memory, 17 ... Interrupt priority determination circuit, Pi ... Current state signal,
Li ... Past status signal, Ii ... Interrupt signal, Mi ... Interrupt necessity information. In the drawings, the same reference numerals are used for the same or corresponding parts.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】制御対象の状態を検出する検出手段を複数
有するとともに、それぞれの上記検出手段の検出出力で
あるそれぞれの入力信号を参照しながら所定の処理情報
にもとづき上記制御対象を制御するプログラマブルコン
トローラにおいて、 所定数の上記入力信号が所定の状態にあることを条件に
成立が確定される入力状態条件とこの入力状態条件の成
立にもとづき実行される制御出力情報とからなる情報で
あり上記処理情報の最小単位情報であるイベント処理最
小単位の処理を実行可能な制御手段を有するとともに、 上記各検出手段毎に、上記検出手段の検出出力である上
記入力信号を記憶する入力信号記憶手段と、現在の上記
入力信号と過去における上記入力信号を示す入力信号記
憶手段の記憶内容とが一致しているか否かを判定し、不
一致であればイベント信号を出力するイベント信号出力
手段と、上記処理情報を構成する上記イベント処理最小
単位の集まりであるイベント処理最小単位群の中から上
記入力信号の状態が上記入力状態条件に関与する所定数
の上記イベント処理最小単位の選択を可能にする情報が
格納されるイベント対応処理内容記憶手段とを備え、 いずれの上記検出手段に対応する上記イベント信号が上
記制御手段に入力された場合にも、当該イベント信号に
対応する上記イベント対応処理内容記憶手段の記憶内容
にもとづき選択された所定数の上記イベント処理最小単
位による処理が上記制御手段により実行されることを特
徴とするプログラマブルコントローラ。
1. A programmable control system having a plurality of detection means for detecting a state of a controlled object and controlling the controlled object based on predetermined processing information while referring to respective input signals which are detection outputs of the respective detecting means. In the controller, this is information consisting of an input state condition that is confirmed to be satisfied on condition that a predetermined number of the input signals are in a predetermined state, and control output information that is executed based on the satisfaction of this input state condition. Input signal storage means for storing the input signal, which is the detection output of the detection means, for each of the detection means, having a control means capable of executing the processing of the minimum unit of event processing which is the minimum unit information of information, It is determined whether or not the current input signal and the stored contents of the input signal storage means indicating the input signal in the past match. If they do not match, the state of the input signal is involved in the input state condition from the event signal output unit that outputs an event signal and the event processing minimum unit group that is a collection of the event processing minimum units that form the processing information. A case in which the event signal corresponding to any of the detecting means is input to the control means, Also, the programmable controller is characterized in that the control means executes processing by a predetermined number of the minimum event processing units selected based on the stored content of the event corresponding processing content storage means corresponding to the event signal.
【請求項2】上記イベント信号をマスクするか否かを示
す情報を記憶するイベントマスクメモリと、このイベン
トマスクメモリの記憶内容にもとづき上記イベント信号
を次段に伝えることを阻止するマスク回路と、上記イベ
ント信号を、予め設定された優先度に従い次段に出力す
る優先判定回路とを有し、上記マスク回路と上記優先判
定回路とを通過した上記イベント信号が上記制御手段に
伝えられることを特徴とする特許請求の範囲第1項記載
のプログラマブルコントローラ。
2. An event mask memory that stores information indicating whether or not to mask the event signal, and a mask circuit that prevents the event signal from being transmitted to the next stage based on the stored contents of the event mask memory. A priority determination circuit that outputs the event signal to the next stage according to a preset priority, and the event signal that has passed through the mask circuit and the priority determination circuit is transmitted to the control means. The programmable controller according to claim 1.
JP59232816A 1984-11-05 1984-11-05 Programmable controller Expired - Lifetime JPH0792690B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59232816A JPH0792690B2 (en) 1984-11-05 1984-11-05 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59232816A JPH0792690B2 (en) 1984-11-05 1984-11-05 Programmable controller

Publications (2)

Publication Number Publication Date
JPS61110205A JPS61110205A (en) 1986-05-28
JPH0792690B2 true JPH0792690B2 (en) 1995-10-09

Family

ID=16945221

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59232816A Expired - Lifetime JPH0792690B2 (en) 1984-11-05 1984-11-05 Programmable controller

Country Status (1)

Country Link
JP (1) JPH0792690B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55123736A (en) * 1979-03-16 1980-09-24 Hitachi Ltd Interrupt control system
JPS5739408A (en) * 1980-08-15 1982-03-04 Hitachi Ltd Programmable logic controller
JPS5914005A (en) * 1982-07-15 1984-01-24 Hitachi Ltd Sequence controlling system by microcomputer

Also Published As

Publication number Publication date
JPS61110205A (en) 1986-05-28

Similar Documents

Publication Publication Date Title
JPH0792690B2 (en) Programmable controller
JP2595082B2 (en) Operation state monitoring device for programmable controller
JPH08249018A (en) Multiprocessor arithmetic unit and programmable controller having the arithmetic unit
JP2880658B2 (en) Runaway detection device for multitask program
JPS59123933A (en) Address comparison system
JPH03137736A (en) Operation tracing system for micro processor
JP2541301B2 (en) Failure detection method
JPH1139159A (en) Computer system
JP2685289B2 (en) Write enable signal check method
JP2504645B2 (en) Test program execution control processing method
JPH0383139A (en) Fuzzy arithmetic processing device
JPH05233479A (en) Panel monitor system
JPS59103155A (en) Data processing module
JPH0417454B2 (en)
JPS62297919A (en) Display controller
JPH09319592A (en) Microcomputer
JPH02220143A (en) Personal computer system
JPH01269104A (en) Numerical controller
JPH01207837A (en) System diagnostic system
JPH05225112A (en) Information processor
JPS6227830A (en) Interruption control system
JPS61202239A (en) Information processor
JPS59167754A (en) Interrupt controller
JPH06314197A (en) Auxiliary processor
JPH02287628A (en) Membership function analyzer

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term