JPH0331904A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH0331904A
JPH0331904A JP1165468A JP16546889A JPH0331904A JP H0331904 A JPH0331904 A JP H0331904A JP 1165468 A JP1165468 A JP 1165468A JP 16546889 A JP16546889 A JP 16546889A JP H0331904 A JPH0331904 A JP H0331904A
Authority
JP
Japan
Prior art keywords
sequence
inference
knowledge
control
programmable controller
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.)
Pending
Application number
JP1165468A
Other languages
Japanese (ja)
Inventor
Yoshito Tobe
戸辺 義人
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP1165468A priority Critical patent/JPH0331904A/en
Publication of JPH0331904A publication Critical patent/JPH0331904A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To obtain a rational programmable controller to execute a flexible control by adding a knowledge inference part and a knowledge storage part inside the programmable controller and executing an inference action when a specific event such as a trouble is generated in parallel to a sequence/ arithmetic control action. CONSTITUTION:A production system rule is stored in a knowledge storage part 6, and when the specific event is generated, an interruption is applied from a sequence/arithmetic control part 1 to a knowledge inference part 5. The knowledge inference part 5 executes the inference based on the input information of a sequence/arithmetic data storage part 3 and the rule in the knowledge storage part 6. The control is executed based on an inference result, and simultaneously, when the control is completed, the interruption is applied to the sequence/arithmetic control part 1, and a completion is reported. Thus, the sequence/arithmetic part 1 can continue the action while the knowledge inference part 5 executes the inference, and the rational programmable controller to execute the flexible control can be obtained.

Description

【発明の詳細な説明】 〔発明の目的〕 (産業上の利用分野) 本発明は、シーケンス演算を行うプロセッサの他に推論
エンジン機能を有するプロセッサを備えたプログラマブ
ルコントローラに関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Application Field) The present invention relates to a programmable controller that includes a processor that performs sequence operations as well as a processor that has an inference engine function.

(従来の技術〉 プログラマブルコントローラの基本的な構成を第7図に
示す。
(Prior Art) The basic configuration of a programmable controller is shown in FIG.

第7r!74において、シーケンス演算制御部1は入出
力部4からデータバス2を介して入力信号を取り込み、
シーケンス・演算データ記憶部3に組み込んだ制御論理
に従って制御出力を発生し、シーケンス・演算データ記
憶部上のデータを書き換えたり、データバスを介して操
作用機器を制御する。
7th r! At 74, the sequence calculation control unit 1 takes in the input signal from the input/output unit 4 via the data bus 2,
It generates a control output according to the control logic built into the sequence/calculation data storage section 3, rewrites the data on the sequence/calculation data storage section, and controls the operating equipment via the data bus.

シーケンス・演算データ記憶部上にはO8(オペレーテ
ィングシステム)を常駐させており、シ−ケンス・演算
制御部はユーザプログラムの実行命令を受けるとO8に
従ってシーケンス°演算データ記憶部から命令を取り出
して順次実行し、ユーザプログラムの最後に達すると、
すなわちニスキャンが終了すると、再びO8に制御を戻
す。
O8 (operating system) is resident on the sequence/calculation data storage unit, and when the sequence/calculation control unit receives a user program execution instruction, the sequence/calculation control unit retrieves instructions from the sequence/calculation data storage unit and sequentially executes them according to O8. When you run and reach the end of your user program,
That is, when the niscan is completed, control is returned to O8 again.

ユーザプログラムは通常、リレーのオン/オフで記述さ
れたラダーダイヤグラムであたえられ。
The user program is usually given in the form of a ladder diagram that describes turning on and off relays.

シーケンス命令および数値データの演算処理を指定する
Specifies sequence instructions and numerical data arithmetic processing.

プログラム制御を柔軟に行わせるには、制御規則にラダ
ーシーケンスだけではなく、プロダクションシステムル
ールを基本にした規則をも含ませることが望ましい。
In order to perform program control flexibly, it is desirable that the control rules include not only ladder sequences but also rules based on production system rules.

プロダクションシステムルールは次のようにif−th
enthsnされる。
The production system rule is if-th as follows
enthsn.

if    (起動条件lが真) (起動条件2が真) thsn   (結論事実1が真) (結論事実2が真) これを用いることによって、故障が発生したときの入力
情報をもとにした故障要因を記述することができ、実際
に故障が発生したら起動条件が真となる規則を導き出し
て制御を行う。
if (Start condition l is true) (Start condition 2 is true) thsn (Conclusion fact 1 is true) (Conclusion fact 2 is true) By using this, you can calculate the failure based on the input information when the failure occurs. The causes can be described, and control is performed by deriving a rule that makes the activation condition true when a failure actually occurs.

しかしながら第7図に示すプログラマブルコントローラ
で上記のプロダクションシステムルールに基づく制御を
行うと、 (1)規則をすべてラダーシーケンスにする必要があり
、このため漠然とした知識を表現するのに手間がかかり
、また拡張が容易でない。
However, when controlling based on the above production system rules using the programmable controller shown in Figure 7, (1) all the rules must be made into ladder sequences, which takes time and effort to express vague knowledge; Not easy to expand.

■ 故障を検出した後に要因を特定して、それに対応す
る制御を行っている動作中は、通常ラダーシーケンス制
御が中断される。
■ Ladder sequence control is normally interrupted when a failure is detected, the cause is identified, and the corresponding control is performed.

などの問題がある。There are other problems.

(発明が解決しようとする課題) 上述のように従来のプログラマブルコントローラの構成
では、故障など特定のイベントが発生したときの原因の
推論など1通常のシーケンス以外の動作を行わせるのに
難点がある。
(Problems to be Solved by the Invention) As mentioned above, with the configuration of the conventional programmable controller, it is difficult to perform operations other than the normal sequence, such as inferring the cause when a specific event such as a failure occurs. .

本発明はプログラマブルコントローラの内部に知識推論
部および知識記憶部を付加し、故障など特定のイベント
が発生したときの推論動作を、シーケンス・演算制御動
作と並列に行い、これによって柔軟な制御を可能とする
合理的なプログラマブルコントローラを提供することを
目的としている。
The present invention adds a knowledge inference section and a knowledge storage section inside a programmable controller, and performs inference operations when a specific event such as a failure occurs in parallel with sequence/arithmetic control operations, thereby enabling flexible control. The purpose is to provide a rational programmable controller that can

〔発明の構成〕[Structure of the invention]

(課題を解決するための手段と作用) 本発明はラダーダイヤグラムに基づくシーケンス制御規
則、数値データの演算およびO8の実行を行うシーケン
ス・演算制御用プロセッサの他に、プロダクションシス
テムルール形の知識をコンパイルしたコードを格納るす
知識記憶部、シーケンス・演算データおよび知識により
推論を行う知識推論部から成る知識推論用プロセッサを
備え、シーケンス・演算制御用プロセッサから知識推論
用プロセッサに割込みをかけることによってシーケンス
・演算制御と並列して推論を行うプログラマブルコント
ローラであり、プロダクションシステムルールを知識記
憶部に格納しておき、特定イベントが発生するとシーケ
ンス・演算制御部から知識推論部に割込みをかけ、知識
推論部はシーケンス・演算データ記憶部の入力情報およ
び知識記憶部内の規則に基づいて推論を行い、推論結果
に基づいて制御を行うと共に、制御が終了するとシーケ
ンス・演算制御部に割込みをかけて終了を通知する。
(Means and effects for solving the problem) The present invention compiles production system rule-type knowledge in addition to a sequence/calculation control processor that executes sequence control rules based on ladder diagrams, numerical data calculations, and O8. It is equipped with a knowledge inference processor consisting of a knowledge storage section that stores code that has been generated, and a knowledge inference section that makes inferences based on sequence/operation data and knowledge.・It is a programmable controller that performs inference in parallel with arithmetic control. Production system rules are stored in the knowledge storage section, and when a specific event occurs, the sequence/arithmetic control section interrupts the knowledge inference section, and the knowledge inference section performs inference based on the input information in the sequence/calculation data storage unit and the rules in the knowledge storage unit, performs control based on the inference results, and when the control is completed, interrupts the sequence/calculation control unit to notify the completion. do.

これによってシーケンス・演算$II御部は知識推論部
が推論を実行中も動作を続けることができる。
This allows the sequence/arithmetic $II control section to continue operating even while the knowledge inference section is performing inference.

(実施例) 本発明の一実施例を第1図〜第3図に示す。(Example) An embodiment of the present invention is shown in FIGS. 1 to 3.

第1図は本発明の基本的なシステム構成図、第2図は第
1図に対応する具体的な構成を示す系統図、第3図はそ
の動作を示すフローチャートである。
FIG. 1 is a basic system configuration diagram of the present invention, FIG. 2 is a system diagram showing a specific configuration corresponding to FIG. 1, and FIG. 3 is a flowchart showing its operation.

第1図は従来の第7図に比べて知識推論部5゜知識記憶
部6および制御信号バス7が追加されている。
In FIG. 1, a knowledge inference section 5, a knowledge storage section 6, and a control signal bus 7 are added compared to the conventional FIG. 7.

また第2図に示すように1本発明では外部入出力袋[4
を通してラダーシーケンス制御情報およびプロダクショ
ンシステムルールをそれぞれシーケンス°演算データ記
憶装置M1およびルール知識袋置!M3に格納する。な
おO8は規格装置Ml内に常駐させておく。
Moreover, as shown in FIG.
Ladder sequence control information and production system rules are stored through the sequence calculation data storage device M1 and rule knowledge bag, respectively! Store in M3. Note that O8 is kept resident in the standard device Ml.

入出力装置4から制御開始指令が与えられると、演算制
御用プロセッサ原2は記憶装置Mlからユーザプログラ
ムを順次フェッチして実行し、命令がシーケンス制御命
令である場合にはシーケンス制御用プロセッサP1に実
行させる。
When a control start command is given from the input/output device 4, the arithmetic control processor source 2 sequentially fetches and executes the user program from the storage device Ml, and if the instruction is a sequence control instruction, it is sent to the sequence control processor P1. Let it run.

ユーザプログラムは第4図に示すように、ラダーシーケ
ンスファイル22とルールファイル23とをリンクして
作成する。なお第4図において、18はラダーシーケン
スソースファイル、19はルールソースファイル、20
はアセンブラ、21はコンパイラ。
The user program is created by linking a ladder sequence file 22 and a rule file 23, as shown in FIG. In FIG. 4, 18 is a ladder sequence source file, 19 is a rule source file, and 20 is a ladder sequence source file.
is an assembler, and 21 is a compiler.

24はリンカであり、25が実行ファイルである。24 is a linker, and 25 is an executable file.

また各オブジェクトファイルは第5図に示すような構造
をしており、ヘッダにはコード領域、データ領域、シン
ボル情報領域のサイズおよび各種識別子が記録され、シ
ンボル情報にはリンクするためのりロケータプルアドレ
スが記録される。
Each object file has a structure as shown in Figure 5. The header records the size of the code area, data area, symbol information area, and various identifiers, and the symbol information includes the locator pull address for linking. is recorded.

アセンブラあるいはコンパイラによって例えばリレー1
はR○1、リレー2はR○2のようにシンボル変換され
、同種入出力装置はラダーシーケンスとルールとで統一
されるようにし、またリンクされた実行モジュールは各
アドレスに従って記憶装置ff1M1.原3に分割して
ロードされる。
e.g. relay 1 by the assembler or compiler
is R○1, relay 2 is symbol-converted as R○2, the same type of input/output devices are unified by the ladder sequence and rules, and the linked execution modules are stored in the storage devices ff1M1 . The original file is divided into three parts and loaded.

また記憶装置MlはO8部分、シーケンス命令部分、デ
ータ部分に分割され、記憶袋[原2には記憶装置Mlと
同一のデータが記録される。
The storage device Ml is divided into an O8 portion, a sequence instruction portion, and a data portion, and the same data as the storage device Ml is recorded in the storage bag [original 2].

記憶装置原2はデュアルポートメモリであり、内部バス
およびプロセッサP3の両方からアクセスできる。
Storage device source 2 is a dual port memory and is accessible from both the internal bus and processor P3.

また記憶装置Mlと記憶装置原2のデータが同一になる
ように、記憶装置制御回路16が設けられており、この
回路はシーケンス命令のみを行うプロセッサP1および
O8の実行と数値演算を行うプロセッサP2のどちらか
一方が記憶袋[Mlに対して書込み制御信号を発生させ
ると同時に、記憶袋[原2に対しても同じアドレスに書
込み信号を出し、また読取り信号を発生させるときには
、記憶装置[Mlから出たデータを記憶装置1M2上の
同じアドレスに書き込むように制御を行い、これによっ
てユーザプログラムでアクセスするすべてのデータが記
憶袋[Mlと記憶袋[原2とで同じになるようにしてい
る。
In addition, a storage device control circuit 16 is provided so that the data in the storage device Ml and the storage device original 2 are the same, and this circuit controls the execution of the processors P1 and O8, which perform only sequence instructions, and the processor P2, which performs numerical operations. When one of the two generates a write control signal for the memory bag [Ml, it simultaneously outputs a write signal to the same address for the memory bag [Original 2] and also generates a read signal, the memory device [Ml Control is performed so that the data output from Ml is written to the same address on the storage device 1M2, so that all the data accessed by the user program is the same in the memory bag [Ml] and the memory bag [Original 2]. .

制御がO8からユーザプログラムに移ると、プロセッサ
P2は命令を解読し、シーケンス命令であればプロセッ
サP1に実行させ、それ以外は順次ステップを追って記
憶装置1M1から命令をフェッチして実行する。
When control is transferred from O8 to the user program, processor P2 decodes the instruction, and if it is a sequence instruction, it is executed by processor P1, and other instructions are sequentially fetched from storage device 1M1 and executed step by step.

この間、記憶袋[Mlと記憶装置原2との間ではデータ
の同一性が保たれている。
During this time, data identity is maintained between the memory bag [Ml and the storage device base 2].

次に特定イベント発生時の動作を第3図のフローチャー
トを参照して説明する。
Next, the operation when a specific event occurs will be explained with reference to the flowchart shown in FIG.

プロセッサP2に予め決めておいた特定イベントに対応
する割込みがかかると、第6図に示すようにプロセッサ
P2は推論用プロセッサP3に割込みをかけ、プロセッ
サP3はプロセッサP2から割込みを受けると記憶装置
[原3から知識ベースコードを順次読出して実行する6 推論中のデータがイベント発生時のデータであることを
保証するために記憶装置制御回路16は。
When processor P2 receives an interrupt corresponding to a predetermined specific event, processor P2 interrupts inference processor P3 as shown in FIG. 6, and when processor P3 receives an interrupt from processor P2, it interrupts storage device [ The storage device control circuit 16 sequentially reads and executes the knowledge base code from the source 3 to ensure that the data being inferred is the data at the time the event occurred.

プロセッサP2からプロセッサP3に対して割込みがか
かると同時に記憶装置原2の内部データへの書込みを禁
止する。
At the same time as the processor P2 issues an interrupt to the processor P3, writing to the internal data of the storage device source 2 is prohibited.

このようにしてプロセッサP3は記憶装置対3の知識と
記憶装置原2のデータに基づいて推論を行い、この間プ
ロセッサP2はシーケンス制御動作を続行する。
Processor P3 thus makes inferences based on the knowledge of storage pair 3 and the data of storage original 2, while processor P2 continues its sequence control operations.

プロセッサP3は推論を終了すると推論結果を記憶装置
12の所定領域に書込み、プロセッサP2に対して推論
終了を通知する割込みをかける。
When the processor P3 finishes the inference, it writes the inference result into a predetermined area of the storage device 12, and issues an interrupt to the processor P2 to notify the end of the inference.

これによってプロセッサP2は記憶袋[原2から推論結
果を参照し、入出力装置4の1つ例えばCRTに対して
出力するなどの動作を行う。
As a result, the processor P2 refers to the inference result from the storage bag [original 2] and performs operations such as outputting it to one of the input/output devices 4, for example, a CRT.

推論終了と同時に記憶装置制御回路16は再び上に述べ
た方法で記憶装置原2のデータを記憶装置Mlのデータ
に更新し、ニスキャンタイム後には同一のデータとなる
Simultaneously with the completion of the inference, the storage device control circuit 16 again updates the data in the storage device original 2 to the data in the storage device M1 using the method described above, and after the niscan time, the data becomes the same.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明によれば、シーケンス制御中
に知識ベースを用いた推論を行うことが可能となり、こ
れによって柔軟な制御を行う合理的なプログラマブルコ
ントローラが得られる。
As described above, according to the present invention, it becomes possible to perform inference using a knowledge base during sequence control, thereby providing a rational programmable controller that performs flexible control.

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

第1図は本発明によるプログラマブルコントローラの一
実施例を示す基本的なシステム構成図、第2図はその具
体的な構成を示す系統図、第3図はその動作を示すフロ
ーチャート、第4図はユーザプログラムの作成方法を示
す図、第5図はユーザプログラムオブジェクトファイル
の構成を示す図、第6図は推論動作のタイミング図、第
7図は従来のプログラマブルコントローラの一例を示す
システム構成図である。 l・・・シーケンス・演算制御部 2・・・データバス 3・・・シーケンス・演算データ記憶部4・・・入出力
部    5・・・知識推論部6・・・知識記憶部  
 7・・・制御信号バス14・・・制御線     1
5・・・アドレス16・・・記憶装置制御回路  17
・・・ゲート18・・・ラダーシーケンスソースファイ
ル19・・・ルールソースファイル 20・・・アセン
ブラ21・・・コンパイラ 22・・・ラダーシーケンスオブジェクトファイル23
・・ルールオブジェクトファイル 24・・・リンカ     25・・・実行ファイルM
L、M2・・・シーケンス・演算データ記憶装置M3・
・・ルール知識記憶装置 Pl・・・シーケンス制御用プロセッサP2・・・演算
制御用プロセッサ P3・・・知識推論用プロセッサ
FIG. 1 is a basic system configuration diagram showing an embodiment of the programmable controller according to the present invention, FIG. 2 is a system diagram showing its specific configuration, FIG. 3 is a flowchart showing its operation, and FIG. FIG. 5 is a diagram showing a user program creation method, FIG. 5 is a diagram showing the structure of a user program object file, FIG. 6 is a timing diagram of inference operation, and FIG. 7 is a system configuration diagram showing an example of a conventional programmable controller. . l... Sequence/calculation control unit 2... Data bus 3... Sequence/calculation data storage unit 4... Input/output unit 5... Knowledge inference unit 6... Knowledge storage unit
7... Control signal bus 14... Control line 1
5...Address 16...Storage device control circuit 17
... Gate 18 ... Ladder sequence source file 19 ... Rule source file 20 ... Assembler 21 ... Compiler 22 ... Ladder sequence object file 23
...Rule object file 24...Linker 25...Executable file M
L, M2...Sequence/calculation data storage device M3/
...Rule knowledge storage device Pl...Sequence control processor P2...Arithmetic control processor P3...Knowledge inference processor

Claims (1)

【特許請求の範囲】[Claims] オペレーティングシステムの実行、入出力データの演算
処理、およびラダーシーケンスの実行を行うシーケンス
・演算制御部、上記の演算制御に用いるデータを記憶す
るシーケンス・演算記憶部、入出力部、およびこれらの
間でデータを伝送するデータバスを備えたプログラマブ
ルコントローラにおいて、プロダクションシステムルー
ルの形で記述された知識ベースをコンパイルしたコード
を記憶する知識記憶部、上記記憶されたデータおよび知
識ベースに基づいて推論を行う知識推論部、およびイベ
ント発生時に上記シーケンス・演算制御部から知識推論
部に割込をかけて起動させ、推論が終了すると知識推論
部からシーケンス・演算制御部に割込みをかけて推論終
了を通知すると共に推論結果を上記知識記憶部に書込み
、上記シーケンス・演算制御部がこの推論結果を参照で
きるようにする割込機能を備えたことを特徴とするプロ
グラマブルコントローラ。
A sequence/arithmetic control unit that executes the operating system, arithmetic processing of input/output data, and ladder sequence execution, a sequence/arithmetic storage unit that stores data used for the above arithmetic control, an input/output unit, and an input/output unit between these. In a programmable controller equipped with a data bus for transmitting data, a knowledge storage unit stores code compiled from a knowledge base written in the form of production system rules, and knowledge for making inferences based on the stored data and the knowledge base. When an event occurs, the knowledge inference unit is activated by an interrupt from the inference unit and the sequence/calculation control unit, and when the inference is completed, the knowledge inference unit interrupts the sequence/calculation control unit to notify the completion of the inference. A programmable controller characterized in that the programmable controller is provided with an interrupt function that writes an inference result to the knowledge storage section and allows the sequence/arithmetic control section to refer to the inference result.
JP1165468A 1989-06-29 1989-06-29 Programmable controller Pending JPH0331904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1165468A JPH0331904A (en) 1989-06-29 1989-06-29 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1165468A JPH0331904A (en) 1989-06-29 1989-06-29 Programmable controller

Publications (1)

Publication Number Publication Date
JPH0331904A true JPH0331904A (en) 1991-02-12

Family

ID=15812988

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1165468A Pending JPH0331904A (en) 1989-06-29 1989-06-29 Programmable controller

Country Status (1)

Country Link
JP (1) JPH0331904A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015156104A (en) * 2014-02-20 2015-08-27 三菱電機株式会社 Self-controlling system, self-controlling device, self-controlling method, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015156104A (en) * 2014-02-20 2015-08-27 三菱電機株式会社 Self-controlling system, self-controlling device, self-controlling method, and program

Similar Documents

Publication Publication Date Title
JP3990332B2 (en) Data processing system
JPH0331904A (en) Programmable controller
JPH11272310A (en) Emulation device for programmable controller
JPS63214804A (en) Processor for plc and plc
JP4633073B2 (en) Data processing system
JP2793809B2 (en) Applied instruction processing method of programmable controller
JPS623341A (en) Conditional control method
JPS63249206A (en) Programmable controller
JPH04230533A (en) Interruption control circuit
JP3481039B2 (en) Programmable controller
JP2573391B2 (en) Programmable controller
JP2000029508A (en) Programmable controller
JP2622026B2 (en) Register writing control method in central processing unit
JPH04123229A (en) Pipeline controller
JPS5835648A (en) Program execution controlling system
JPS6362046A (en) Firmware simulator
JP2000242524A (en) Software simulator for processor
JPS59158449A (en) Debugging device
JPH08106307A (en) Programmable controller
JPH01306932A (en) Method for testing data processor
JPH077346B2 (en) Data flow computer debugging method
JPS61100802A (en) Operation processing system of programmable sequence controller
JPS626343A (en) Computer program debugging device
JPS58125154A (en) State hysteresis storing system
JPH01205337A (en) Instruction control system