JPH10307607A - Main processor and programmable controller - Google Patents

Main processor and programmable controller

Info

Publication number
JPH10307607A
JPH10307607A JP9118067A JP11806797A JPH10307607A JP H10307607 A JPH10307607 A JP H10307607A JP 9118067 A JP9118067 A JP 9118067A JP 11806797 A JP11806797 A JP 11806797A JP H10307607 A JPH10307607 A JP H10307607A
Authority
JP
Japan
Prior art keywords
processor
main processor
sub
programmable controller
main
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
JP9118067A
Other languages
Japanese (ja)
Inventor
Mitsuru Soga
満 曽我
Taisuke Katsube
泰典 勝部
Makoto Ogura
小倉  真
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.)
Hitachi Ltd
Hitachi Keiyo Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Keiyo Engineering 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 Hitachi Ltd, Hitachi Keiyo Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP9118067A priority Critical patent/JPH10307607A/en
Publication of JPH10307607A publication Critical patent/JPH10307607A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain a controller which makes a ladder language and a flow language usable and enables a main and a subordinate processor to operate in parallel by providing a data for passing data between the main and subordinate processors and a means which arbitrates access to a memory from the main and subordinate processors. SOLUTION: The main processor 1 has an arithmetic circuit 11, a 1st register 12a and a 2nd internal register 12b, a table 13, an arbitrating circuit 14, etc. The main processor 1 executes basic instructions. When there is an application instruction macro, parameters which are needed for execution by the subordinate processor 2 are stored in the table 13 and the subordinate processor 2 reads the table 13 once interruption is initiated and then executes the application macroinstruction. An arbitrating circuit 14 arbitrates access from the main processor 1 to the memory 3 and access from the subordinate processor 2 to the memory 3.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ラダー言語又はフ
ロー言語を使用し、複数のプロセッサでシーケンス演算
を行う主プロセッサ又はプログラマブルコントローラに
関し、特にプロセッサ間の処理の引き渡し方式に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a main processor or a programmable controller that uses a ladder language or a flow language and performs a sequence operation with a plurality of processors, and more particularly to a method of handing over processing between the processors.

【0002】[0002]

【従来の技術】従来、ラダー言語を使用し、2つのプロ
セッサをシーケンス演算に用いたプログラマブルコント
ローラの構成を図7に示す。
2. Description of the Related Art Conventionally, FIG. 7 shows the configuration of a programmable controller using a ladder language and using two processors for sequence operation.

【0003】従来のプログラマブルコントローラは、主
プロセッサ1´、副プロセッサ2´、メモリ3´、バス
4a´、4b´等で構成されていた。
A conventional programmable controller is composed of a main processor 1 ', a sub processor 2', a memory 3 ', buses 4a', 4b ', etc.

【0004】主プロセッサ1´と副プロセッサ2´は、
バス4a´で接続されており、また、主プロセッサ1´
とメモリ3´は、バス4b´で接続されていた。
The main processor 1 'and the sub processor 2'
It is connected by a bus 4a 'and the main processor 1'
And the memory 3 ′ were connected by the bus 4b ′.

【0005】主プロセッサ1´から副プロセッサ2´へ
1本の割込み信号IRQ1´が接続されている。
One interrupt signal IRQ1 'is connected from the main processor 1'to the sub processor 2'.

【0006】主プロセッサ1´は、演算回路11´、レ
ジスタ12´、テーブル13´等を有していた。
The main processor 1 'has an arithmetic circuit 11', a register 12 ', a table 13' and the like.

【0007】レジスタ12の出力は、割込み信号IRQ
1´に接続されている。
The output of the register 12 is the interrupt signal IRQ.
1 '.

【0008】パラメータテーブル13´は、副プロセッ
サ2´が応用命令マクロを実行するにあたって必要なパ
ラメータが格納されていた。
The parameter table 13 'stores parameters necessary for the sub-processor 2' to execute the application instruction macro.

【0009】主プロセッサ1´は、接点、コイルなどの
ラダーの基本命令を実行し、そして、内部のレジスタ1
2´から出力される割込み信号IRQ1´で副プロセッ
サ2´への割込みを実行していた。
The main processor 1 'executes basic ladder instructions such as contacts, coils, etc.
The interrupt to the sub-processor 2 'has been executed by the interrupt signal IRQ1' output from 2 '.

【0010】副プロセッサ2´は、バス4a´を介し、
ラダーの応用命令を実行していた。
The sub processor 2'via the bus 4a ',
It was executing the application instructions of the ladder.

【0011】メモリ3´は、ユーザプログラムや、シス
テムプログラム、I/Oデータ等を格納し、バス4b´
を介して主プロセッサ1´とデータのやりとりをしてい
た。
The memory 3'stores user programs, system programs, I / O data, etc., and the bus 4b '.
And exchanges data with the main processor 1 'via the.

【0012】主プロセッサ1´と副プロセッサ2´の処
理の分担方法はさまざまであるが、ここでは、接点、コ
イル等のラダー演算における基本命令を主プロセッサ1
´、応用命令を副プロセッサ2´が行うこととして、図
8、図9、図10を用いて従来の処理の引き渡し方式を
説明する。
There are various methods of sharing the processing between the main processor 1 'and the sub-processor 2'.
Assuming that the application instruction is executed by the sub-processor 2 ', a description will be given of a conventional processing delivery method with reference to FIGS. 8, 9 and 10. FIG.

【0013】図8は、ユーザが専用のラダー言語入力装
置を用いて入力したラダープログラムの一部であり、図
9に示すように主プロセッサ1´が実行可能な命令フォ
ーマットに変換してメモリ3´内のユーザプログラムエ
リアに格納される。
FIG. 8 shows a part of a ladder program input by a user using a dedicated ladder language input device. As shown in FIG. 'Is stored in the user program area.

【0014】ラダープログラム内の応用命令は一般的に
サブルーチンの形態をとり、実際の処理はシステムプロ
グラムエリア内に格納されている。
The application instructions in the ladder program generally take the form of subroutines, and the actual processing is stored in the system program area.

【0015】また、図8では応用命令1が演算結果をX
1に反映する命令であることを、応用命令2は演算結果
をどこにも反映させない命令であることを指示してお
り、他の引き数等はここでは明記しない。
Further, in FIG. 8, the application instruction 1 outputs the operation result as X.
1 indicates that the instruction is reflected in 1, and the application instruction 2 indicates that the operation result is not reflected anywhere. Other arguments and the like are not specified here.

【0016】図10に各プロセッサの動作概略をタイム
チャートで示す。
FIG. 10 is a time chart showing an outline of the operation of each processor.

【0017】主プロセッサ1´は起動がかかるとユーザ
プログラムの先頭から実行を開始する。
When activated, the main processor 1 'starts executing from the top of the user program.

【0018】ステップn+3を実行時、内部レジスタ1
2´に“1”を書き込み、副プロセッサ2に対し割り込
みが出力され、主プロセッサ1´はWAIT状態とな
る。この時点で副プロセッサ2´が応用命令1を実行す
るために必要なパラメータは主プロセッサ1´にあるパ
ラメータテーブル13´に格納されているものとする。
副プロセッサ2´は割り込みがかかると、パラメータテ
ーブル13´を読み出し、応用命令1マクロの実行を開
始する。応用命令1マクロの実行終了時、主プロセッサ
1´の内部レジスタ12´にバス4a´を介して“0”
を書き込む。この時点で主プロセッサ1´はWAITが
解除されユーザプログラムの次の命令実行を開始する。
When step n + 3 is executed, the internal register 1
"1" is written to 2 ', an interrupt is output to the sub processor 2, and the main processor 1' enters the WAIT state. At this time, it is assumed that the parameters necessary for the sub processor 2'to execute the application instruction 1 are stored in the parameter table 13 'in the main processor 1'.
When an interrupt occurs, the sub-processor 2 'reads the parameter table 13' and starts executing the application instruction 1 macro. At the end of the execution of the application instruction 1 macro, "0" is stored in the internal register 12 'of the main processor 1' via the bus 4a '.
Write. At this point, the main processor 1'cancels the WAIT and starts executing the next instruction of the user program.

【0019】これをユーザプログラムの最後まで実行し
て1スキャンが終了する。
This is executed up to the end of the user program to complete one scan.

【0020】[0020]

【発明が解決しようとする課題】上記、従来の技術では
副プロセッサ2´が応用命令のマクロを実行中、主プロ
セッサ1´は必ずWAIT状態となっている。
In the above-mentioned conventional technique, the main processor 1'is always in the WAIT state while the sub processor 2'is executing the macro of the application instruction.

【0021】図8に示すユーザプログラムでは、応用命
令1は演算結果をX1に反映させる命令のため、その処
理が終了するまで主プロセッサ1´はWAIT状態とな
る必要がある。しかしながら、応用命令2に示す演算結
果の戻りがない命令のように、副プロセッサ2´が処理
を終了するまで待たずに主プロセッサ1´が実行可能な
命令までもWAIT状態となってしまう。
In the user program shown in FIG. 8, since the applied instruction 1 is an instruction for reflecting the operation result on X1, the main processor 1 'needs to be in the WAIT state until the processing is completed. However, as in the case of the instruction having no return of the operation result shown in the application instruction 2, even the instruction that can be executed by the main processor 1 'without waiting until the sub-processor 2' completes the processing enters the WAIT state.

【0022】本発明の目的は、ラダー言語及びフロー言
語を使用することが可能であり、そして、主プロセッサ
と、副プロセッサが並列に動作可能なプログラマブルコ
ントローラを提供することにある。
An object of the present invention is to provide a programmable controller which can use a ladder language and a flow language, and in which a main processor and a sub-processor can operate in parallel.

【0023】[0023]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、ユーザが作成したプログラム及びI/O
データを格納するメモリと、ユーザからの起動により演
算を開始する主プロセッサと、主プロセッサからの割込
みでシーケンス演算を実行する副プロセッサと、から構
成されるプログラマブルコントローラに使用される主プ
ロセッサにおいて、複数種類の特定の命令を実行時、特
定の値が書き込まれる2以上の数のレジスタと、主プロ
セッサと副プロセッサとの間でデータを渡すためのテー
ブルと、主プロセッサと副プロセッサからメモリへのア
クセスを調停する手段とを具備するプログラマブルコン
トローラ用主プロセッサである。
In order to achieve the above object, the present invention provides a program and I / O created by a user.
In a main processor used for a programmable controller including a memory for storing data, a main processor that starts an operation upon activation by a user, and a sub-processor that executes a sequence operation in response to an interrupt from the main processor, When executing a specific instruction of a kind, a register of two or more to which a specific value is written, a table for passing data between the main processor and the sub processor, and access to the memory from the main processor and the sub processor. Is a main processor for a programmable controller having a means for arbitrating.

【0024】また、本発明は、ユーザが作成したプログ
ラム及びI/Oデータを格納するメモリと、ユーザから
の起動により演算を開始する主プロセッサと、主プロセ
ッサからの割込みでシーケンス演算を実行する副プロセ
ッサと、から構成されるプログラマブルコントローラに
おいて、主プロセッサは、複数種類の特定の命令を実行
時、特定の値が書き込まれる2以上の数のレジスタと、
主プロセッサと副プロセッサとの間でデータを渡すため
のテーブルと、主プロセッサと副プロセッサからメモリ
へのアクセスを調停する手段とを具備するプログラマブ
ルコントローラである。
Further, the present invention provides a memory for storing a program and I / O data created by a user, a main processor for starting an operation upon activation by a user, and a sub-processor for executing a sequence operation by an interrupt from the main processor. And a processor, wherein the main processor is configured to execute, when executing a plurality of types of specific instructions, two or more registers to which specific values are written;
The programmable controller includes a table for passing data between the main processor and the sub-processor, and means for arbitrating access from the main processor and the sub-processor to the memory.

【0025】そして、本発明は、使用する言語がラダー
言語である主プロセッサ又はプログラマブルコントロー
ラである。
The present invention is a main processor or programmable controller whose language is a ladder language.

【0026】更に、本発明は、副プロセッサの数は1で
あり、割込みの数は2であり、そして、レジスタの数は
2である主プロセッサ又はプログラマブルコントローラ
である。
Further, the present invention is a main processor or a programmable controller in which the number of sub-processors is one, the number of interrupts is two, and the number of registers is two.

【0027】また、本発明は、使用する言語がフロー言
語である主プロセッサ又はプログラマブルコントローラ
である。
Further, the present invention is a main processor or programmable controller whose flow language is a flow language.

【0028】そして、本発明は、副プロセッサの数、割
込みの数及びレジスタの数は全て同じで、かつ、2以上
ある主プロセッサ又はプログラマブルコントローラであ
る。
The present invention is a main processor or programmable controller in which the number of sub-processors, the number of interrupts, and the number of registers are all the same and two or more.

【0029】更に、本発明は、主プロセッサが具備する
複数のレジスタに対し、副プロセッサがリード又はライ
ト可能である主プロセッサ又はプログラマブルコントロ
ーラである。
Furthermore, the present invention is a main processor or a programmable controller in which a sub processor can read or write a plurality of registers provided in the main processor.

【0030】[0030]

【発明の実施の形態】本発明の発明の実施の形態を説明
する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described.

【0031】以下、本発明の主プロセッサ及びプログラ
マブルコントローラについて、ラダー言語を使用する一
実施例を、図1〜図3を用いて説明する。
An embodiment using a ladder language for the main processor and the programmable controller of the present invention will be described below with reference to FIGS.

【0032】図1に2つのプロセッサを使用したプログ
ラマブルコントローラの構成を示す。
FIG. 1 shows the configuration of a programmable controller using two processors.

【0033】本実施例のプログラマブルコントローラ
は、主プロセッサ1、副プロセッサ2、メモリ3、バス
4a、4bから構成されている。
The programmable controller of this embodiment comprises a main processor 1, a sub processor 2, a memory 3, and buses 4a and 4b.

【0034】主プロセッサ1と副プロセッサ2は、バス
4aで接続されており、また、主プロセッサ1とメモリ
3は、バス4bで接続されている。
The main processor 1 and the sub processor 2 are connected by a bus 4a, and the main processor 1 and the memory 3 are connected by a bus 4b.

【0035】主プロセッサ1から副プロセッサ2へ2本
の割込み信号IRQ1、IRQ2が接続されている。
Two interrupt signals IRQ1 and IRQ2 are connected from the main processor 1 to the sub processor 2.

【0036】主プロセッサ1は、演算回路11、第1レ
ジスタ12a及び第2内部レジスタ12b、テーブル1
3、調停回路14等を有している。
The main processor 1 includes an arithmetic circuit 11, a first register 12a, a second internal register 12b, and a table 1.
3, arbitration circuit 14 and the like.

【0037】第1内部レジスタ12aの出力はIRQ1
に、第2内部レジスタ12bの出力はIRQ2に接続さ
れている。
The output of the first internal register 12a is IRQ1.
The output of the second internal register 12b is connected to IRQ2.

【0038】テーブル13は副プロセッサ2が応用命令
マクロを実行するにあたって必要なパラメータが格納さ
れる。
The table 13 stores parameters necessary for the sub processor 2 to execute the application instruction macro.

【0039】主プロセッサ1は、接点、コイルなどのラ
ダーの基本命令を実行し、第1レジスタ12a及び第2
レジスタ12bから出力される第1割込み信号IRQ1
及び第2割込み信号IRQ2で副プロセッサ2への割込
みを実行する。
The main processor 1 executes the basic instructions of the ladder such as contacts and coils, and the first register 12a and the second register 12a.
First interrupt signal IRQ1 output from register 12b
And an interrupt to the sub-processor 2 is executed by the second interrupt signal IRQ2.

【0040】副プロセッサ2は、ラダーの応用命令を実
行する。
The sub processor 2 executes the application instruction of the ladder.

【0041】メモリ3は、ユーザプログラム、システム
プログラム、I/Oデータを格納する。
The memory 3 stores a user program, a system program, and I / O data.

【0042】プログラマブルコントローラの使用等につ
いて説明する。
The use of the programmable controller will be described.

【0043】主プロセッサ1は基本命令を実行する。応
用命令マクロがあると、副プロセッサ2が実行するた
め、テーブル13には副プロセッサ2が実行するにあた
って必要なパラメータが格納され、副プロセッサ2は割
り込みがかかるとまずテーブル13を読み出し、その後
応用命令マクロを実行する。具体的には応用命令マクロ
の先頭アドレス、I/Oデータの先頭アドレス等が格納
される。
The main processor 1 executes basic instructions. If there is an application instruction macro, the sub-processor 2 executes it. Therefore, the parameters necessary for the execution of the sub-processor 2 are stored in the table 13. Run the macro. Specifically, the start address of the application instruction macro, the start address of I / O data, and the like are stored.

【0044】調停回路14は、主プロセッサ1からメモ
リ3へのアクセスと、副プロセッサ2からメモリ3への
アクセスを調停する。
The arbitration circuit 14 arbitrates access from the main processor 1 to the memory 3 and access from the sub processor 2 to the memory 3.

【0045】ここで、図2、図3、図8を用いてプロセ
ッサ間の処理の引き渡し方式を詳細に説明する。
Here, the method of transferring the processing between the processors will be described in detail with reference to FIGS. 2, 3, and 8.

【0046】図8は、ユーザが専用の入力装置を用いて
プログラミングしたラダープログラムの一部であり、こ
れは、従来のものと同じである。これを主プロセッサ1
が実行可能な命令フォーマットに変換し、図2に示すユ
ーザプログラムエリアに格納される。ここで、応用命令
1及び応用命令2は副ルーチンコールの形態に変換され
るが、応用命令1は演算結果をX1に反映させる命令で
あるため、CALLX(演算結果をX1に反映させる命
令)に変換し、応用命令2は演算結果をどこにも反映さ
せないためCALLY(演算結果をX1に反映させない
命令)に変換する。
FIG. 8 shows a part of the ladder program programmed by the user using a dedicated input device, which is the same as the conventional one. This is the main processor 1
Is converted into an executable instruction format and stored in the user program area shown in FIG. Here, the application instruction 1 and the application instruction 2 are converted into the form of a subroutine call. However, since the application instruction 1 is an instruction for reflecting the operation result on X1, it is included in CALLX (an instruction for reflecting the operation result on X1). The application instruction 2 is converted into CALLY (instruction that does not reflect the operation result in X1) because it does not reflect the operation result anywhere.

【0047】本実施例において、複数種類の特定の命令
は、CALLX(演算結果をX1に反映させる命令)と
CALLY(演算結果をX1に反映させない命令)の2
種類がある。
In the present embodiment, the plurality of types of specific instructions are CALLX (instruction for reflecting the operation result in X1) and CALLY (instruction for not reflecting the operation result in X1).
There are types.

【0048】主プロセッサ1は起動がかかるとユーザプ
ログラムの先頭から実行を開始する。ステップn、n+
1、n+2は接点及びコイル命令なので主プロセッサ1
が実行する。次にステップn+3はCALLX命令なの
で、第1内部レジスタ12aに“1”を書き込む。これ
により、次のサイクルから第1内部レジスタ12aの出
力が“1”となり、副プロセッサ2に割込み信号IRQ
1が出力され、主プロセッサ1はWAIT状態となる。
When the main processor 1 is activated, it starts executing from the beginning of the user program. Step n, n +
1, n + 2 is a contact and coil instruction, so the main processor 1
To run. Next, since step n + 3 is the CALLX instruction, "1" is written in the first internal register 12a. As a result, the output of the first internal register 12a becomes "1" from the next cycle, and the interrupt signal IRQ is sent to the sub processor 2.
1 is output, and the main processor 1 enters the WAIT state.

【0049】副プロセッサ2はIRQ1により割り込み
がかかると、応用命令を実行するために必要なパラメー
タをテーブル13から読みだし、応用命令1マクロを実
行する。
When the sub processor 2 is interrupted by IRQ1, it reads the parameters necessary for executing the application instruction from the table 13 and executes the application instruction 1 macro.

【0050】前述のように、IRQ1が出力されている
間は主プロセッサ1の演算は停止しているため、副プロ
セッサ2からメモリ3へのアクセスは占有される。
As described above, while the operation of the main processor 1 is stopped while the IRQ1 is being output, the access from the sub-processor 2 to the memory 3 is occupied.

【0051】副プロセッサ2が応用命令1マクロを実行
終了時、主プロセッサ1の1内部レジスタ12aに
“0”を書き込むことで主プロセッサ1のWAITは解
除され、次のステップを実行する。
When the sub-processor 2 finishes executing the application instruction 1 macro, writing "0" to the 1 internal register 12a of the main processor 1 releases the WAIT of the main processor 1 and executes the next step.

【0052】ステップn+4はCALLY命令なので、
命令実行時に第2内部レジスタ12bに“1”を書き込
む。これにより、次のサイクルから第2内部レジスタ1
2bの出力が“1”となり、副プロセッサ2に割り込み
信号IRQ2が出力され、主プロセッサ1はWAIT状
態となる。
Since step n + 4 is a CALLY instruction,
"1" is written to the second internal register 12b when executing the instruction. As a result, from the next cycle, the second internal register 1
The output of 2b becomes "1", an interrupt signal IRQ2 is output to the sub processor 2, and the main processor 1 enters the WAIT state.

【0053】一方、副プロセッサ2はIRQ2により割
り込みがかかると、最初に主プロセッサ1の第2内部レ
ジスタ12bに“0”を書き込み、WAITを解除す
る。その後IRQ1による割り込み処理と同様にテーブ
ル13を読み出し、応用命令2マクロを実行する。
On the other hand, when the sub-processor 2 is interrupted by the IRQ 2, the sub-processor 2 first writes "0" in the second internal register 12b of the main processor 1, and releases the WAIT. After that, the table 13 is read and the application instruction 2 macro is executed in the same manner as the interrupt processing by the IRQ1.

【0054】ここで、WAITが解除されステップn+
5以降を実行する主プロセッサ1と、応用命令2マクロ
を実行する副プロセッサ2とでメモリ3に対するアクセ
スの競合が発生するが、これは調停回路14でしかるべ
き手段により調停される。
Here, WAIT is released and step n +
Contention of access to the memory 3 occurs between the main processor 1 executing the program 5 and the sub-processor 2 executing the application instruction 2 macro. This is arbitrated by the arbitration circuit 14 by appropriate means.

【0055】以上、本実施例によれば、副プロセッサ2
が処理する応用命令マクロの処理結果を主プロセッサ1
に反映する必要がない場合、主プロセッサ1と副プロセ
ッサ2が並列に動作するため、ユーザプログラム全体の
処理時間を短縮することが可能となる。
As described above, according to the present embodiment, the secondary processor 2
The processing result of the application instruction macro processed by the main processor 1
When it is not necessary to reflect the above in the above, the main processor 1 and the sub processor 2 operate in parallel, and therefore the processing time of the entire user program can be shortened.

【0056】なお、主プロセッサ1から出力する割り込
み信号を1本にし、第1内部レジスタ12aと第2内部
レジスタ12bの論理和を出力し、副プロセッサ2が割
り込み要因を解析する方法で処理の引き渡し方式を決定
することも可能である。
The main processor 1 outputs only one interrupt signal, the logical sum of the first internal register 12a and the second internal register 12b is output, and the sub-processor 2 passes the processing by the method of analyzing the interrupt factor. It is also possible to determine the scheme.

【0057】また、第1レジスタ12a及び第2内部レ
ジスタ12bは割り込み信号として出力せず、副プロセ
ッサ2がこれらのレジスタを常に監視して処理の引き渡
し要求を認識することも可能である。
Also, the first register 12a and the second internal register 12b do not output as interrupt signals, and the sub-processor 2 can always monitor these registers to recognize a request for processing transfer.

【0058】次に本発明の主プロセッサ及びプログラマ
ブルコントローラの第2の実施例について、フロー言語
を使用する例を図4〜図6を用いて説明する。
Next, a second embodiment of the main processor and programmable controller of the present invention will be described with reference to FIGS. 4 to 6 using flow language as an example.

【0059】図4に主プロセッサと2つの副プロセッサ
を使用したプログラマブルコントローラの構成を示す。
FIG. 4 shows the configuration of a programmable controller using a main processor and two sub processors.

【0060】プログラマブルコントローラは、主プロセ
ッサ1、第1副プロセッサ2a及び第2副プロセッサ2
b、メモリ3、バス4a、4b、4c等から構成されて
いる。
The programmable controller includes a main processor 1, a first sub-processor 2a, and a second sub-processor 2.
b, memory 3, buses 4a, 4b, 4c and the like.

【0061】主プロセッサ1と第1副プロセッサ2a及
び第2副プロセッサ2bはバス4a、4bで接続され、
主プロセッサ1とメモリ3とはバス4cで接続される。
The main processor 1, the first sub-processor 2a and the second sub-processor 2b are connected by buses 4a and 4b,
The main processor 1 and the memory 3 are connected by a bus 4c.

【0062】IRQ1は第1副プロセッサ2aに、IR
Q2は第2副プロセッサ2bに、それぞれ接続される。
The IRQ1 is transmitted to the first sub-processor 2a by an IR
Q2 is connected to each of the second sub-processors 2b.

【0063】図5にプログラマブルコントローラで実行
可能なフロー言語の概略を示す。ここで、処理2(処理
3)と処理4(処理5)と処理6(処理7)とは並列に
実行可能である。したがって、このフロー言語を各プロ
セッサが実行可能な命令形態に変換しユーザプログラム
に格納する際に、処理2と処理3、処理4と処理5、処
理6と処理7をそれぞれのプロセッサにスケージューリ
ングすることが可能となる。
FIG. 5 shows an outline of a flow language executable by the programmable controller. Here, processing 2 (processing 3), processing 4 (processing 5), and processing 6 (processing 7) can be executed in parallel. Therefore, when this flow language is converted into an instruction form that can be executed by each processor and stored in the user program, processing 2 and processing 3, processing 4 and processing 5, processing 6 and processing 7 are scheduled to the respective processors. It is possible to do.

【0064】フロー言語の処理1、処理6、処理7、処
理8を主プロセッサ1、処理2、処理3を第1副プロセ
ッサ2a、処理4、処理5を第2副プロセッサ2bが実
行するようにスケジューリングされ、メモリ3内のユー
ザプログラムエリアに格納されたユーザプログラムの概
略を図6に示す。
The processing 1, processing 6, processing 7, and processing 8 of the flow language are executed by the main processor 1, processing 2, and processing 3 by the first sub processor 2a, and processing 4, and processing 5 by the second sub processor 2b. FIG. 6 shows an outline of the user program scheduled and stored in the user program area in the memory 3.

【0065】ユーザからの起動がかかると、主プロセッ
サ1はユーザプログラムの先頭から実行を開始し、まず
処理1を実行する。次に処理2、処理4、処理6を並列
に実行させるため、第1副プロセッサ2a及び第2副プ
ロセッサ2bに処理を渡す必要がある。ここでは、CA
LLX命令(第1副プロセッサ2aに対する命令)を実
行するため第1内部レジスタ12aに“1”を書き込み
IRQ1を出力し第1副プロセッサ2aに処理2及び処
理3の実行を任せる。第1副プロセッサ2aは割り込み
を受け付けると、まず第1内部レジスタ12aに“0”
を書き込み、主プロセッサ1のWEITを解除し、処理
2及び処理3を実行する。
When activated by the user, the main processor 1 starts execution from the beginning of the user program, and first executes processing 1. Next, in order to execute the processing 2, the processing 4, and the processing 6 in parallel, it is necessary to pass the processing to the first sub-processor 2a and the second sub-processor 2b. Here, CA
In order to execute the LLX instruction (instruction for the first sub-processor 2a), "1" is written in the first internal register 12a and IRQ1 is output to let the first sub-processor 2a execute the processing 2 and the processing 3. When the first sub-processor 2a accepts the interrupt, it first sets "0" in the first internal register 12a.
Is written, the WEIT of the main processor 1 is released, and the processing 2 and the processing 3 are executed.

【0066】主プロセッサ1はWAITが解除される
と、CALLY命令(第2副プロセッサ2bに対する命
令)を実行し、第2内部レジスタ12bに“1”が書き
込みIRQ2を出力する。
When the WAIT is released, the main processor 1 executes a CALLY instruction (an instruction for the second sub-processor 2b), writes "1" in the second internal register 12b, and outputs an IRQ2.

【0067】本実施例において、複数種類の特定の命令
は、CALLX命令(第1副プロセッサ2aに対する命
令)とCALLY命令(第2副プロセッサ2bに対する
命令)とがあり、一般に、特定の命令の種類は、副プロ
セッサ2a、2b、・・・の数だけある。
In this embodiment, the plurality of types of specific instructions include a CALLX instruction (instruction for the first sub-processor 2a) and a CALLY instruction (instruction for the second sub-processor 2b), and generally, the specific instruction type Are the number of the sub processors 2a, 2b,...

【0068】第2副プロセッサ2bは割り込みを受け付
けると、まず第2内部レジスタ12bに“0”を書き込
み、主プロセッサ1のWAITを解除し、処理4及び処
理5を実行する。
When the second sub-processor 2b receives the interrupt, it first writes "0" in the second internal register 12b to release the WAIT of the main processor 1 and executes the processing 4 and the processing 5.

【0069】主プロセッサ1はWAITが解除されると
処理6及び処理7を実行する。その後、同期処理にて第
1副プロセッサ2a及び第2副プロセッサ2bがそれぞ
れの処理を実行完了するまで待機し、終了後処理8を実
行する。
When the WAIT is released, the main processor 1 executes processing 6 and processing 7. After that, the process waits until the first sub-processor 2a and the second sub-processor 2b complete their respective processes in the synchronous process, and the post-termination process 8 is executed.

【0070】以上、本実施例によれば、フロー言語式の
ユーザプログラムを各プロセッサに並列に実行可能な処
理単位であらかじめスケジューリングして動作するた
め、全体の処理時間の短縮が図れる。ただし、特に明記
しなかったが、第1副プロセッサ2aと第2副プロセッ
サ2bのバス4aへのアクセス競合が発生した場合の調
停は、第1副プロセッサ2a及び第2副プロセッサ2b
間で行えばよい。
As described above, according to the present embodiment, the flow language type user program is scheduled and operated in advance in a processing unit which can be executed in parallel by each processor, so that the overall processing time can be reduced. However, although not specifically stated, the arbitration in the case where the access conflict between the first sub-processor 2a and the second sub-processor 2b with respect to the bus 4a occurs is the first sub-processor 2a and the second sub-processor 2b.
Just go between them.

【0071】[0071]

【発明の効果】本発明によれば、ラダー言語及びフロー
言語を使用することができ、そして、複数のプロセッサ
でシーケンス演算を行う場合、並列に各プロセッサが動
作可能となるため、ユーザプログラムの全体の実行時間
短縮が図れる。
According to the present invention, the ladder language and the flow language can be used, and when the sequence operation is performed by a plurality of processors, each processor can operate in parallel, so that the entire user program can be operated. Execution time can be reduced.

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

【図1】本発明の第1の実施例の説明図。FIG. 1 is an explanatory diagram of a first embodiment of the present invention.

【図2】本発明で使用するラダー言語変換後プログラム
概略の一例の説明図。
FIG. 2 is an explanatory diagram of an example of an outline of a program after ladder language conversion used in the present invention.

【図3】本発明の動作タイミングの一例の説明図。FIG. 3 is an explanatory diagram of an example of operation timing according to the present invention.

【図4】本発明の第2の実施例の説明図。FIG. 4 is an explanatory diagram of a second embodiment of the present invention.

【図5】本発明で使用するフロー言語によるプログラム
の一例の説明図例。
FIG. 5 is an explanatory diagram of an example of a program in a flow language used in the present invention.

【図6】本発明で使用するフロー言語変換後プログラム
概略の一例の説明図。
FIG. 6 is an explanatory diagram of an example of an outline of a program after flow language conversion used in the present invention.

【図7】従来方式の構成の説明図。FIG. 7 is an explanatory diagram of a configuration of a conventional system.

【図8】ラダー言語によるプログラムの一例。FIG. 8 shows an example of a program in a ladder language.

【図9】従来方式ラダー言語変換後プログラム概略の説
明図。
FIG. 9 is an explanatory diagram of an outline of a program after conversion of a conventional ladder language.

【図10】従来方式動作タイミングの説明図。FIG. 10 is an explanatory diagram of operation timing of a conventional system.

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

1 主プロセッサ 11 演算回路 12、12a、12b 内部レジスタ 13 テーブル 14 調停回路 2、2a、2b 副プロセッサ 3 メモリ 4a、4b、4c バス 1 Main Processor 11 Arithmetic Circuit 12, 12a, 12b Internal Register 13 Table 14 Arbitration Circuit 2, 2a, 2b Sub Processor 3 Memory 4a, 4b, 4c Bus

───────────────────────────────────────────────────── フロントページの続き (72)発明者 小倉 真 茨城県日立市大みか町七丁目1番1号 株 式会社日立製作所日立研究所内 ───────────────────────────────────────────────────の Continuing from the front page (72) Inventor Makoto Ogura 7-1-1, Omika-cho, Hitachi City, Ibaraki Prefecture Within Hitachi Research Laboratory, Hitachi, Ltd.

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 ユーザが作成したプログラム及びI/O
データを格納するメモリと、ユーザからの起動により演
算を開始する主プロセッサと、主プロセッサからの割込
みでシーケンス演算を実行する副プロセッサと、から構
成されるプログラマブルコントローラに使用される主プ
ロセッサにおいて、 複数種類の特定の命令を実行時、特定の値が書き込まれ
る2以上の数のレジスタと、主プロセッサと副プロセッ
サとの間でデータを渡すためのテーブルと、主プロセッ
サと副プロセッサからメモリへのアクセスを調停する手
段とを具備することを特徴とするプログラマブルコント
ローラ用主プロセッサ。
1. Program and I / O created by a user
A main processor used in a programmable controller that is composed of a memory that stores data, a main processor that starts an operation when activated by a user, and a sub processor that executes a sequence operation by an interrupt from the main processor. When executing a specific instruction of a kind, a register of two or more to which a specific value is written, a table for passing data between the main processor and the sub processor, and access to memory from the main processor and the sub processor A main processor for a programmable controller, which comprises:
【請求項2】 ユーザが作成したプログラム及びI/O
データを格納するメモリと、ユーザからの起動により演
算を開始する主プロセッサと、主プロセッサからの割込
みでシーケンス演算を実行する副プロセッサと、から構
成されるプログラマブルコントローラにおいて、 主プロセッサは、複数種類の特定の命令を実行時、特定
の値が書き込まれる2以上の数のレジスタと、主プロセ
ッサと副プロセッサとの間でデータを渡すためのテーブ
ルと、主プロセッサと副プロセッサからメモリへのアク
セスを調停する手段とを具備することを特徴とするプロ
グラマブルコントローラ。
2. Program and I / O created by a user
In a programmable controller including a memory for storing data, a main processor that starts an operation upon activation by a user, and a sub-processor that executes a sequence operation in response to an interrupt from the main processor, a main processor includes a plurality of types of main processors. When executing a specific instruction, two or more registers to which a specific value is written, a table for passing data between the main processor and the sub processor, and arbitration of memory access from the main processor and the sub processor. And a means for performing the programmable controller.
【請求項3】 請求項1記載の主プロセッサ又は請求項
2記載のプログラマブルコントローラにおいて、 使用する言語がラダー言語であることを特徴とする主プ
ロセッサ又はプログラマブルコントローラ。
3. The main processor or the programmable controller according to claim 1, wherein a language to be used is a ladder language.
【請求項4】 請求項1もしくは3に記載の主プロセッ
サ又は請求項2もしくは3に記載のプログラマブルコン
トローラにおいて、 副プロセッサの数は1であり、割込みの数は2であり、
そして、レジスタの数は2であることを特徴とする主プ
ロセッサ又はプログラマブルコントローラ。
4. The main processor according to claim 1 or 3, or the programmable controller according to claim 2 or 3, wherein the number of sub-processors is 1, the number of interrupts is 2,
The main processor or programmable controller is characterized in that the number of registers is two.
【請求項5】 請求項1記載の主プロセッサ又は請求項
2記載のプログラマブルコントローラにおいて、 使用する言語がフロー言語であることを特徴とする主プ
ロセッサ又はプログラマブルコントローラ。
5. The main processor according to claim 1, or the programmable controller according to claim 2, wherein the language used is a flow language.
【請求項6】 請求項1もしくは5記載の主プロセッサ
又は請求項2もしくは5記載のプログラマブルコントロ
ーラにおいて、 副プロセッサの数、割込みの数及びレジスタの数は全て
同じで、かつ、2以上あることを特徴とする主プロセッ
サ又はプログラマブルコントローラ。
6. The main processor according to claim 1 or 5, or the programmable controller according to claim 2 or 5, wherein the number of sub-processors, the number of interrupts, and the number of registers are all the same and are two or more. Characteristic main processor or programmable controller.
【請求項7】 請求項1〜6のいずれか1項に記載の主
プロセッサ又はプログラマブルコントローラにおいて、 主プロセッサが具備する複数のレジスタに対し、副プロ
セッサがリード又はライト可能であることを特徴とする
主プロセッサ又はプログラマブルコントローラ。
7. The main processor or the programmable controller according to claim 1, wherein a sub processor can read or write a plurality of registers included in the main processor. Main processor or programmable controller.
JP9118067A 1997-05-08 1997-05-08 Main processor and programmable controller Pending JPH10307607A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9118067A JPH10307607A (en) 1997-05-08 1997-05-08 Main processor and programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9118067A JPH10307607A (en) 1997-05-08 1997-05-08 Main processor and programmable controller

Publications (1)

Publication Number Publication Date
JPH10307607A true JPH10307607A (en) 1998-11-17

Family

ID=14727197

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9118067A Pending JPH10307607A (en) 1997-05-08 1997-05-08 Main processor and programmable controller

Country Status (1)

Country Link
JP (1) JPH10307607A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016110220A (en) * 2014-12-02 2016-06-20 株式会社キーエンス Programmable logic controller and control method therefor

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54114687A (en) * 1978-02-27 1979-09-06 Toyoda Mach Works Ltd Sequence controller
JPS63157204A (en) * 1986-12-22 1988-06-30 Omron Tateisi Electronics Co Programmable controller
JPH025104A (en) * 1988-06-23 1990-01-10 Fanuc Ltd Arithmetic processing unit
JPH03282904A (en) * 1990-03-30 1991-12-13 Matsushita Electric Works Ltd Programmable controller
JPH03288906A (en) * 1990-04-05 1991-12-19 Fanuc Ltd Instruction executing system for pc
JPH04363704A (en) * 1991-02-25 1992-12-16 Matsushita Electric Works Ltd Arithmetic processor for programmable controller
JPH0573112A (en) * 1990-08-31 1993-03-26 Allen Bradley Co Inc Processor for programmable controller
JPH07248807A (en) * 1994-03-11 1995-09-26 Toshiba Corp Programmable controller
JPH08249022A (en) * 1995-03-13 1996-09-27 Omron Corp Multiprocessor arithmetic unit and programmable controller having the arithmetic unit
JPH08249289A (en) * 1995-03-10 1996-09-27 Omron Corp Memory controller and its control method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54114687A (en) * 1978-02-27 1979-09-06 Toyoda Mach Works Ltd Sequence controller
JPS63157204A (en) * 1986-12-22 1988-06-30 Omron Tateisi Electronics Co Programmable controller
JPH025104A (en) * 1988-06-23 1990-01-10 Fanuc Ltd Arithmetic processing unit
JPH03282904A (en) * 1990-03-30 1991-12-13 Matsushita Electric Works Ltd Programmable controller
JPH03288906A (en) * 1990-04-05 1991-12-19 Fanuc Ltd Instruction executing system for pc
JPH0573112A (en) * 1990-08-31 1993-03-26 Allen Bradley Co Inc Processor for programmable controller
JPH04363704A (en) * 1991-02-25 1992-12-16 Matsushita Electric Works Ltd Arithmetic processor for programmable controller
JPH07248807A (en) * 1994-03-11 1995-09-26 Toshiba Corp Programmable controller
JPH08249289A (en) * 1995-03-10 1996-09-27 Omron Corp Memory controller and its control method
JPH08249022A (en) * 1995-03-13 1996-09-27 Omron Corp Multiprocessor arithmetic unit and programmable controller having the arithmetic unit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016110220A (en) * 2014-12-02 2016-06-20 株式会社キーエンス Programmable logic controller and control method therefor

Similar Documents

Publication Publication Date Title
JPH0376496B2 (en)
JPS60258671A (en) Processor
JPH0454255B2 (en)
JPH10307607A (en) Main processor and programmable controller
JPS6315628B2 (en)
JPH06175911A (en) Memory control system
JPS6146552A (en) Information processor
JPS6020275A (en) Simple programming system of multiprocessor
JPH0887481A (en) Starting-up method for multiprocessor board
JPS62296236A (en) Interruption processor for microprocessor
JPH0561660B2 (en)
KR950004227B1 (en) Information processing system
CN111143141A (en) State machine setting method and system
JPH05241986A (en) Input/output instruction retrying system
JPH07210403A (en) Task switching system
JPH1195812A (en) Programmable controller
JPH02146660A (en) Information processor
JP2006023808A (en) Apparatus and method of transferring data
JPS61165136A (en) Buffer access request controlling system
JPH0462093B2 (en)
JPS62196730A (en) Stage control system for data processor
JPH03141454A (en) Local bus controller
JPH0991247A (en) Bus arbiter
JPH0525538U (en) Multi-processor device
JPH08115214A (en) Digital signal processor