JP2001005505A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JP2001005505A
JP2001005505A JP11170982A JP17098299A JP2001005505A JP 2001005505 A JP2001005505 A JP 2001005505A JP 11170982 A JP11170982 A JP 11170982A JP 17098299 A JP17098299 A JP 17098299A JP 2001005505 A JP2001005505 A JP 2001005505A
Authority
JP
Japan
Prior art keywords
cpu
interrupt
refresh
memory
user program
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.)
Granted
Application number
JP11170982A
Other languages
Japanese (ja)
Other versions
JP4349687B2 (en
Inventor
Eisuke Nagano
英輔 永野
Hideo Shimokawa
日出男 下川
Sakae Nishijima
栄 西島
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.)
Omron Corp
Fujifilm Holdings Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
Fuji Photo Film Co Ltd
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 Omron Corp, Omron Tateisi Electronics Co, Fuji Photo Film Co Ltd filed Critical Omron Corp
Priority to JP17098299A priority Critical patent/JP4349687B2/en
Publication of JP2001005505A publication Critical patent/JP2001005505A/en
Application granted granted Critical
Publication of JP4349687B2 publication Critical patent/JP4349687B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain superior extensibility by equipping a 1st CPU with a cyclic executing means which cyclically performs a user program executing process and an I/O refreshing execution control process and an interruption execution control means which informs a 2nd CPU of the completion of refreshing after interruption. SOLUTION: The 1st (main) CPU 2 performs a common process, a user program executing process, an I/O refreshing process, and a peripheral service process as cycle processes, and refers to and updates an I/O memory 27 in the respective processes. The main CPU 2 refers to and updates corresponding areas (A, B, and C) of the I/O memory with successive reports of interruption levels 0 and 1 to 3 from a 2nd (sub)CPU 3. The sub-CPU 3 requests I/O refreshing and interruption task execution which are performed in arbitrary timing of the sub-CPU 3 in addition to peripheral service processes as cycle processes similar to the main CPU 2.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、プログラマブル
・コントローラ(一般に、PLC等と称される)に係
り、特に、所謂マルチCPUタイプのプログラマブル・
コントローラに関する。
The present invention relates to a programmable controller (generally referred to as a PLC or the like), and more particularly to a so-called multi-CPU type programmable controller.
Regarding the controller.

【0002】[0002]

【従来の技術】主CPUに対して副CPUを追加するこ
とにより、CPUをオプションとして拡張できるように
したPLCは、従来より知られている。この種のPLC
における主CPUと副CPUの役割分担は、主CPUか
ら実行要求を受けて副CPUがコプロセッサとして動作
する、若しくは、両CPUが対等の関係で互いに並列に
動作すると言ったスケジューリング形態が一般的であ
る。
2. Description of the Related Art PLCs in which a CPU can be extended as an option by adding a sub CPU to a main CPU have been conventionally known. This kind of PLC
, The roles of the main CPU and the sub CPU are generally divided into a scheduling mode in which the sub CPU operates as a coprocessor in response to an execution request from the main CPU, or both CPUs operate in parallel with each other on an equal basis. is there.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来の
拡張可能なCPUを備えたPLCにおいては、以下のよ
うな問題点が指摘されている。
However, the following problems have been pointed out in the conventional PLC having an expandable CPU.

【0004】(1)オプションとして搭載した副CPU
の特徴を、PLC全体としての制御動作に反映させるこ
とが困難である。また、このような機能を実現するため
には、予め主CPU側にその制御動作を実現するための
スケジューリング機能を搭載しておく必要があり、当然
に、価格の高騰が招来される。
(1) Sub CPU mounted as an option
It is difficult to reflect the above characteristic in the control operation of the entire PLC. In addition, in order to realize such a function, it is necessary to previously mount a scheduling function for realizing the control operation on the main CPU side, which naturally increases the price.

【0005】(2)両CPUが並列動作するPLCにお
いては、各CPU毎に独立した動作となり、任意のタイ
ミングでデータの受け渡しができない(同期処理が必要
となる)。このため、CPUの制御性能を落としている
のが通常である。
(2) In a PLC in which both CPUs operate in parallel, the operation is independent for each CPU, and data cannot be transferred at an arbitrary timing (synchronization processing is required). For this reason, the control performance of the CPU is usually reduced.

【0006】この発明は、このような従来の問題点に着
目してなされたものであり、その目的とするところは、
拡張性に優れると共に、拡張後にあっては、個々のCP
Uの機能を最大限に発揮させることができ、さらに、比
較的に低価格で製作することが可能なマルチCPUタイ
プのPLCを提供することにある。
[0006] The present invention has been made in view of such conventional problems.
It is excellent in expandability, and after expansion, each CP
An object of the present invention is to provide a multi-CPU type PLC which can make the most of the functions of U and can be manufactured at a relatively low price.

【0007】[0007]

【課題を解決するための手段】この出願の請求項1に記
載の発明は、第1のCPUと、第2のCPUと、第1の
CPUに内蔵されたI/Oメモリに対して第2のCPU
からのアクセスを可能とするためのオプションバスと、
第2のCPUから第1のCPUに対して割り込みを掛け
るための割り込みラインとを有し、前記第1のCPUに
は、ユーザプログラム実行処理とI/Oリフレッシュ実
行処理とをサイクリックに行うサイクリック実行制御手
段と、第2のCPUから割り込み要求が到来したとき
に、I/Oメモリ内の特定I/O領域に関するI/Oリ
フレッシュ実行処理を割り込みで行い、その後、リフレ
ッシュ完了を第2のCPUへ通知する割り込み実行制御
手段と、が少なくとも設けられ、かつ前記第2のCPU
には、第1のCPUに対してサイクリックに割り込み要
求を送出すると共に、これに応答して第1のCPUから
リフレッシュ完了が通知されるのを待って、ユーザプロ
グラム実行処理を行なうサイクリック実行制御手段が設
けられている、ことを特徴とするプログラマブル・コン
トローラにある。
According to the first aspect of the present invention, a first CPU, a second CPU, and an I / O memory built in the first CPU are stored in a second CPU. CPU
An optional bus to enable access from
An interrupt line for interrupting the first CPU from the second CPU, wherein the first CPU cyclically executes a user program execution process and an I / O refresh execution process; Click execution control means and, when an interrupt request arrives from the second CPU, performs an I / O refresh execution process relating to a specific I / O area in the I / O memory by interruption, and thereafter, completes the refresh operation by the second CPU. Interrupt execution control means for notifying the CPU, and the second CPU
In response to this, a cyclic interrupt request is sent to the first CPU, and in response to the request, the completion of the refresh is notified from the first CPU. The programmable controller is provided with control means.

【0008】ここで、『CPU』とは、少なくともユー
ザプログラム実行機能を有するプログラマブル・コント
ローラの中央処理装置を言う。また、割り込みでリフレ
ッシュすべき『I/O領域』の特定は、当該割り込みと
関連づけて予め固定しておいてもよいし、第2のCPU
から送出される割り込み要求で別途に指定するようにし
てもよい。また、『プログラマブル・コントローラ』な
る語には、CPUユニット、I/Oユニット、電源ユニ
ット等からなるビルディング・ブロック型のものと、す
べての回路要素を1個のハウジングに収めた一体型のも
のとの双方を含んでいる。さらに、特にこの請求項で使
用される『プログラマブル・コントローラ』なる語に
は、ビルディング・ブロック型のプログラマブル・コン
トローラにおけるCPUユニットそのもの(すなわち、
電源ユニットやI/Oユニット等を含まないCPU装置
単体)も含めている。
Here, "CPU" means a central processing unit of a programmable controller having at least a user program execution function. The specification of the “I / O area” to be refreshed by the interrupt may be fixed in advance in association with the interrupt, or the second CPU
May be separately specified by an interrupt request sent from the server. The term "programmable controller" includes a building block type including a CPU unit, an I / O unit, and a power supply unit, and an integrated type in which all circuit elements are housed in one housing. Including both. Furthermore, the term "programmable controller" as used in this claim particularly refers to the CPU unit itself in a building block type programmable controller (ie,
CPU unit that does not include a power supply unit or an I / O unit).

【0009】そして、このような構成によれば、第1の
CPUにおいてユーザプログラムはI/Oリフレッシュ
を伴ってサイクリックに実行され、同時に、第2のCP
Uにおいてもユーザプログラムは割り込みによるI/O
リフレッシュを伴ってサイクリックに実行される。その
ため、各CPUは非同期で独立してユーザプログラムの
実行を行いつつも、入出力データの更新自体は各ユーザ
プログラムの実行周期で確実に行われることとなり、そ
の結果、個々のCPUの性能を最大限に発揮しつつ、高
精度な制御を実現することができる。
According to such a configuration, in the first CPU, the user program is cyclically executed with I / O refresh, and at the same time, the second CP is executed.
In U, the user program is also I / O by interrupt
Performed cyclically with refresh. Therefore, while each CPU independently executes the user program asynchronously, the update of the input / output data itself is reliably performed in the execution cycle of each user program, and as a result, the performance of each CPU is maximized. It is possible to realize high-precision control while maximizing the effect.

【0010】この出願の請求項2に記載の発明は、第1
のCPUに設けられた割り込み実行制御手段は、レベル
の異なる多重割り込みを受け付ける機能を有し、かつ各
レベルの割り込み要求が到来する毎に、その割り込みレ
ベルに応じてI/Oメモリ内の特定I/O領域に関する
I/Oリフレッシュ実行処理を割り込みで行い、その
後、リフレッシュ完了を第2のCPUへ通知するもので
あり、かつ第2のCPUに設けられたサイクリック実行
制御手段は、それぞれ固有のサイクルでレベルの異なる
多重割り込み要求を送出する機能を有し、かつ各レベル
の割り込み要求に応答してリフレッシュ完了が通知され
るのを待って、それぞれのレベルに対応するユーザプロ
グラム実行処理を行う、ことを特徴とする請求項1に記
載のプログラマブル・コントローラにある。
[0010] The invention described in claim 2 of the present application is the first invention.
The interrupt execution control means provided in the CPU has a function of accepting multiple interrupts of different levels, and each time an interrupt request of each level arrives, a specific I / O memory in the I / O memory according to the interrupt level. The I / O refresh execution processing relating to the / O area is performed by interruption, and thereafter, the completion of refresh is notified to the second CPU, and the cyclic execution control means provided in the second CPU has its own unique Having a function of transmitting multiple interrupt requests of different levels in a cycle, and performing a user program execution process corresponding to each level after waiting for notification of refresh completion in response to the interrupt request of each level; The programmable controller according to claim 1, wherein:

【0011】このような構成によれば、第1のCPUに
おいてユーザプログラムはI/Oリフレッシュを伴って
サイクリックに実行され、同時に、第2のCPUにおい
ても複数のユーザプログラムはそれぞれ割り込みによる
I/Oリフレッシュを伴ってかつ固有サイクルでサイク
リックに実行される。そのため、各CPUは非同期で独
立してユーザプログラムの実行を行いつつも、入出力デ
ータの更新自体は各ユーザプログラムの実行サイクル単
位で確実に行われることとなり、その結果、個々のCP
Uの性能を最大限に発揮しつつ、高精度な制御を実現す
ることができる。加えて、第2のCPUで実行される複
数のユーザプログラムはそれぞれ最適なサイクルで入出
力更新されるため、この面からも、高精度な制御が可能
となる。
According to such a configuration, in the first CPU, the user program is cyclically executed with I / O refresh, and at the same time, in the second CPU, a plurality of user programs are respectively executed by the I / O by the interrupt. Performed cyclically with O-refresh and in a unique cycle. Therefore, while each CPU independently executes the user program asynchronously, the update of the input / output data itself is surely performed in the unit of the execution cycle of each user program.
High-precision control can be realized while maximizing the performance of U. In addition, since a plurality of user programs executed by the second CPU are input / output updated at optimum cycles, high-precision control is possible from this aspect as well.

【0012】この出願の請求項3に記載の発明は、第1
のCPUに設けられた割り込み制御手段は、I/Oリフ
レッシュ実行処理に加えて、特定のユーザプログラム実
行処理を含む、ことを特徴とする請求項1又は2に記載
のプログラマブル・コントローラにある。
[0012] The invention described in claim 3 of this application is the first invention.
3. The programmable controller according to claim 1, wherein the interrupt control means provided in the CPU includes a specific user program execution process in addition to the I / O refresh execution process.

【0013】このような構成によれば、第1のCPUに
おいてユーザプログラムはI/Oリフレッシュを伴って
サイクリックに実行され、同時に、第2のCPUにおい
ても複数のユーザプログラムはそれぞれ割り込みによる
I/Oリフレッシュ(第1のCPU側で実行)並びに所
定のユーザプログラムの実行(第1のCPU側で実行)
を伴ってかつ固有サイクルでサイクリックに実行され
る。そのため、第2のCPU側におけるユーザプログラ
ムの実行は、第1のCPU側におけるユーザプログラム
の実行と連動することとなり、より一層多機能な制御が
可能となる。
According to such a configuration, the user program is cyclically executed with the I / O refresh in the first CPU, and at the same time, in the second CPU, a plurality of user programs are respectively executed by the I / O by the interrupt. O refresh (executed on the first CPU side) and execution of a predetermined user program (executed on the first CPU side)
And is cyclically executed in a unique cycle. Therefore, the execution of the user program on the second CPU side is linked with the execution of the user program on the first CPU side, so that a more versatile control can be performed.

【0014】この出願の請求項4に記載の発明は、第2
のCPUは第1のCPU内のI/Oメモリへ通ずるバス
ライン並びに第1のCPU内の割り込みラインを含むコ
ネクタに対して着脱自在であり、第1のCPUにて実行
されるユーザプログラムは主としてラダータスクであ
り、かつ第2のCPUにて実行されるユーザプログラム
は主としてデータ演算タスクである、ことを特徴とする
請求項1〜3のいずれかに記載のプログラマブル・コン
トローラにある。
[0014] The invention described in claim 4 of the present application is the second invention.
CPU is detachable from a connector including a bus line leading to an I / O memory in the first CPU and an interrupt line in the first CPU, and a user program executed by the first CPU is mainly 4. The programmable controller according to claim 1, wherein the ladder task and the user program executed by the second CPU are mainly data operation tasks.

【0015】ここで、『データ演算タスク』とは、例え
ば、PID演算や浮動小数点演算等が含まれる。
Here, the "data operation task" includes, for example, a PID operation and a floating point operation.

【0016】このような構成によれば、第2のCPUは
第1のCPUに対する増設用のオプションとして機能す
ることとなり、第1のCPUはI/O制御に特化してリ
ソース(ユーザメモリ等)や機能(高機能な命令サポー
ト)を削減できるため、ローコストでシンプルなPLC
を提供できる一方、必要に応じて第2のCPUを増設し
てデータ演算タスクを実行させることで、高機能化にも
容易に対応が可能となる。加えて、オプションとして搭
載した第2のCPUに内蔵させたスケジューリング機能
から割り込み通知にて、主たるCPUである第1のCP
Uの処理を実行できるため、第2のCPUの特徴をPL
C全体としての制御動作に反映させることができる。
According to such a configuration, the second CPU functions as an option for adding to the first CPU, and the first CPU specializes in I / O control and uses resources (such as user memory). Low cost and simple PLC because it can reduce the functions and functions (high-performance instruction support)
On the other hand, by adding a second CPU as needed to execute the data calculation task, it is possible to easily cope with higher functionality. In addition, the first CPU, which is the main CPU, is notified by an interrupt notification from a scheduling function built in the second CPU optionally mounted.
U can execute the processing of U
This can be reflected in the control operation of C as a whole.

【0017】この出願の請求項5に記載の発明は、周辺
I/Oバスに通ずる第1の外部接続端子と、少なくとも
I/Oデータの他に割り込み要求フラグ並びにリフレッ
シュ完了フラグが格納されるI/Oメモリと、外部から
I/Oメモリに対するアクセスを可能とするための第2
の外部接続端子と、ユーザプログラムが格納されるユー
ザプログラムメモリと、を有すると共に、ユーザプログ
ラムメモリに格納された特定のユーザプログラムに関し
て、ユーザプログラム実行処理とI/Oリフレッシュ実
行処理とをサイクリックに行うサイクリック実行制御手
段と、割り込み要求フラグがセットされたときに、I/
Oメモリ内の特定I/O領域に関するI/Oリフレッシ
ュ実行処理を割り込みで行い、その後、リフレッシュ完
了フラグをセットする割り込み実行制御手段と、が少な
くとも設けられている、ことを特徴とするプログラマブ
ル・コントローラの増設可能なCPUにある。
According to a fifth aspect of the present invention, the first external connection terminal connected to the peripheral I / O bus and the I / O data in which an interrupt request flag and a refresh completion flag are stored in addition to at least I / O data. / O memory and a second memory for enabling external access to the I / O memory
And an external connection terminal, and a user program memory for storing the user program. The user program execution process and the I / O refresh execution process are cyclically performed for a specific user program stored in the user program memory. A cyclic execution control means for performing the operation, and an I / O when the interrupt request flag is set.
At least an interrupt execution control means for performing an I / O refresh execution process relating to a specific I / O area in the O memory by an interrupt, and thereafter setting a refresh completion flag. CPUs that can be added.

【0018】このような構成によれば、単独でプログラ
マブル・コントローラのCPU装置として機能すること
は勿論のこと、外部より割り込み要求を与えて特定I/
O領域に関するI/Oリフレッシュ実行処理を行わせる
一方、リフレッシュ完了フラグがセットされたことに応
答して、他のCPUからI/Oメモリの内容を参照して
ユーザ命令を実行することにより、マルチCPU形式の
PLCに拡張することができる。
According to such a configuration, it is possible to function as a CPU of a programmable controller by itself, and also to provide an external
While performing the I / O refresh execution process relating to the O area, in response to the setting of the refresh completion flag, the other CPU refers to the contents of the I / O memory and executes the user instruction to execute the multi instruction. It can be extended to a CPU type PLC.

【0019】この出願の請求項6に記載の発明は、割り
込み実行制御手段は、レベルの異なる多重割り込みを受
け付ける機能を有し、かつ各レベルの割り込み要求フラ
グがセットされる毎に、I/Oメモリ内の特定I/O領
域に関するI/Oリフレッシュ実行処理を割り込みで行
い、その後、リフレッシュ完了フラグをセットする、こ
とを特徴とする請求項5に記載のプログラマブル・コン
トローラの増設可能なCPUにある。
In the invention described in claim 6 of the present application, the interrupt execution control means has a function of receiving multiple interrupts having different levels, and each time an interrupt request flag of each level is set, the I / O is executed. 6. The CPU as claimed in claim 5, wherein an I / O refresh execution process for a specific I / O area in the memory is performed by interruption, and thereafter, a refresh completion flag is set. .

【0020】このような構成によれば、外部より多重割
り込み要求を与えて当該割り込みレベルに対応する特定
I/O領域に関するI/Oリフレッシュ実行処理を行わ
せる一方、リフレッシュ完了フラグがセットされたこと
に応答して、他のCPUからI/Oメモリの当該割り込
みレベルに対応する内容を参照してユーザ命令を実行す
ることにより、マルチCPU形式のCPU装置に拡張す
ることができる。
According to such a configuration, while a multiple interrupt request is given from the outside to perform the I / O refresh execution processing for the specific I / O area corresponding to the interrupt level, the refresh completion flag is set. In response to this, the CPU can be expanded to a multi-CPU type CPU device by executing a user instruction from another CPU with reference to the content corresponding to the interrupt level in the I / O memory.

【0021】この出願の請求項7に記載の発明は、請求
項5に記載のプログラマブル・コントローラのCPUに
接続して使用されるものであって、割り込みラインとデ
ータ入出力バスとを含む外部コネクタと、ユーザプログ
ラムが格納されるユーザプログラムメモリとを有すると
共に、前記外部コネクタに対してサイクリックに割り込
み要求を送出すると共に、外部コネクタを介してリフレ
ッシュ完了通知が取得されるのを待って、ユーザプログ
ラムメモリに格納されたユーザプログラムの実行処理を
行なうサイクリック実行制御手段が設けられている、こ
とを特徴とするプログラマブル・コントローラの増設用
CPUにある。
According to a seventh aspect of the present invention, there is provided an external connector including an interrupt line and a data input / output bus connected to a CPU of the programmable controller according to the fifth aspect. And a user program memory in which a user program is stored, cyclically sends an interrupt request to the external connector, and waits for a refresh completion notification to be obtained via the external connector. An additional CPU for a programmable controller is provided with a cyclic execution control means for executing a process of executing a user program stored in a program memory.

【0022】そして、このような構成によれば、請求項
5に記載のCPUに接続して使用した場合、自分が主導
権を握ってI/Oメモリの内容を更新しつつ、その更新
内容を参照して自分のユーザプログラムを実行すること
ができ、元のCPUの機能を損ねることなく、目的とす
る拡張機能を実現することができる。
According to this configuration, when connected to the CPU according to claim 5 and used, the updated contents of the I / O memory are updated while the contents of the I / O memory are updated by owning the initiative. The user can refer to and execute his / her own user program, and can achieve a desired extended function without impairing the function of the original CPU.

【0023】この出願の請求項8に記載の発明は、サイ
クリック実行制御手段は、それぞれ固有のサイクルでレ
ベルの異なる多重割り込み要求を送出する機能を有し、
かつ各レベルの割り込み要求に対してリフレッシュ完了
が通知されるのを待って、それぞれのレベルに対応する
ユーザプログラム実行処理を行う、ことを特徴とする請
求項7に記載のプログラマブル・コントローラの増設用
CPUにある。
According to the invention described in claim 8 of this application, the cyclic execution control means has a function of transmitting multiple interrupt requests having different levels in each unique cycle,
8. The additional programmable controller according to claim 7, wherein a user program execution process corresponding to each level is performed after the completion of the refresh is notified in response to the interrupt request of each level. In the CPU.

【0024】このような構成によれば、前項の効果に加
えて、入出力応答時間の異なる複数の拡張用ユーザプロ
グラムを最適に実行することができる。
According to such a configuration, in addition to the effects described in the preceding section, a plurality of extension user programs having different input / output response times can be optimally executed.

【0025】[0025]

【発明の実施の形態】以下に、この発明の好適な実施の
一形態を添付図面に従って詳細に説明する。本発明に係
るプログラマブル・コントローラの全体が図1のブロッ
ク図に示されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings. The entirety of a programmable controller according to the present invention is shown in the block diagram of FIG.

【0026】同図に示されるように、このPLCのCP
U装置1は、第1のCPUであるメインCPU2(増設
可能なCPU)と第2のCPUであるサブCPU(増設
用CPU)3とから構成されている。
As shown in FIG.
The U device 1 includes a main CPU 2 (a CPU that can be added) as a first CPU and a sub CPU (an additional CPU) 3 that is a second CPU.

【0027】メインCPU2及びサブCPU3は、この
例では、それぞれ専用の回路基板上に後述する各種の回
路部品を搭載すると共に、それらの回路基板を専用のハ
ウジングに収容して構成されている。
In this example, the main CPU 2 and the sub CPU 3 are configured such that various circuit components described later are mounted on dedicated circuit boards, respectively, and the circuit boards are housed in dedicated housings.

【0028】メインCPU2のハウジングには、周辺I
/Oバスに通ずるコネクタ21と、外部からI/Oメモ
リ27に対するアクセス並びにMPU23に対する割り
込みを可能とするためのコネクタ22とを備えている。
一方、サブCPU3のハウジングには、内部MPUバス
B4の導出並びに内部割り込み信号ラインL2の導出を
行うためのコネクタ31が設けられている。
The housing of the main CPU 2 has peripheral I
A connector 21 is provided for communicating with the I / O memory 27 and a connector 22 for enabling interruption to the MPU 23 from outside.
On the other hand, the housing of the sub CPU 3 is provided with a connector 31 for leading out the internal MPU bus B4 and leading out the internal interrupt signal line L2.

【0029】なお、図において、L1はメインCPU2
内に配線された割り込み信号ライン、L2はサブCPU
3内に配線された割り込み信号ライン、L3はコネクタ
31とコネクタ22とを繋ぐ割り込み信号ライン、B1
はメインCPU2内のMPUバス、B2はメインCPU
内のI/Oメモリ27とバスアービタ28とを繋ぐバ
ス、B3はバスアービタ28とコネクタ22とを繋ぐオ
プションバス、B4はサブCPU3内のMPUバス、B
5はMPUバスとコネクタ31とを繋ぐオプションバ
ス、B6はコネクタ31とコネクタ22とを繋ぐオプシ
ョンバスである。
In the figure, L1 is the main CPU 2
The interrupt signal line wired inside, L2 is the sub CPU
3, an interrupt signal line L3, an interrupt signal line connecting the connector 31 and the connector 22,
Is the MPU bus in the main CPU2, B2 is the main CPU
B3 is an optional bus connecting the bus arbiter 28 and the connector 22, B4 is an MPU bus in the sub CPU 3, and B3 is an optional bus connecting the bus arbiter 28 and the connector 22.
5 is an optional bus connecting the MPU bus and the connector 31, and B6 is an optional bus connecting the connector 31 and the connector 22.

【0030】メインCPU2内には、MPU(Micro Pr
ocesser Unitの略)23、システムプログラムメモリ2
4、システムワークメモリ25、ユーザプログラムメモ
リ26、I/Oメモリ27、バスアービタ28等が含ま
れている。
In the main CPU 2, an MPU (Micro Pr
ocesser Unit) 23, system program memory 2
4, system work memory 25, user program memory 26, I / O memory 27, bus arbiter 28, and the like.

【0031】MPU23は、メインCPU2の全体を統
括制御するものであり、そのMPUバスB1には、シス
テムプログラムメモリ24、システムワークメモリ2
5、ユーザプログラムメモリ26、I/Oメモリ27、
バスアービタ28等が接続されれている。
The MPU 23 controls the overall operation of the main CPU 2. The MPU bus B 1 has a system program memory 24 and a system work memory 2.
5, user program memory 26, I / O memory 27,
A bus arbiter 28 and the like are connected.

【0032】システムプログラムメモリ24は不揮発性
のROMで構成され、その内部にはメインCPU2の全
体の機能を規定するシステムプログラムが格納されてい
る。先に説明した、MPU23はこのシステムプログラ
ムに従って動作するようになされている。
The system program memory 24 is constituted by a non-volatile ROM, and stores therein a system program for defining the entire functions of the main CPU 2. The MPU 23 described above operates according to this system program.

【0033】システムワークメモリ25はRAMで構成
され、その内部にはメインCPU2の動作状態や処理経
過を表わすシステムワークデータが格納される。
The system work memory 25 is composed of a RAM, in which system work data indicating the operation state of the main CPU 2 and the progress of processing is stored.

【0034】ユーザプログラムメモリ26はPROMや
フラッシュメモリ等で構成され、その内部には、ユーザ
により作成されたラダープログラム等のユーザプログラ
ムが格納される。
The user program memory 26 is composed of a PROM, a flash memory or the like, and stores therein a user program such as a ladder program created by a user.

【0035】I/Oメモリ27はRAMで構成され、そ
の内部にはメインCPU2に接続された周辺I/Oのオ
ン/オフ状態や、ユーザプログラムで行われたデータ演
算結果などが格納される。
The I / O memory 27 is composed of a RAM, and stores therein an on / off state of peripheral I / O connected to the main CPU 2, a result of data operation performed by a user program, and the like.

【0036】パスアービタ28は、2つのCPU2,3
からI/Oメモリ27に対するメモリアクセスを調整す
る機能を有するもので、これによりI/Oメモリ27は
メインCPU2以外にも、オプションCPUバスB5を
介してサブCPUモジュールから参照・更新することが
可能とされている。
The path arbiter 28 includes two CPUs 2 and 3
Has the function of adjusting the memory access to the I / O memory 27 from the I / O memory 27, whereby the I / O memory 27 can be referenced and updated from the sub CPU module via the optional CPU bus B5 in addition to the main CPU 2. It has been.

【0037】周辺I/Oバス用のコネクタ21は、メイ
ンCPU2が周辺I/Oモジュール(図示せず)に対し
てI/Oリフレッシュをするための機能を果たすもので
ある。
The peripheral I / O bus connector 21 performs a function for the main CPU 2 to perform I / O refresh for a peripheral I / O module (not shown).

【0038】一方、サブCPU3内にも、同様にしてM
PU31、システムプログラムメモリ32、システムワ
ークメモリ33、ユーザプログラムメモリ34等が格納
されている。
On the other hand, in the sub CPU 3, M
A PU 31, a system program memory 32, a system work memory 33, a user program memory 34, and the like are stored.

【0039】MPU31はサブCPU3の全体を統括制
御するものであり、そのMPUバスB4には、システム
プログラムメモリ32、システムワークメモリ33、ユ
ーザプログラムメモリ34が接続されている。
The MPU 31 controls the whole of the sub CPU 3. The MPU bus B 4 is connected to a system program memory 32, a system work memory 33, and a user program memory 34.

【0040】システムプログラムメモリ32は不揮発性
のROMで構成されており、その内部にはサブCPU3
のシステムプログラムが格納されており、MPU31は
このシステムプログラムに従って動作する。
The system program memory 32 is constituted by a non-volatile ROM, in which a sub CPU 3
The MPU 31 operates according to this system program.

【0041】システムワークメモリ33はRAMで構成
されており、その内部にはサブCPU3の動作状態や処
理経過を表わすシステムワークデータが格納される。
The system work memory 33 is composed of a RAM, and stores therein system work data indicating the operating state of the sub CPU 3 and the progress of processing.

【0042】ユーザプログラムメモリ34はPROMや
フラッシュROM等で構成されており、これにはサブC
PU3のユーザプログラムが格納されている。
The user program memory 34 is composed of a PROM, a flash ROM, etc.
The user program of PU3 is stored.

【0043】メインCPU2とサブCPU3との間に
は、オプションCPUバスB6並びに割り込み信号ライ
ンL3が配線されている。それらはコネクタ22,31
を介して着脱自在に接続される。
An optional CPU bus B6 and an interrupt signal line L3 are wired between the main CPU 2 and the sub CPU 3. They are connectors 22, 31
It is detachably connected via.

【0044】オプションCPUバスB6は、サブCPU
3からメインCPU2内のI/Oメモリ27を参照・更
新するためのバスラインである。それに対して、割り込
み信号ラインL3はサブCPU3からメインCPU2に
対して割り込み処理を依頼するための信号である。
The optional CPU bus B6 is a sub CPU
3 is a bus line for referring to and updating the I / O memory 27 in the main CPU 2. On the other hand, the interrupt signal line L3 is a signal for requesting an interrupt process from the sub CPU 3 to the main CPU 2.

【0045】次に、メインCPU2並びにサブCPU3
のシステムプログラムの構成(すなわちシステムの動
作)を図2以下の図面を用いて詳細に説明する。
Next, the main CPU 2 and the sub CPU 3
The configuration of the system program (that is, the operation of the system) will be described in detail with reference to the drawings in FIG.

【0046】図2に示されるように、メインCPU2
は、サイクル処理として、共通処理(ステップ201)
・ユーザプログラム実行処理(ステップ202)・I/
Oリフレッシュ処理(ステップ203)・周辺サービス
処理(ステップ204)を行っており、それぞれの処理
の中でI/Oメモリ27に対して参照・更新を行ってい
る(メインCPU単独処理)。ここで、ユーザプログラ
ム実行処理(ステップ202)並びにI/Oリフレッシ
ュ処理(ステップ203)は、図2に示されるように、
共有メモリとして機能するI/Oメモリ27の領域Dに
関して行われる。すなわち、それらの処理(ステップ2
02,203)に対しては、予めI/Oメモリ27の領
域Dが割り当てられている。
As shown in FIG. 2, the main CPU 2
Is a common process (step 201) as a cycle process.
-User program execution processing (step 202)-I /
The O refresh processing (step 203) and the peripheral service processing (step 204) are performed, and the I / O memory 27 is referenced and updated in each processing (main CPU independent processing). Here, the user program execution processing (step 202) and the I / O refresh processing (step 203) are performed as shown in FIG.
This is performed for the area D of the I / O memory 27 functioning as a shared memory. That is, those processes (step 2
02, 203), the area D of the I / O memory 27 is allocated in advance.

【0047】また、メインCPU2は、その他の処理と
して、サブCPU3からの割り込みレベル0と1〜3の
連続通知により(ステップ231,232,233)、
指定割り込みタスクで使用するI/Oチャネルに対して
都度I/Oリフレッシュ処理と該当ラダータスクの実行
を行い(ステップ211,212,213)、その時点
でI/Oメモリの該当領域(領域A,領域B,領域C)
に対する参照・更新を行っている。ここで、I/Oリフ
レッシュ並びに優先度レベル1のラダータスク(ステッ
プ211)に関しては、共有メモリとして機能するI/
Oメモリ27の領域Aが使用される。また、I/Oリフ
レッシュ並びに優先度レベル2のラダータスク(ステッ
プ212)に関しては、共有メモリとして機能するI/
Oメモリ27の領域Bが使用される。さらに、I/Oリ
フレッシュ並びに優先度レベル3のラダータスク(ステ
ップ213)に関しては、共有メモリとして機能するI
/Oメモリ27の領域Cが使用される。
Further, the main CPU 2 receives other interrupt levels 0 and 1 to 3 from the sub CPU 3 (steps 231, 232 and 233) as other processing.
The I / O refresh processing and the execution of the corresponding ladder task are performed for each I / O channel used in the designated interrupt task (steps 211, 212, and 213). At that time, the corresponding area (area A, area A, (Area B, area C)
Is being referenced and updated. Here, regarding the I / O refresh and the ladder task of the priority level 1 (step 211), the I / O functioning as a shared memory
The area A of the O memory 27 is used. Also, regarding the I / O refresh and the ladder task of the priority level 2 (step 212), the I / O functioning as a shared memory
The area B of the O memory 27 is used. Further, with respect to the I / O refresh and the ladder task of the priority level 3 (step 213), the I / O function as a shared memory
The area C of the / O memory 27 is used.

【0048】一方、サブCPU3は、メインCPU2と
同様のサイクル処理としての周辺サービス処理(ステッ
プ221)以外に、サブCPU3の任意のタイミングで
実行するI/Oリフレッシュ及び割り込みタスク実行依
頼(ステップ231,232,233)を行っている。
On the other hand, in addition to peripheral service processing (step 221) as cycle processing similar to that of the main CPU 2, the sub CPU 3 requests I / O refresh and interrupt tasks to be executed at any timing of the sub CPU 3 (step 231). 232, 233).

【0049】次に、サブCPU3によるメインCPU2
の実行タイミング制御方法について説明する。メインC
PU2の処理サイクルとは同期せずに、サブCPU3に
おいて10ms、100ms、1000msサイクルの
3つの演算ループ処理を行う場合、サブCPU3からメ
インCPU2に対して、割り込みにて、I/Oリフレッ
シュ及び優先レベル1〜3のラダータスク実行の依頼を
行う。
Next, the main CPU 2 by the sub CPU 3
Will be described. Main C
When performing three operation loop processes of 10 ms, 100 ms, and 1000 ms cycles in the sub CPU 3 without synchronizing with the processing cycle of the PU 2, the sub CPU 3 interrupts the main CPU 2 with I / O refresh and priority levels. Request the execution of ladder tasks 1 to 3.

【0050】すなわち、図3のフローチャートに示され
るように、サブCPU3の側でタイマ割り込み(スケジ
ューリング機能)により割り込みI/Oリフレッシュ実
行依頼(ステップ301)が行われると、メインCPU
2に対してレベル0の割り込みが掛かり、これに応答し
てメインCPU2の側ではI/Oリフレッシュ実行処理
(ステップ311)が行われる。I/Oリフレッシュ実
行処理(ステップ311)が完了すると、サブCPU3
に対して割込処理完了通知がなされ、これがサブCPU
側で認知されると(ステップ302YES)、サブCP
U3の側では割り込みラダータスク実行依頼(ステップ
303)が行われ、これを受けてメインCPU2の側で
は割込ラダータスク実行処理(ステップ312)が行わ
れ、その後、サブCPU3の側では優先レベル1〜3の
各ループ演算処理(ステップ304)が実行される。な
お、以上の処理のうち、割り込みラダータスク実行依頼
(ステップ303)は、必要に応じて選択的に行われ
る。
That is, as shown in the flowchart of FIG. 3, when an interrupt I / O refresh execution request (step 301) is made on the sub CPU 3 side by a timer interrupt (scheduling function), the main CPU
2 is interrupted by level 0, and in response to this, the main CPU 2 executes an I / O refresh execution process (step 311). When the I / O refresh execution processing (step 311) is completed, the sub CPU 3
Is notified to the sub CPU
When the sub CP is recognized by the side (YES in step 302).
On the U3 side, an interrupt ladder task execution request is made (step 303), and in response to this, the main CPU 2 executes an interrupt ladder task execution process (step 312). 3 are executed (step 304). Note that, among the above processes, the interrupt ladder task execution request (step 303) is selectively performed as necessary.

【0051】その結果、メインCPU2とサブCPU3
との間でのデータ交換としては、例えばメインCPU2
がI/Oリフレッシュした結果を反映したI/Oメモリ
を、サブCPU3から直接参照したり、サブCPU3か
らI/Oメモリの内容を直接更新し、その結果をI/O
リフレッシュで周辺I/Oに出力することが可能とな
る。
As a result, the main CPU 2 and the sub CPU 3
Data exchange between the main CPU 2
Directly refers to the I / O memory reflecting the result of the I / O refresh from the sub CPU 3, or directly updates the contents of the I / O memory from the sub CPU 3, and displays the result in the I / O memory.
It is possible to output to the peripheral I / O by refreshing.

【0052】尚、I/Oメモリは図1に示したパスアー
ビタ28の機能により共有メモリとして使用することが
でき、各CPU2,3は必要なときにI/Oメモリ27
へのアクセスが可能としている。
The I / O memory can be used as a shared memory by the function of the path arbiter 28 shown in FIG.
Access to is possible.

【0053】メインCPU2とサブCPU3との処理シ
ーケンスを表わすタイミングチャートが図4に示されて
いる。サブCPU3は10msループ演算処理、100
msループ演算処理、1000msループ演算処理の3
つの処理を並列で実行しており、各処理の実行タイミン
グが競合した場合は優先順位(10ms処理>100m
s処理>1000ms処理の順)に応じて処理の切り替
えを行っている。
FIG. 4 is a timing chart showing the processing sequence of the main CPU 2 and the sub CPU 3. The sub CPU 3 performs 10 ms loop operation processing,
ms loop operation processing, 1000 ms loop operation processing
Are executed in parallel, and when the execution timing of each process conflicts, the priority (10 ms process> 100 m process)
s processing> 1000 ms processing).

【0054】また、メインCPU2は基本的にはサイク
ル処理(共通処理・ユーザプログラム実行・I/Oリフ
レッシュ・イベント処理(ステップ201〜204))
を行っており、サブCPU3から割り込み通知(割り込
みタスク実行依頼)があった時点で、依頼された割り込
みタスクIDに応じた割り込みプログラムを実行してい
る(ステップ211,212,213)。
The main CPU 2 basically performs cycle processing (common processing / user program execution / I / O refresh / event processing (steps 201 to 204)).
When the interrupt notification (interrupt task execution request) is received from the sub CPU 3, the interrupt program corresponding to the requested interrupt task ID is executed (steps 211, 212, and 213).

【0055】10ms処理、100ms処理、1000
ms処理の内容、及びメインCPU側で割り込み通知を
受けた際の処理内容が図5のフローチャートに示されて
いる。サブCPU側各ループ処理に関しては、各ループ
毎のタイミングでタイマ割り込みが発生し、処理が起動
される。
10 ms processing, 100 ms processing, 1000
The contents of the ms process and the contents of the process when the main CPU receives an interrupt notification are shown in the flowchart of FIG. Regarding each loop processing on the sub CPU side, a timer interrupt is generated at the timing of each loop, and the processing is started.

【0056】処理が起動されると、まず割り込み要求フ
ラグF1に優先度・割り込みタスクIDを設定し、割り
込み信号をオンする(ステップ501)。ここでは、割
り込みレベル0はI/Oリフレッシュ、割り込みレベル
1〜3はラダータスク実行を意味しており、割り込み要
求を行う場合にはI/Oリフレッシュとラダータスク実
行との両方を起動する。
When the process is started, first, the priority and the interrupt task ID are set in the interrupt request flag F1, and the interrupt signal is turned on (step 501). Here, interrupt level 0 means I / O refresh, and interrupt levels 1 to 3 mean ladder task execution. When an interrupt request is issued, both I / O refresh and ladder task execution are started.

【0057】割り込み信号がオンされると、メインCP
U2側に対してハードウェアで割り込みが掛かり、その
後割り込み要求フラグF1から優先度・割り込みタスク
IDを取得する(ステップ511)。その後、優先順位
及び割り込みタスクIDに基づいて、I/Oリフレッシ
ュ(ステップ513)、又は割り込みプログラムの実行
(ステップ515)が行われる。すなわち、割り込みレ
ベル0の場合には、都度リフレッシュが実行されて(ス
テップ513)、その後、都度リフレッシュが完了した
ことが通知されるのに対し(ステップ514)、割り込
み1〜3のいずれかの場合には該当するラダータスクが
実行される(ステップ515)。
When the interrupt signal is turned on, the main CP
The U2 is interrupted by hardware, and then the priority / interrupt task ID is obtained from the interrupt request flag F1 (step 511). After that, I / O refresh (step 513) or execution of an interrupt program (step 515) is performed based on the priority and the interrupt task ID. That is, when the interrupt level is 0, the refresh is executed each time (step 513), and thereafter, it is notified that the refresh is completed (step 514). Executes the corresponding ladder task (step 515).

【0058】このようにしてリフレッシュ完了フラグF
2が通知されると、割り込みタスク上の都度リフレッシ
ュが完了したことを確認して(ステップ502)、I/
Oメモリからデータの取り込みを行い(ステップ50
3)、I/Oデータに基づいて演算処理を行う(ステッ
プ504)。この演算処理の内容としては、スケジュー
リング用パラメータに基づいて該当ループのサブ及びメ
インCPUのタスクを起動するもので、サブCPU側は
PID演算や浮動小数点演算など、メインCPU側はラ
ダーによるシーケンス処理等が含まれる。その後、得ら
れた演算結果はI/Oメモリ27に反映される(ステッ
プ505)。
Thus, the refresh completion flag F
2 is notified, it is confirmed that refresh has been completed each time on the interrupt task (step 502).
Data is fetched from the O memory (step 50).
3) Perform arithmetic processing based on the I / O data (step 504). The contents of the arithmetic processing include starting the tasks of the sub and main CPUs of the corresponding loop based on the scheduling parameters. The sub CPU side performs PID operation and floating point operation, and the main CPU side performs ladder sequence processing. Is included. Thereafter, the obtained operation result is reflected on the I / O memory 27 (step 505).

【0059】尚、割り込み要求フラグ、リフレッシュ完
了フラグ、タスク完了フラグ、スケジューリング用パラ
メータなどについては、I/Oメモリ(メインCPU・
サブCPUともアクセス可能なエリア)上に配置されて
おり、データ仕様としては図6に示されるように設定さ
れている。
Note that the interrupt request flag, refresh completion flag, task completion flag, scheduling parameters, and the like are described in the I / O memory (main CPU
It is arranged on an area that can be accessed by both the sub CPU and the data specifications are set as shown in FIG.

【0060】すなわち、割り込み要求フラグの1ワード
は、D0〜D7からなる割り込みタスクIDと、D8〜
D11からなる優先レベルと、D12からなる割り込み
タスク実行依頼によって構成される。
That is, one word of the interrupt request flag is composed of an interrupt task ID composed of D0 to D7, and D8 to D8.
It is composed of a priority level composed of D11 and an interrupt task execution request composed of D12.

【0061】また、リフレッシュ並びにタスク完了フラ
グの1ワードは、D00に割当たられた1000ms処
理リフレッシュ完了、D01に割当たられた100ms
処理リフレッシュ完了、D02に割り当てられた10m
s処理リフレッシュ完了、D03に割り当てられた10
00msタスク実行完了、D04に割り当てられた10
0msタスク実行完了、D05に割り当てられた10m
sタスク実行完了となっている。
One word of the refresh and task completion flag is 1000 ms processing refresh completion assigned to D00 and 100 ms assigned to D01.
Processing refresh completed, 10m allocated to D02
s processing refresh completed, 10 assigned to D03
00ms task execution completed, 10 assigned to D04
0ms task execution completed, 10m assigned to D05
The task has been completed.

【0062】さらに、スケジューリング用パラメータに
関しては、各部品(例えば、PID演算子等)毎に、そ
の割込周期種別並びにデータエリア先頭アドレスと、起
動ラダータスクIDとが互いに関連づけて記憶されてい
る。
As for the scheduling parameters, the interrupt cycle type, the data area head address, and the start ladder task ID are stored in association with each other (for example, a PID operator).

【0063】以上の説明で明らかなように、この発明の
実施形態によれば次のような効果を有する。
As is clear from the above description, the embodiment of the present invention has the following effects.

【0064】(1)オプションとして搭載したサブCP
Uから割り込み通知にて、メインCPUの処理を実行で
き、割込通知用フラグやスケジューリング用パラメータ
を、メインCPUとサブCPUで全領域共有したI/O
メモリ上に配置しているため、プログラムの実行順を容
易かつ動的に指定することができる。その結果、サブC
PUの特徴をPLCシステム全体としての制御動作に反
映させることができる。
(1) Sub CP installed as an option
U can execute the processing of the main CPU in response to the interrupt notification, and the I / O in which the main CPU and the sub CPU share the entire area with the interrupt notification flag and the scheduling parameter.
Since the program is arranged on the memory, the execution order of the program can be easily and dynamically specified. As a result, sub C
The characteristics of the PU can be reflected in the control operation of the entire PLC system.

【0065】(2)各CPU毎に独立して動作しつつ、
サブCPUの任意の実行タイミングで割り込みにてデー
タ更新を指示するので、データの受け渡しの同期がとれ
ている。このため、各CPUのスキャン時間の遅れに影
響されることなく、PLC全体としての安定した周期精
度を確保することができる。
(2) While operating independently for each CPU,
Since data update is instructed by an interrupt at an arbitrary execution timing of the sub CPU, data transfer is synchronized. Therefore, stable cycle accuracy of the entire PLC can be secured without being affected by the delay of the scan time of each CPU.

【0066】(3)メインCPUとしてはI/O制御に
特化してリソース(ユーザメモリ等)や機能(高機能な
命令サポート)を削減できるため、ローコストでシンプ
ルなPLCを提供できる。
(3) As the main CPU, resources (user memory and the like) and functions (high-performance instruction support) can be reduced by specializing in I / O control, so that a low-cost and simple PLC can be provided.

【0067】なお、以上の実施形態では、いわゆるビル
ディング・ブロックタイプのPLCに本発明を適用した
が、入出力回路や電源回路等をすべて1個のケースに収
容したいわゆる一体型のPLCにも適用できることは勿
論である。
In the above embodiment, the present invention is applied to a so-called building block type PLC. However, the present invention is also applied to a so-called integrated PLC in which all input / output circuits and power supply circuits are housed in one case. Of course, you can.

【発明の効果】以上の説明で明らかなように、この発明
によれば、拡張性に優れると共に、拡張後にあっては、
個々のCPUの機能を最大限に発揮させることができ、
さらに、比較的に低価格で製作することが可能なマルチ
CPUタイプのPLCを提供することができる。
As is apparent from the above description, according to the present invention, the expandability is excellent, and after the expansion,
The functions of each CPU can be maximized,
Further, a multi-CPU type PLC that can be manufactured at a relatively low price can be provided.

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

【図1】本発明にかかるCPU装置の構成を概略的に示
すブロック図である。
FIG. 1 is a block diagram schematically showing a configuration of a CPU device according to the present invention.

【図2】メインCPUとサブCPUとの間の処理の概要
を示すゼネラルフローチャートである。
FIG. 2 is a general flowchart showing an outline of processing between a main CPU and a sub CPU.

【図3】割り込み要求によるI/Oリフレッシュ並びに
割り込みラダータスクの実行手順を示すフローチャート
である。
FIG. 3 is a flowchart showing an I / O refresh by an interrupt request and an execution procedure of an interrupt ladder task.

【図4】メインCPUとサブCPUの処理シーケンスを
示すタイミングチャートである。
FIG. 4 is a timing chart showing a processing sequence of a main CPU and a sub CPU.

【図5】割り込み処理依頼から割り込み処理完了までの
動作を示すフローチャートである。
FIG. 5 is a flowchart illustrating an operation from a request for interrupt processing to completion of interrupt processing.

【図6】割り込み要求フラグとリフレッシュ完了フラグ
の構成を示すメモリマップである。
FIG. 6 is a memory map showing a configuration of an interrupt request flag and a refresh completion flag.

【符号の説明】[Explanation of symbols]

1 CPU装置 2 メインCPU 3 サブCPU 21 周辺I/Oバス接続用コネクタ 22 コネクタ 23 MPU 24 システムプログラム 25 システムワークメモリ 26 ユーザプログラムメモリ 27 I/Oメモリ 31 コネクタ 32 システムプログラムメモリ 33 システムワークメモリ 34 ユーザプログラムメモリ F1 割込要求フラグ F2 リフレッシュ完了フラグ L1,L2,L3 割込ライン B3,B5,B6 オプションMPUバス B2,B4 内部MPUバス 1 CPU device 2 Main CPU 3 Sub CPU 21 Connector for peripheral I / O bus connection 22 Connector 23 MPU 24 System program 25 System work memory 26 User program memory 27 I / O memory 31 Connector 32 System program memory 33 System work memory 34 User Program memory F1 Interrupt request flag F2 Refresh completion flag L1, L2, L3 Interrupt line B3, B5, B6 Optional MPU bus B2, B4 Internal MPU bus

───────────────────────────────────────────────────── フロントページの続き (72)発明者 下川 日出男 京都府京都市右京区花園土堂町10番地 オ ムロン株式会社内 (72)発明者 西島 栄 神奈川県南足柄市中沼210番地 富士写真 フィルム株式会社内 Fターム(参考) 5H215 BB20 CC05 CX03 GG01 KK04 5H220 BB20 CC05 CX03 DD04 EE07 JJ16 JJ26 JJ29 JJ38 JJ59 ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Hideo Shimokawa Omron Co., Ltd. (10) Hanazono Todocho, Ukyo-ku, Kyoto-shi, Kyoto (72) Inventor Sakae Nishijima 210 Nakanuma, Minamiashigara-shi, Kanagawa Prefecture Fuji Photo Film Co., Ltd. F-term (reference) 5H215 BB20 CC05 CX03 GG01 KK04 5H220 BB20 CC05 CX03 DD04 EE07 JJ16 JJ26 JJ29 JJ38 JJ59

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 第1のCPUと、第2のCPUと、第1
のCPUに内蔵されたI/Oメモリに対して第2のCP
Uからのアクセスを可能とするためのオプションバス
と、第2のCPUから第1のCPUに対して割り込みを
掛けるための割り込みラインとを有し、 前記第1のCPUには、 ユーザプログラム実行処理とI/Oリフレッシュ実行処
理とをサイクリックに行うサイクリック実行制御手段
と、 第2のCPUから割り込み要求が到来したときに、I/
Oメモリ内の特定I/O領域に関するI/Oリフレッシ
ュ実行処理を割り込みで行い、その後、リフレッシュ完
了を第2のCPUへ通知する割り込み実行制御手段と、
が少なくとも設けられ、かつ前記第2のCPUには、第
1のCPUに対してサイクリックに割り込み要求を送出
すると共に、これに応答して第1のCPUからリフレッ
シュ完了が通知されるのを待って、ユーザプログラム実
行処理を行なうサイクリック実行制御手段が設けられて
いる、 ことを特徴とするプログラマブル・コントローラ。
A first CPU, a second CPU, and a first CPU.
The second CP for the I / O memory built in the CPU
An option bus for enabling access from the U and an interrupt line for interrupting the first CPU from the second CPU, wherein the first CPU has a user program execution process A cyclic execution control means for cyclically performing the I / O refresh execution processing and the I / O refresh execution processing;
Interrupt execution control means for performing I / O refresh execution processing relating to a specific I / O area in the O memory by interruption, and thereafter notifying the second CPU of refresh completion;
Is provided at least, and the second CPU cyclically sends an interrupt request to the first CPU, and waits for a notification of refresh completion from the first CPU in response to the request. And a cyclic execution control means for performing a user program execution process.
【請求項2】 第1のCPUに設けられた割り込み実行
制御手段は、レベルの異なる多重割り込みを受け付ける
機能を有し、かつ各レベルの割り込み要求が到来する毎
に、I/Oメモリ内の特定I/O領域に関するI/Oリ
フレッシュ実行処理を割り込みで行い、その後、リフレ
ッシュ完了を第2のCPUへ通知するものであり、かつ
第2のCPUに設けられたサイクリック実行制御手段
は、それぞれ固有のサイクルでレベルの異なる多重割り
込み要求を送出する機能を有し、かつ各レベルの割り込
み要求に応答してリフレッシュ完了が通知されるのを待
って、それぞれのレベルに対応するユーザプログラム実
行処理を行う、 ことを特徴とする請求項1に記載のプログラマブル・コ
ントローラ。
2. An interrupt execution control means provided in the first CPU has a function of accepting multiple interrupts of different levels, and each time an interrupt request of each level arrives, the interrupt execution control means in the I / O memory is specified. The I / O refresh execution processing relating to the I / O area is performed by interruption, and thereafter, the completion of the refresh is notified to the second CPU, and the cyclic execution control means provided in the second CPU is unique. In this cycle, it has a function of sending multiple interrupt requests of different levels, and waits for the completion of refresh to be notified in response to the interrupt request of each level, and executes the user program execution processing corresponding to each level. The programmable controller according to claim 1, wherein:
【請求項3】 第1のCPUに設けられた割り込み制御
手段は、I/Oリフレッシュ実行処理に加えて、特定の
ユーザプログラム実行処理を含む、 ことを特徴とする請求項1又は2に記載のプログラマブ
ル・コントローラ。
3. The method according to claim 1, wherein the interrupt control means provided in the first CPU includes a specific user program execution process in addition to the I / O refresh execution process. Programmable controller.
【請求項4】 第2のCPUは第1のCPU内のI/O
メモリへ通ずるバスライン並びに第1のCPU内の割り
込みラインを含むコネクタに対して着脱自在であり、 第1のCPUにて実行されるユーザプログラムは主とし
てラダータスクであり、かつ第2のCPUにて実行され
るユーザプログラムは主としてデータ演算タスクであ
る、 ことを特徴とする請求項1〜3のいずれかに記載のプロ
グラマブル・コントローラ。
4. The I / O in the first CPU is connected to a second CPU.
It is detachable from a connector including a bus line leading to a memory and an interrupt line in the first CPU. A user program executed by the first CPU is mainly a ladder task, and is executed by a second CPU. The programmable controller according to claim 1, wherein the user program to be executed is mainly a data operation task.
【請求項5】 周辺I/Oバスに通ずる第1の外部接続
端子と、少なくともI/Oデータの他に割り込み要求フ
ラグ並びにリフレッシュ完了フラグが格納されるI/O
メモリと、外部からI/Oメモリに対するアクセスを可
能とするための第2の外部接続端子と、ユーザプログラ
ムが格納されるユーザプログラムメモリと、を有すると
共に、 ユーザプログラムメモリに格納された特定のユーザプロ
グラムに関して、ユーザプログラム実行処理とI/Oリ
フレッシュ実行処理とをサイクリックに行うサイクリッ
ク実行制御手段と、 割り込み要求フラグがセットされたときに、I/Oメモ
リ内の特定I/O領域に関するI/Oリフレッシュ実行
処理を割り込みで行い、その後、リフレッシュ完了フラ
グをセットする割り込み実行制御手段と、が少なくとも
設けられている、 ことを特徴とするプログラマブル・コントローラの増設
可能なCPU。
5. An I / O for storing a first external connection terminal connected to a peripheral I / O bus and an interrupt request flag and a refresh completion flag in addition to at least I / O data.
A specific user stored in the user program memory, having a memory, a second external connection terminal for enabling external access to the I / O memory, and a user program memory storing the user program For a program, cyclic execution control means for cyclically performing a user program execution process and an I / O refresh execution process; and an I / O memory related to a specific I / O area in an I / O memory when an interrupt request flag is set. And / or an interrupt execution control means for performing an I / O refresh execution process by an interrupt and thereafter setting a refresh completion flag.
【請求項6】 割り込み実行制御手段は、レベルの異な
る多重割り込みを受け付ける機能を有し、かつ各レベル
の割り込み要求フラグがセットされる毎に、I/Oメモ
リ内の特定I/O領域に関するI/Oリフレッシュ実行
処理を割り込みで行い、その後、リフレッシュ完了フラ
グをセットする、 ことを特徴とする請求項6に記載のプログラマブル・コ
ントローラの増設可能なCPU。
6. The interrupt execution control means has a function of accepting multiple interrupts of different levels, and each time an interrupt request flag of each level is set, an I / O memory related to a specific I / O area in the I / O memory is set. 7. The CPU as claimed in claim 6, further comprising: executing an / O refresh execution process by interruption, and thereafter setting a refresh completion flag.
【請求項7】 請求項6に記載のプログラマブル・コン
トローラのCPUに接続して使用されるものであって、 割り込みラインとデータ入出力バスとを含む外部コネク
タと、ユーザプログラムが格納されるユーザプログラム
メモリとを有すると共に、 前記外部コネクタに対してサイクリックに割り込み要求
を送出すると共に、外部コネクタを介してリフレッシュ
完了通知が取得されるのを待って、ユーザプログラムメ
モリに格納されたユーザプログラムの実行処理を行なう
サイクリック実行制御手段が設けられている、 ことを特徴とするプログラマブル・コントローラの増設
用CPU。
7. An external connector including an interrupt line and a data input / output bus connected to a CPU of the programmable controller according to claim 6, and a user program storing a user program. And executing a user program stored in the user program memory while sending a cyclic interrupt request to the external connector and waiting for a refresh completion notification to be obtained via the external connector. A CPU for adding a programmable controller, further comprising a cyclic execution control unit for performing processing.
【請求項8】 サイクリック実行制御手段は、それぞれ
固有のサイクルでレベルの異なる多重割り込み要求を送
出する機能を有し、かつ各レベルの割り込み要求に対し
てリフレッシュ完了が通知されるのを待って、それぞれ
のレベルに対応するユーザプログラム実行処理を行う、 ことを特徴とする請求項7に記載のプログラマブル・コ
ントローラの増設用CPU。
8. The cyclic execution control means has a function of sending multiple interrupt requests of different levels in each unique cycle, and waits for the completion of refresh to be notified for each level of interrupt request. 8. The additional CPU for a programmable controller according to claim 7, wherein a user program execution process corresponding to each level is performed.
JP17098299A 1999-06-17 1999-06-17 Programmable controller Expired - Fee Related JP4349687B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17098299A JP4349687B2 (en) 1999-06-17 1999-06-17 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17098299A JP4349687B2 (en) 1999-06-17 1999-06-17 Programmable controller

Publications (2)

Publication Number Publication Date
JP2001005505A true JP2001005505A (en) 2001-01-12
JP4349687B2 JP4349687B2 (en) 2009-10-21

Family

ID=15914949

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17098299A Expired - Fee Related JP4349687B2 (en) 1999-06-17 1999-06-17 Programmable controller

Country Status (1)

Country Link
JP (1) JP4349687B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011086990A (en) * 2009-10-13 2011-04-28 Fuji Xerox Co Ltd Information processing apparatus and image forming apparatus
WO2011125178A1 (en) * 2010-04-06 2011-10-13 三菱電機株式会社 Control system, control device and control method
JP2013084169A (en) * 2011-10-12 2013-05-09 Hitachi Ltd Controller and processing method of task and ladder

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011086990A (en) * 2009-10-13 2011-04-28 Fuji Xerox Co Ltd Information processing apparatus and image forming apparatus
WO2011125178A1 (en) * 2010-04-06 2011-10-13 三菱電機株式会社 Control system, control device and control method
JP2013084169A (en) * 2011-10-12 2013-05-09 Hitachi Ltd Controller and processing method of task and ladder

Also Published As

Publication number Publication date
JP4349687B2 (en) 2009-10-21

Similar Documents

Publication Publication Date Title
JP3852469B2 (en) Synchronous controller and controller system
JPH0376496B2 (en)
JP2016110458A (en) Programmable logic controller, basic unit, control method and program
JP4151198B2 (en) Interrupt controller and microcomputer
JP2001005505A (en) Programmable controller
JP2004516547A (en) Suspension control device
JPH11265297A (en) Distributed simulator system
JP4791792B2 (en) Digital signal processor system and boot method thereof.
JP2003158780A (en) Controller
JP2002006907A (en) I/o unit and programmable controller system
JP2003029809A (en) Cpu unit and programmable controller
JPH0736720A (en) Duplex computer equipment
JPH11288401A (en) Programmable controller
JP2001100812A (en) Distributed processing system
JP2002268898A (en) Vehicle controller
JP4293086B2 (en) Multiprocessor system and processor control method
JP2001265610A (en) Device control method
JP2004310162A (en) Programmable controller
JPH1185518A (en) Controller
JPH0157379B2 (en)
JP2000029850A (en) Task controlling method using inter-processor communication of operating system
JPH0251759A (en) Adaptor controlling system
JPH09114775A (en) Multiprocessor system
JP2000284812A (en) Programmable controller and its input/output control method
JPH10289196A (en) Computer and transfer method for peripheral device control data in computer

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060320

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090212

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090715

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090721

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120731

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130731

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees