JPH056208A - Controller and control method therefor - Google Patents

Controller and control method therefor

Info

Publication number
JPH056208A
JPH056208A JP28622191A JP28622191A JPH056208A JP H056208 A JPH056208 A JP H056208A JP 28622191 A JP28622191 A JP 28622191A JP 28622191 A JP28622191 A JP 28622191A JP H056208 A JPH056208 A JP H056208A
Authority
JP
Japan
Prior art keywords
instruction
special function
memory
program
unit
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
JP28622191A
Other languages
Japanese (ja)
Other versions
JP2542465B2 (en
Inventor
Shinichi Amagasaki
新一 尼崎
Teruyo Asai
照代 浅井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP3286221A priority Critical patent/JP2542465B2/en
Publication of JPH056208A publication Critical patent/JPH056208A/en
Application granted granted Critical
Publication of JP2542465B2 publication Critical patent/JP2542465B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To prepare a program without being conscious of the address of the multi-direction access memory of a special function part, to speedily recognize an operation executed by the instruction by observing the instruction form and to obtain the high readability of the program. CONSTITUTION:At a CPU unit 1, it is discriminated according to an instruction symbol that the instruction is correspondent to the special function part, that the program is executed with an instruction step using the instruction symbol expressing the class and that the instruction step under execution is correspondent to the special function part, the contents of the instruction step are stored in a multi-direction access memory 41 of a correspondent special function unit 4A, and the execution is requested to the special function unit 4A. Then, the contents of the instruction step stored in the multi-direction access memory 41 are accessed based on the instruction symbol without depending on a memory address and executed at the special function unit 4A.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、CPU部からの指令
により上記CPU部が行なう例えばシーケンス制御のご
とき標準的なプログラム制御以外の特殊な制御を行なう
特殊機能部を備えた制御装置及びその制御方法に関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control device provided with a special function part for performing special control other than standard program control such as sequence control performed by the CPU part in response to a command from the CPU part, and its control. It is about the method.

【0002】[0002]

【従来の技術】制御装置としてのプログラマブルコント
ローラは当初、単なるリレー盤の置き換えであったが、
プログラムの手軽さやフレキシブル性により、また、高
機能化が進んだ事により、その適応分野は飛躍的に拡大
してきた。それに伴い、シーケンス制御だけでなく、ア
ナログ゛制御、位置決め制御、通信制御、モニタ表示
等、種々の制御をプログラマブルコントローラで行なう
ようになってきた。上記シーケンス制御は主としてプロ
グラマブルコントローラの構成ユニットの一つであるC
PUユニットが司り、シーケンス制御以外の上記種々の
制御は、主として特殊機能ユニット群が司り、分担して
制御している。また、CPUユニットは特殊機能ユニッ
ト群に対して指示データの書き込みや結果データの読み
出しを行なうことにより、全体を統括制御する。制御シ
ステムが大規模複雑化する中、上記特殊機能ユニットは
現在では必須の物になっている。
2. Description of the Related Art A programmable controller as a control device was originally just a replacement of a relay board,
Due to the ease and flexibility of the program and the advancement of higher functionality, the applicable fields have expanded dramatically. Along with this, not only sequence control but also various controls such as analog control, positioning control, communication control, monitor display, etc. have come to be performed by a programmable controller. The sequence control is mainly C which is one of the constituent units of the programmable controller.
The PU unit is in charge of control, and various types of control other than the sequence control are mainly controlled by the special function unit group and are shared and controlled. Further, the CPU unit controls the whole by writing instruction data and reading result data to the special function unit group. As the control system becomes large-scale and complicated, the special function unit is now indispensable.

【0003】以下、CPUユニットにおける、特殊機能
ユニットとのデータの読み出し/書き込みについて述べ
る。図7はプログラマブルコントローラのシステム構成
図である。図において、1はプログラマブルコントロー
ラ全体を制御するCPUユニットであり、シーケンスプ
ログラムが格納されるプログラムメモリ11、シーケン
スプログラムで使われる、あるいは演算結果のデータが
格納されているデバイスメモリ12を備える。2はプロ
グラムメモリ11に格納されるシーケンスプログラムを
作成しておくプログラム装置、3はCPUユニット1と
プログラム装置2を接続する通信ケーブル、4は入出力
ユニット、4Aは特殊機能ユニットであり、特殊機能ユ
ニット4AとCPUユニット1とのデータの読み書きで
きる多方向アクセスメモリとしての2ポートメモリ41
を備える。
The reading / writing of data with the special function unit in the CPU unit will be described below. FIG. 7 is a system configuration diagram of the programmable controller. In the figure, reference numeral 1 is a CPU unit that controls the entire programmable controller, and includes a program memory 11 in which a sequence program is stored, and a device memory 12 used in the sequence program or storing operation result data. 2 is a program device for creating a sequence program to be stored in the program memory 11, 3 is a communication cable connecting the CPU unit 1 and the program device 2, 4 is an input / output unit, and 4A is a special function unit. Two-port memory 41 as a multidirectional access memory capable of reading and writing data between the unit 4A and the CPU unit 1
Equipped with.

【0004】図21a〜cは2ポートメモリ41の構成
例であり、それぞれ2CH D/Aユニットの2ポート
メモリ41A、8CH D/Aユニットの2ポートメモ
リ41B、表示ユニットの2ポートメモリ41Cの構成
例を示す。
FIGS. 21A to 21C show examples of the structure of the 2-port memory 41. The structures of the 2-port memory 41A of the 2CH D / A unit, the 2-port memory 41B of the 8CH D / A unit, and the 2-port memory 41C of the display unit are respectively shown. Here is an example:

【0005】図22は、CPUユニット1における特殊
機能ユニットとのデータの読み書きを行なう命令の形式
を示すものである。図において、5はCPUユニット1
が特殊機能ユニット4Aからデータを読み出す命令であ
り、特殊機能ユニット4Aの装着位置に対応する入出力
NO51、特殊機能ユニットの2ポートメモリ41にお
けるデータを読み出す際の先頭アドレス52、読み出さ
れたデータを格納するデバイスメモリ12の先頭デバイ
ス53および転送するデータの点数54から構成され
る。6はCPUユニット1が特殊機能ユニット4Aにデ
ータを書き込む命令であり、特殊機能ユニット4Aの装
着位置に対応する入出力NO61、特殊機能ユニット4
Aのデータを書き込む2ポートメモリ41の先頭アドレ
ス62、書き込むためのデータが格納されているデバイ
スメモリ12の先頭デバイス63、転送するデータの点
数64から構成される。
FIG. 22 shows a format of an instruction for reading / writing data from / to the special function unit in the CPU unit 1. In the figure, 5 is a CPU unit 1
Is an instruction to read data from the special function unit 4A, the input / output NO 51 corresponding to the mounting position of the special function unit 4A, the start address 52 when reading the data in the 2-port memory 41 of the special function unit, and the read data Is composed of a head device 53 of the device memory 12 for storing the data and a score 54 of data to be transferred. Reference numeral 6 is an instruction for the CPU unit 1 to write data to the special function unit 4A. The input / output NO 61 and the special function unit 4 corresponding to the mounting position of the special function unit 4A.
It is composed of a head address 62 of the 2-port memory 41 for writing the data of A, a head device 63 of the device memory 12 in which the data for writing is stored, and a score 64 of the data to be transferred.

【0006】図23は、CPUユニット1における特殊
機能ユニット4Aとのデータの読み出し/書き込みを行
なう命令の具体例を示す図である。図において、6Aは
入出力NO50の位置に装着されている特殊機能ユニッ
ト4Aの2ポートメモリ41のアドレス2にデバイスD
0の内容を1点分書き込む命令であり、6Bは入出力N
O50の位置に装着されている特殊機能ユニット4Aの
2ポートメモリ42のアドレス8にデバイスD0の内容
を1点分書き込む命令である。
FIG. 23 is a diagram showing a specific example of an instruction for reading / writing data from / to the special function unit 4A in the CPU unit 1. In the figure, 6A is the device D at the address 2 of the 2-port memory 41 of the special function unit 4A mounted at the input / output NO50 position.
This is an instruction to write the contents of 0 for one point, and 6B is an input / output
This is a command for writing one point of the contents of the device D0 to the address 8 of the 2-port memory 42 of the special function unit 4A mounted at the position of O50.

【0007】次に、具体的な動作、例えば、入出力NO
50の位置に特殊機能ユニット4Aとして2CH D/
Aユニット(デジタル/アナログ変換機能を2つ持つ特
殊機能ユニット)を装着し、1CH目にデバイスD0の
内容に対応したアナログ値を出力したい場合のプログラ
ムについて考える。この場合、図21aに示したポート
メモリ構成例からわかるように2ポートメモリ41Aの
アドレス2にデバイスD0の内容を書き込めば良い。つ
まり、図23におけるプログラム6Aとなる。ユーザは
プログラム装置2により、図23におけるプログラム6
Aを作成し、CPUユニット1のプログラムメモリ11
に通信ケーブル3を介してそのプログラム6Aを書き込
む。
Next, a specific operation, for example, input / output NO
2CH D / as special function unit 4A at position 50
Consider a program in which an A unit (special function unit having two digital / analog conversion functions) is mounted and an analog value corresponding to the contents of the device D0 is output on the 1st CH. In this case, as can be seen from the port memory configuration example shown in FIG. 21a, the content of the device D0 may be written in address 2 of the 2-port memory 41A. That is, the program 6A in FIG. 23 is obtained. The user uses the programming device 2 to program 6 in FIG.
A is created and the program memory 11 of the CPU unit 1 is created.
The program 6A is written in the program via the communication cable 3.

【0008】次に、実際にCPUユニット1がプログラ
ムメモリ11に書かれたプログラム6Aを実行する時
は、そのプログラムで指定された入出力NO50の位置
に装着されている2CH D/Aユニットの2ポートメ
モリ41Aのアドレス2にデバイスメモリ12のデバイ
スD0の内容を書き込む。2CH D/Aユニットは2
ポートメモリ41Aのアドレス2の内容に応じたアナロ
グ値を出力する。
Next, when the CPU unit 1 actually executes the program 6A written in the program memory 11, 2 of the 2CH D / A units mounted at the position of the input / output NO50 designated by the program. The contents of the device D0 of the device memory 12 are written to the address 2 of the port memory 41A. 2CH D / A unit is 2
An analog value corresponding to the contents of address 2 of the port memory 41A is output.

【0009】次に、例えば、入出力NO50の位置に8
CH D/Aユニット(デジタル/アナログ変換機能を
8つ持つ特殊機能ユニット)を装着し、1CH目にデバ
イスD0の内容に対応したアナログ値を出力したい場合
のプログラムについて考える。この場合、図21bの2
ポートメモリ構成例から明らかのように2ポートメモリ
41Bのアドレス8にデバイスD0の内容を書き込めば
良い、つまり、図23におけるプログラム6Bとなるわ
けである。ユーザ゛はプログラム装置2により、図23
におけるプログラム6Bを作成し、CPUユニット1の
プログラムメモリ11に通信ケーブル3を介してそのプ
ログラム6Bを書き込む。次に、実際にCPUユニット
1が、プログラムメモリ11に書かれたプログラム6B
を実行する時は、そのプログラムで指定された入出力N
O50の位置に装着されている8CH D/Aユニット
における2ポートメモリ41Bのアドレス8にデバイス
メモリのデバスイD0の内容を書き込む。8CH D/
Aユニットはバッファメモリ41Bのアドレス8の内容
に応じたアナログ゛値を出力する。
Next, for example, at the input / output NO50 position, 8
Consider a program in which a CH D / A unit (special function unit having eight digital / analog conversion functions) is mounted and an analog value corresponding to the contents of the device D0 is output on the 1st CH. In this case, 2 in FIG.
As is clear from the port memory configuration example, the contents of the device D0 may be written in the address 8 of the 2-port memory 41B, that is, the program 6B in FIG. The user can use the programming device 2 to execute the process shown in FIG.
The program 6B is created and the program 6B is written into the program memory 11 of the CPU unit 1 via the communication cable 3. Next, the CPU unit 1 actually executes the program 6B written in the program memory 11.
Input / output N specified by the program when executing
The content of the device D0 of the device memory is written to address 8 of the 2-port memory 41B in the 8CH D / A unit mounted at the position of O50. 8CH D /
The A unit outputs an analog value according to the contents of address 8 in the buffer memory 41B.

【0010】さらに、例えば、入出力NO50の位置に
表示機能を持つ特殊機能ユニット4Aとしての表示ユニ
ットを装着し、1行3列目にデバイスD0の内容に対応
した文字を表示したい場合のプログラムについて考え
る。この場合、図21cのバッファメモリ構成例からわ
かるように2ポートメモリ41Cのアドレス2にデバイ
スD0の内容を書き込めば良い、つまり、図23におけ
るプログラム6Aとなるわけである。ユーザは、プログ
ラム装置2により、図23におけるプログラム6Aを作
成し、CPUユニット1のプログラムメモリ11に通信
ケーブル3を介してそのプログラム6Aを書き込む。次
に、実際にCPUユニット1が、プログラムメモリ11
に書かれたプログラム6Aを実行する時は、そのプログ
ラム6Aで指定された入出力NO50の位置に装着され
ている表示ユニットの2ポートメモリ41Cのアドレス
2にデバイスメモリのデバイスD0の内容を書き込む。
表示ユニットは2ポートメモリ41Cのアドレス2の内
容に応じた文字を表わす。
Further, for example, regarding a program for mounting a display unit as a special function unit 4A having a display function at the position of input / output NO50 and displaying a character corresponding to the contents of the device D0 in the first row and third column Think In this case, as can be seen from the buffer memory configuration example of FIG. 21c, the content of the device D0 may be written in address 2 of the 2-port memory 41C, that is, the program 6A in FIG. The user creates the program 6A in FIG. 23 by the programming device 2 and writes the program 6A in the program memory 11 of the CPU unit 1 via the communication cable 3. Next, the CPU unit 1 actually causes the program memory 11
When executing the program 6A written in, the contents of the device D0 of the device memory are written to the address 2 of the 2-port memory 41C of the display unit mounted at the position of the input / output NO50 designated by the program 6A.
The display unit represents a character corresponding to the contents of address 2 of the 2-port memory 41C.

【0011】このように、従来は、特殊機能ユニットに
対する命令がFROM、TO等数種類しかなくこれらの
命令で全ての特殊機能ユニットに対する処理をしようと
したため、プログラム6Aは、ある時は、1CH目のア
ナログ出力命令になり、ある時は、表示命令になる。ま
た、D/Aユニットの1CH目にアナログ出力を行なう
時、D/Aユニットのチャンネル数の相違によりプログ
ラム6Aになったり、プログラム6Bになったりする
(16CH D/Aユニットであればまた別のプログラ
ムになる。)
As described above, conventionally, there are only a few kinds of commands for the special function unit, such as FROM and TO, and it has been attempted to process all the special function units with these commands. Therefore, the program 6A may at some time be on the first channel. It becomes an analog output command, and sometimes it becomes a display command. Also, when analog output is performed on the 1st CH of the D / A unit, it becomes program 6A or program 6B due to the difference in the number of channels of the D / A unit. It becomes a program.)

【0012】[0012]

【発明が解決しようとする課題】従来の制御装置の制御
方法は以上のように特殊機能部に対する命令の種類が少
なく、これらの少ない命令で特殊機能部に対する全ての
処理が行なわれるので、同じ命令が全く別の動作を指令
し、また、同じ動作に対する命令の形式が異なり、命令
形式を見てその命令が指令する動作が全く判からず、ま
た、多方向読み出メモリのアドレスを意識してプログラ
ムを作成せねばならず、プログラムの作成が面倒である
などの問題点があった。
As described above, the conventional control method of the control device has a small number of types of instructions for the special function section, and all the processing for the special function section is performed with these few instructions. Command a completely different operation, and the format of the instruction for the same operation is different, the operation commanded by the instruction is completely unknown by looking at the instruction format, and the address of the multi-directional read memory is taken into consideration. There was a problem that the program had to be created, and the creation of the program was troublesome.

【0013】この発明は、上記のような問題点を解消す
るためになされたもので、特殊機能部の多方向アクセス
メモリのアドレスを意識せずにプログラムが作成できる
と共に、その命令形式をみてその命令が行なう動作がす
ぐに判かり、プログラムの可読性の良好な制御装置及び
その制御方法を得ることを目的とする。
The present invention has been made to solve the above problems, and a program can be created without being aware of the address of the multi-directional access memory of the special function section, and its instruction format An object of the present invention is to obtain a control device and a control method thereof in which the operation performed by an instruction can be immediately understood and the readability of a program is good.

【0014】[0014]

【課題を解決するための手段】第1の発明に係わる制御
装置の制御方法は、プログラム制御を行なうCPU部
と、上記CPU部からもアクセス可能な多方向アクセス
メモリを有し、上記CPU部からの指令により特殊制御
を行なう複数の特殊機能部とを備えた制御装置におい
て、特殊機能部対応命令であること及びその種別を表わ
す命令記号を用いた命令ステップを有するプログラムを
作成しておく段階と、上記CPU部にて上記プログラム
を実行し、実行中の上記命令ステップが特殊機能部対応
命令であることを上記命令記号により判別し、上記命令
ステップの内容を対応する特殊機能部の上記多方向アク
セスメモリへ格納すると共に上記特殊機能部に対してそ
の実行を要求する段階と、上記特殊機能部にて上記多方
向アクセスメモリへ格納された上記命令ステップの内容
をメモリアドレスによらずに上記命令記号に基づきアク
セスして実行する段階とからなるものである。
According to a first aspect of the present invention, there is provided a control method for a control device, comprising: a CPU section for controlling a program; and a multidirectional access memory accessible from the CPU section. In a control device provided with a plurality of special function parts for performing special control according to the command of step 1, and creating a program having command steps using command symbols representing the special function part corresponding commands and their types. The CPU unit executes the program, determines that the command step being executed is a special function unit corresponding command by the command symbol, and determines the contents of the command step in the multidirectional direction of the corresponding special function unit. The step of storing the data in the access memory and requesting the special function unit to execute it, and the step of storing the multi-directional access memory in the special function unit. The by contents of the instruction step is made of a step of performing access based on the instruction symbol regardless of the memory address.

【0015】また、第2の発明に係わる制御装置の制御
方法は、第1の発明に係わる制御装置の制御方法におい
て、命令ステップの命令記号が特殊機能部対応命令を表
わす第1の記号及び特殊機能種別を表わす第2の記号か
らなり、実行中の上記命令ステップが特殊機能部対応命
令であることを上記第1の記号により判別し、上記特殊
機能部にて上記多方向アクセスメモリへ格納された上記
命令ステップの内容をメモリアドレスによらずに上記第
2の記号に基づいてアクセスして実行するものである。
The control method of the control device according to the second invention is the control method of the control device according to the first invention, wherein the command symbol of the command step represents a command corresponding to the special function part and the special symbol. It is composed of a second symbol indicating a function type, and it is determined by the first symbol that the instruction step being executed is a special function unit corresponding instruction, and the special function unit stores it in the multi-directional access memory. The contents of the instruction step are accessed and executed based on the second symbol without depending on the memory address.

【0016】また、第3の発明に係わる制御装置のプロ
グラム制御方法は、第1の発明に係わる制御装置におい
て、複数の特殊機能部のそれぞれに対応の命令情報をそ
れぞれが有する多方向アクセスメモリに格納し、かつ特
殊機能部対応命令であること及びその種別を表わす命令
記号を用いた命令ステップを有するプログラムを作成し
ておく段階と、上記CPU部にて上記プログラムを実行
し、実行中の上記命令ステップが上記特殊機能部対応命
令であることを上記命令記号により判別し、対応する特
殊機能部の上記多方向アクセスメモリに格納された上記
命令情報をアクセスし、上記命令情報と上記命令ステッ
プの内容とが一致したら上記特殊機能部に対して上記命
令情報に従ってその実行を要求する段階と、上記特殊機
能部にて上記多方向アクセスメモリへ格納された上記命
令情報の実行部分を上記命令記号に基づいてアクセス
し、命令を実行する段階とからなるものである。
Further, a program control method for a control device according to a third aspect of the present invention is the control device according to the first aspect, wherein a multidirectional access memory having command information corresponding to each of the plurality of special function units is provided. A step of storing and creating a program having an instruction step using an instruction symbol representing the instruction corresponding to the special function section and its type, and executing the program in the CPU section and executing the program. It is determined by the instruction symbol that the instruction step is an instruction corresponding to the special function section, the instruction information stored in the multi-directional access memory of the corresponding special function section is accessed, and the instruction information and the instruction step If the contents match, a step of requesting the special function unit to execute the special function unit according to the command information, and the special function unit The execution portion of the instruction information stored to access memory to access based on the instruction symbol, is made of a step of executing instructions.

【0017】また、第4の発明に係わる制御装置の制御
方法は、第3の発明に係わる制御装置の制御方法におい
て、命令ステップの命令記号が特殊機能部対応命令を表
わす第1の記号及び特殊機能種別を表わす第2の記号か
らなり、実行中の上記命令ステップが上記特殊機能部対
応命令であることを上記第1の記号により判別し、上記
特殊機能部にて上記多方向アクセスメモリへ格納された
上記命令情報の実行部分を上記第2の記号に基づいてア
クセスし、命令を実行するものである。
The control method of the control device according to the fourth aspect of the present invention is the control method of the control device according to the third aspect of the invention, wherein the instruction symbol of the instruction step represents the special function corresponding instruction and the special symbol. It is composed of a second symbol representing a function type, and it is determined by the first symbol that the instruction step being executed is the instruction corresponding to the special function unit, and the special function unit stores it in the multi-directional access memory. The executed part of the executed instruction information is accessed based on the second symbol to execute the instruction.

【0018】第5の発明に係る制御装置は、プログラム
制御を行なうCPU部と、上記CPU部からの指令によ
り特殊制御を行なう特殊機能部とを備え、上記特殊機能
部は上記特殊機能部をアクセスする命令用情報を格納
し、上記CPU部及び特殊機能部の両方からアクセス可
能なメモリと、上記メモリに上記命令用情報を格納する
情報格納手段とを有し、上記CPU部は任意の命令名で
入力されたプログラム中の命令が特殊機能部をアクセス
する命令であることを判別する命令判別手段と、上記特
殊機能部をアクセスする命令を解読し、上記メモリに格
納された上記命令用情報に基づいて上記解読した命令を
実行する命令実行手段とを有するものである。
A control device according to a fifth aspect of the present invention includes a CPU section for performing program control, and a special function section for performing special control according to a command from the CPU section, and the special function section accesses the special function section. Has a memory for storing the instruction information to be accessed and accessible from both the CPU section and the special function section, and an information storage unit for storing the instruction information in the memory, and the CPU section has an arbitrary instruction name. And an instruction discriminating means for discriminating that the instruction in the program inputted in step 3 is an instruction for accessing the special function section, and decoding the instruction for accessing the special function section to obtain the instruction information stored in the memory. And an instruction executing means for executing the decoded instruction based on the above.

【0019】第6の発明に係る制御装置は、プログラム
制御を行なうCPU部と、上記CPU部からの指令によ
り特殊制御を行なう特殊機能部とを備え、上記特殊機能
部は上記特殊機能部をアクセスする命令用情報を格納
し、上記CPU部からアクセス可能な命令用情報メモリ
を有し、上記CPU部は任意の命令名で入力されたプロ
グラム中の命令が特殊機能部をアクセスする命令である
ことを判別する命令判別手段と、上記特殊機能部をアク
セスする命令を解読し、上記命令用情報メモリに格納さ
れた上記命令用情報に基づいて上記解読した命令を実行
する命令実行手段とを有するものである。
A control device according to a sixth aspect of the present invention includes a CPU section for performing program control, and a special function section for performing special control according to a command from the CPU section, and the special function section accesses the special function section. Has a command information memory that stores the command information to be accessed and that can be accessed from the CPU unit, and the CPU unit has an instruction in the program input with an arbitrary command name that accesses the special function unit. And an instruction executing means for decoding an instruction for accessing the special function unit and executing the decoded instruction based on the instruction information stored in the instruction information memory. Is.

【0020】第7の発明に係る制御装置は、プログラム
制御を行なうCPU部と、上記CPU部からの指令によ
り特殊制御を行なう特殊機能部とを備え、上記特殊機能
部は上記特殊機能部をアクセスする命令用情報を格納
し、上記CPU部からアクセス可能な第1の命令用情報
メモリを有し、上記CPU部は上記命令用情報を格納可
能な第2の命令用情報メモリと、上記第1の命令用情報
メモリに格納されている上記命令用情報を上記第2の命
令用情報メモリに転送して格納するデータ転送手段と、
任意の命令名で入力されたプログラム中の命令が特殊機
能部をアクセスする命令であることを判別する命令判別
手段と、上記特殊機能部をアクセスする命令を解読し、
上記第2の命令用情報メモリに格納された上記命令用情
報に基づいて上記解読した命令を実行する命令実行手段
とを有するものである。
A control device according to a seventh aspect of the present invention includes a CPU section for performing program control and a special function section for performing special control according to a command from the CPU section. The special function section accesses the special function section. And a first instruction information memory that is accessible from the CPU unit, the CPU unit including a second instruction information memory that can store the instruction information and the first instruction information memory. Data transfer means for transferring and storing the command information stored in the command information memory in the second command information memory,
An instruction discriminating means for discriminating that the instruction in the program inputted with an arbitrary instruction name is an instruction for accessing the special function section, and decoding the instruction for accessing the special function section,
An instruction executing means for executing the decoded instruction based on the instruction information stored in the second instruction information memory.

【0021】第8の発明に係る制御装置は、第6の発明
に係る制御装置において、特殊機能部が命令用情報メモ
リの代わりにシーケンスプログラムを格納し、CPU部
からアクセス可能なシーケンスプログラム格納メモリを
有し、上記CPU部にて解読した上記特殊機能部をアク
セスする命令に対応する上記シーケンスプログラムを上
記シーケンスプログラム格納メモリから読み出して実行
するものである。
A control device according to an eighth aspect of the present invention is the control device according to the sixth aspect, wherein the special function section stores a sequence program instead of the instruction information memory and is accessible from the CPU section. And reading the sequence program corresponding to the instruction to access the special function unit decoded by the CPU unit from the sequence program storage memory and executing the sequence program.

【0022】第9の発明に係る制御装置は、第7の発明
に係る制御装置において、特殊機能部が第1の命令用情
報メモリの代わりにシーケンスプログラムを格納し、C
PU部からアクセス可能な第1のシーケンスプログラム
格納メモリを有し、上記CPU部が第2の命令用情報メ
モリの代わりに上記第1のシーケンスプログラム格納メ
モリに格納されている上記シーケンスプログラムを転送
して格納する第2のシーケンスプログラム格納メモリを
有し、解読した上記特殊機能部をアクセスする命令に対
応する上記シーケンスプログラムを上記第2のシーケン
スプログラム格納メモリから読み出して実行するもので
ある。
According to a ninth aspect of the present invention, in the control device according to the seventh aspect, the special function section stores a sequence program instead of the first instruction information memory, and C
It has a first sequence program storage memory accessible from the PU unit, and the CPU unit transfers the sequence program stored in the first sequence program storage memory instead of the second instruction information memory. A second sequence program storage memory for storing is stored, and the sequence program corresponding to the decoded instruction to access the special function unit is read from the second sequence program storage memory and executed.

【0023】第10の発明に係る制御装置は、第6の発
明に係る制御装置において、特殊機能部が命令用情報メ
モリの代わりにマイコンプログラムを格納し、CPU部
からアクセス可能なマイコンプログラム格納メモリを有
し、上記CPU部にて解読した上記特殊機能部をアクセ
スする命令に対応する上記マイコンプログラムを上記マ
イコンプログラム格納メモリから読み出して実行するも
のである。
A control device according to a tenth aspect of the present invention is the control device according to the sixth aspect, wherein the special function section stores a microcomputer program instead of the instruction information memory and is accessible from the CPU section. And reads the microcomputer program corresponding to the instruction to access the special function unit decoded by the CPU unit from the microcomputer program storage memory and executes the program.

【0024】第11の発明に係る制御装置は、第7の発
明に係る制御装置において、特殊機能部が第1の命令用
情報メモリの代わりにマイコンプログラムを格納し、C
PU部からアクセス可能な第1のマイコンプログラム格
納メモリを有し、上記CPU部が第2の命令用情報メモ
リの代わりに上記第1のマイコンプログラム格納メモリ
に格納されている上記マイコンプログラムを転送して格
納する第2のマイコンプログラム格納メモリを有し、解
読した上記特殊機能部をアクセスする命令に対応する上
記マイコンスプログラムを上記第2のマイコンプログラム格
納メモリから読み出して実行するものである。
An eleventh aspect of the present invention is the control device according to the seventh aspect, wherein the special function section stores a microcomputer program instead of the first instruction information memory, and C
A first microcomputer program storage memory accessible from the PU unit is provided, and the CPU unit transfers the microcomputer program stored in the first microcomputer program storage memory instead of the second instruction information memory. A second microcomputer program storage memory for storing the stored microcomputer is stored, and the microcomputer program corresponding to the decoded instruction to access the special function unit is read from the second microcomputer program storage memory and executed.

【0025】[0025]

【作用】第1の発明においては、CPU部にて特殊機能
部対応命令であること及びその種別を表わす命令記号を
用いた命令ステップを有するプログラムが実行され、実
行中の上記命令ステップが特殊機能部対応命令であるこ
とを上記命令記号により判別され、上記命令ステップの
内容が対応する特殊機能部の多方向アクセスメモリへ格
納されると共に上記特殊機能部に対してその実行が要求
され、上記特殊機能部にて上記多方向アクセスメモリへ
格納された上記命令ステップの内容をメモリアドレスに
よらずに上記命令記号に基づいてアクセスし、実行され
る。
According to the first aspect of the present invention, the CPU unit executes the program having the instruction step using the instruction symbol corresponding to the special function portion corresponding instruction and its type, and the instruction step being executed has the special function. It is determined by the instruction symbol that the instruction is a section corresponding instruction, the content of the instruction step is stored in the multi-directional access memory of the corresponding special function section, and the special function section is requested to execute the instruction. The contents of the instruction step stored in the multi-directional access memory in the functional unit are accessed and executed based on the instruction symbol without depending on the memory address.

【0026】また、第2の発明においては、第1の発明
における命令ステップの命令記号が特殊機能部対応命令
を表わす第1の記号及び特殊機能種別を表わす第2の記
号からなり、実行中の上記命令ステップが上記特殊機能
部対応命令であることを上記第1の記号により判別さ
れ、上記特殊機能部にて上記多方向アクセスメモリへ格
納された上記命令情報の実行部分が上記第2の記号に基
づいてアクセスされ、命令が実行される。
Further, in the second invention, the instruction symbol of the instruction step in the first invention comprises the first symbol representing the special function unit corresponding instruction and the second symbol representing the special function type, which is being executed. It is determined by the first symbol that the instruction step is the instruction corresponding to the special function unit, and the execution portion of the instruction information stored in the multi-directional access memory by the special function unit is the second symbol. Is executed according to the instruction and the instruction is executed.

【0027】また、第3の発明においては、複数の特殊
機能部のそれぞれに対応する命令情報が対応する多方向
アクセスメモリに格納され、CPU部にて特殊機能部対
応命令であること及びその種別を表わす命令記号を用い
た命令ステップを有するプログラムが実行され、実行中
の上記命令ステップが上記特殊機能部対応命令であるこ
とを上記命令記号により判別され、対応する特殊機能部
の上記多方向アクセスメモリに格納された上記命令情報
がアクセスされ、上記命令情報と上記命令ステップの内
容とが一致したら上記特殊機能部に対して上記命令情報
の実行を要求され、上記特殊機能部にて上記多方向アク
セスメモリへ格納された上記命令情報の実行部分が上記
命令記号によりアクセスされて命令が実行される。
In the third invention, the instruction information corresponding to each of the plurality of special function units is stored in the corresponding multidirectional access memory, and the CPU unit identifies the special function unit corresponding instruction and its type. A program having an instruction step using an instruction symbol indicating is executed, and it is determined by the instruction symbol that the instruction step being executed is an instruction corresponding to the special function unit, and the multidirectional access of the corresponding special function unit is performed. When the instruction information stored in the memory is accessed and the instruction information and the content of the instruction step match, the special function unit is requested to execute the instruction information, and the special function unit performs the multidirectional operation. The execution portion of the instruction information stored in the access memory is accessed by the instruction symbol to execute the instruction.

【0028】また、第4の発明においては、第3の発明
における命令ステップの命令記号が特殊機能部対応命令
を表わす第1の記号及び特殊機能種別を表わす第2の記
号からなり、実行中の上記命令ステップが上記特殊機能
部対応命令であることを上記第1の記号により判別さ
れ、上記特殊機能部にて上記多方向アクセスメモリへ格
納された上記命令情報の実行部分を上記第2の記号に基
づいてアクセスされ、命令が実行される。
Further, in the fourth invention, the instruction symbol of the instruction step in the third invention comprises the first symbol representing the special function unit corresponding instruction and the second symbol representing the special function type, which is being executed. It is determined by the first symbol that the instruction step is the instruction corresponding to the special function unit, and the execution portion of the instruction information stored in the multi-directional access memory by the special function unit is the second symbol. Is executed according to the instruction and the instruction is executed.

【0029】第5の発明においては、CPU部の命令判
別手段は任意の命令名で入力されたプログラム中の命令
が特殊機能部をアクセスする命令であることを判別し、
命令実行手段は上記特殊機能部をアクセスする命令を解
読し、上記特殊機能部が有する上記特殊機能部をアクセ
スする命令用情報を格納し、上記CPU部及び特殊機能
部の両方からアクセス可能なメモリに格納された上記命
令用情報に基づいて上記解読した命令を実行し、上記特
殊機能部は上記CPU部からの指令により特殊制御を行
なう。
In the fifth invention, the instruction discriminating means of the CPU portion discriminates that the instruction in the program inputted with an arbitrary instruction name is an instruction to access the special function portion,
The instruction executing means decodes an instruction to access the special function unit, stores information for an instruction to access the special function unit included in the special function unit, and is a memory accessible from both the CPU unit and the special function unit. The decoded command is executed based on the command information stored in the CPU, and the special function unit performs special control according to a command from the CPU unit.

【0030】第6の発明においては、CPU部の命令実
行手段は任意の命令名で入力されたプログラム中の命令
のうちの特殊機能部をアクセスする命令を解読し、上記
特殊機能部が有する上記CPU部からアクセス可能な命
令用情報メモリに格納された命令用情報に基づいて上記
解読した命令を実行する。
In the sixth invention, the instruction executing means of the CPU section decodes the instruction for accessing the special function section among the instructions in the program inputted by an arbitrary instruction name, and the special function section has the above-mentioned. The decoded instruction is executed based on the instruction information stored in the instruction information memory accessible from the CPU unit.

【0031】第7の発明においては、CPU部のデータ
転送手段は特殊機能部が有する第1の命令用情報メモリ
に格納されている命令用情報を上記CPU部が有する第
2の命令用情報メモリに転送して格納し、命令実行手段
は任意の命令名で入力されたプログラム中の命令のうち
の特殊機能部をアクセスする命令を解読し、上記第2の
命令用情報メモリに格納された命令用情報に基づいて上
記解読した命令を実行する。
In the seventh invention, the data transfer means of the CPU section has the second command information memory which the CPU section has the command information stored in the first command information memory of the special function section. The instruction execution means decodes the instruction for accessing the special function part among the instructions in the program inputted with an arbitrary instruction name, and stores the instruction in the second instruction information memory. The decoded instruction is executed based on the usage information.

【0032】第8の発明においては、CPU部の命令実
行手段は任意の命令名で入力されたプログラム中の命令
のうちの特殊機能部をアクセスする命令を解読し、解読
した上記特殊機能部をアクセスする命令に対応するシー
ケンスプログラムを、上記特殊機能部が有する上記CP
U部からアクセス可能なシーケンスプログラム格納メモ
リから読み出して実行する。
In the eighth invention, the instruction executing means of the CPU section decodes the instruction for accessing the special function section among the instructions in the program inputted with an arbitrary instruction name, and the decoded special function section is executed. The CP having the sequence program corresponding to the instruction to be accessed, which is included in the special function unit.
It is executed by reading it from the sequence program storage memory accessible from the U section.

【0033】第9の発明においては、CPU部のデータ
転送手段は特殊機能部が有する第1のシーケンスプログ
ラム格納メモリに格納されているシーケンスプログラム
を上記CPU部が有する第2のシーケンスプログラム格
納メモリに転送して格納し、命令実行手段は任意の命令
名で入力されたプログラム中の命令のうちの特殊機能部
をアクセスする命令を解読し、解読した上記特殊機能部
をアクセスする命令に対応する上記シーケンスプログラ
ムを上記第2のシーケンスプログラム格納メモリから読
み出して実行する。
In the ninth invention, the data transfer means of the CPU section stores the sequence program stored in the first sequence program storage memory of the special function section in the second sequence program storage memory of the CPU section. The command executing means transfers and stores the command, and the command executing means decodes a command for accessing the special function part of the commands in the program inputted with an arbitrary command name, and corresponds to the command for accessing the decoded special function part. The sequence program is read from the second sequence program storage memory and executed.

【0034】第10の発明においては、CPU部の命令
実行手段は任意の命令名で入力されたプログラム中の命
令のうちの特殊機能部をアクセスする命令を解読し、解
読した上記特殊機能部をアクセスする命令に対応するマ
イコンプログラムを、上記特殊機能部が有する上記CP
U部からアクセス可能なマイコンプログラム格納メモリ
から読み出して実行する。
In the tenth aspect of the invention, the instruction executing means of the CPU section decodes the instruction for accessing the special function section among the instructions in the program inputted with an arbitrary instruction name, and the decoded special function section is executed. The CP having the special function unit has a microcomputer program corresponding to an instruction to be accessed.
The program is read from the microcomputer program storage memory accessible from the U section and executed.

【0035】第11の発明においては、CPU部のデー
タ転送手段は特殊機能部が有する第1のマイコンプログ
ラム格納メモリに格納されているマイコンプログラムを
上記CPU部が有する第2のマイコンプログラム格納メ
モリに転送して格納し、命令実行手段は任意の命令名で
入力されたプログラム中の命令のうちの特殊機能部をア
クセスする命令を解読し、解読した上記特殊機能部をア
クセスする命令に対応する上記マイコンプログラムを上
記第2のマイコンプログラム格納メモリから読み出して
実行する。
In the eleventh aspect, the data transfer means of the CPU section stores the microcomputer program stored in the first microcomputer program storage memory of the special function section in the second microcomputer program storage memory of the CPU section. The command executing means transfers and stores the command, and the command executing means decodes a command for accessing the special function part of the commands in the program inputted with an arbitrary command name, and corresponds to the command for accessing the decoded special function part. The microcomputer program is read from the second microcomputer program storage memory and executed.

【0036】[0036]

【実施例】【Example】

実施例1. 以下、第1の発明の一実施例を図について
説明する。制御装置としてのプログラマブルコントロー
ラの構成は従来例において説明した図7のものとほぼ同
一であり、改めて説明することを省略する。
Example 1. An embodiment of the first invention will be described below with reference to the drawings. The configuration of the programmable controller as the control device is almost the same as that of the conventional example shown in FIG. 7, and the description thereof will be omitted.

【0037】図1は、特殊機能ユニット対応命令7の形
式を示す図であり、Z_の後には任意の命令名を記述で
きることを示している。図において、71は特殊機能ユ
ニットの装着位置に対応する入出力NO、72は必要に
応じ記述する部分である。
FIG. 1 is a diagram showing the format of the special function unit corresponding instruction 7, and shows that an arbitrary instruction name can be described after Z_. In the figure, 71 is an input / output NO corresponding to the mounting position of the special function unit, and 72 is a portion described as necessary.

【0038】特殊機能ユニット対応命令7における命令
記号Z_・・・は特殊機能部対応命令であること及びそ
の種別を表わすものであり、特殊機能部対応命令である
ことを表わす第1の記号Z_と、特殊機能種別を表わす
第2の記号・・・(例えば1CH目にアナログ値を出力
する命令であれば上記・・・の部分にANALOG_1
の記号が記載される)から構成されている。
The instruction symbol Z _... in the special function unit corresponding instruction 7 indicates the special function corresponding instruction and its type, and is the first symbol Z_ indicating the special function corresponding instruction. , The second symbol indicating the special function type (for example, in the case of an instruction to output an analog value on the 1st channel, ANALOG_1
The symbol is written).

【0039】図2は、特殊機能ユニット対応命令の例で
ある。図において、7Aは入出力NO50の位置に装着
されているD/Aユニットの1CH目にデバイスD0の
内容をアナログ出力指令値として書き込む命令であり、
7Bは入出力NO50の位置に装着されている表示ユニ
ットの1行3列目にデバイスD0の内容を表わす命令で
ある。
FIG. 2 shows an example of a special function unit corresponding instruction. In the figure, 7A is a command for writing the contents of the device D0 as an analog output command value on the 1st CH of the D / A unit mounted at the position of input / output NO50,
Reference numeral 7B is an instruction indicating the contents of the device D0 at the 1st row and 3rd column of the display unit mounted at the position of the input / output NO50.

【0040】図3a〜eは、CPUユニット1/特殊機
能ユニット4Aの両方からアクセスできる2方向アクセ
スメモリとしての2ポートメモリ41の構成(内容)例
である。図において、41AAは特殊機能ユニットのメ
モリ構成の一般例であり、41BAは2CHD/Aユニ
ットや8CHD/Aユニットの1CH目にアナログ出力
を行なう時の、41CAは表示ユニットに誤ってアナロ
グ出力を指令した時の、41DAは表示ユニットの表示
位置を変更する時の、41EAは表示ユニットに表わす
時の、2ポートメモリ41の構成例である。
3A to 3E show examples of the structure (contents) of the 2-port memory 41 as a bidirectional access memory which can be accessed from both the CPU unit 1 / special function unit 4A. In the figure, 41AA is a general example of the memory structure of the special function unit, 41BA is the analog output to the 1CH of the 2CHD / A unit or the 8CHD / A unit, and 41CA is the display unit erroneously commanding the analog output. 41DA is a configuration example of the 2-port memory 41 when the display position of the display unit is changed, and 41EA when the display unit is displayed.

【0041】図4は図7に示したプログラマブルコント
ローラ及びプログラム装置の動作フローチャートであ
り、フローAはプログラム装置の2の、フローBはCP
Uユニット1の、フローCは特殊機能装置4Aの動作フ
ローを示す。
FIG. 4 is an operation flow chart of the programmable controller and the program device shown in FIG. 7. Flow A is the program device 2 and flow B is the CP.
The flow C of the U unit 1 shows the operation flow of the special function device 4A.

【0042】次に、動作について図4に示したフローチ
ャートにしたがって説明する。プログラム装置2でプロ
グラム作成を行なう時に、命令ステップの命令名の入力
の初めにZ_と入力されると、その後は特殊機能部4で
予め定義され、解読可能な任意の命令名の入力を受け付
け可能としておく。フローAにおいて、ステップ101
でプログラム装置2により図3に示す形式のプログラム
を作成し、ステップ102にてCPUユニット1のプロ
グラムメモリ11に通信ケーブル3を介して上記プログ
ラムを転送する。次に、フローBにおいて、CPUユニ
ット1はステップ111にて転送されたシーケンスプロ
グラムをプログラムメモリ11に格納し、ステップ11
2で最初のプログラムステップをアクセスして解読し、
ステップ113でその命令の命令名の先頭2文字がZ_
であれば特殊機能ユニット対応命令であると判別する。
特殊機能ユニット対応の命令でなければステップ118
にて通常のシーケンス処理を行なう。
Next, the operation will be described with reference to the flowchart shown in FIG. When a program is created by the programming device 2, if Z_ is entered at the beginning of the input of the instruction name of the instruction step, then the special function unit 4 can predefine and accept the input of any decipherable instruction name. I will keep it. Step 101 in Flow A
Then, the program device 2 creates a program of the format shown in FIG. 3, and transfers the program to the program memory 11 of the CPU unit 1 via the communication cable 3 in step 102. Next, in the flow B, the CPU unit 1 stores the sequence program transferred in step 111 in the program memory 11,
2 access and decrypt the first program step,
In step 113, the first two characters of the instruction name of the instruction are Z_
If so, it is determined that the instruction is for the special function unit.
If the command does not correspond to the special function unit, step 118
Perform normal sequence processing at.

【0043】次に、CPUユニット1はステップ11
4、115で特殊機能ユニット対応命令であると判別し
た命令およびその命令で指定されたデバイスメモリ12
にデータが格納されておればその内容をその命令で指定
された入出力NOの位置に装着された特殊機能ユニット
4A内の2ポートメモリ41に格納すると共に、ステッ
プ116で特殊機能ユニット4Aに実行指令としての割
り込をかける。この割り込みをフローCにおけるステッ
プ121にて特殊機能ユニット4Aが認識すると、特殊
機能ユニット4Aはステップ122で2ポートメモリ4
1に格納された上記特殊機能ユニット対応命令を読み込
み、この命令内容が該特殊機能ユニット4Aで定義され
た命令であるか調べ、そうでなければエラーとし、ステ
ップ127でエラー処理を行ない、エラーでなければス
テップ124でその命令を解読し、ステップ125で定
められた処理を実行する。このとき必要であれば、2ポ
ートメモリ41に格納されたデバイスデータ内容を用い
て実行する。
Next, the CPU unit 1 performs step 11
An instruction determined to be a special function unit corresponding instruction in 4 and 115 and the device memory 12 designated by the instruction
If the data is stored in, the contents are stored in the 2-port memory 41 in the special function unit 4A attached to the position of the input / output NO designated by the command, and executed in the special function unit 4A in step 116. Make an interrupt as a command. When the special function unit 4A recognizes this interrupt in step 121 of the flow C, the special function unit 4A determines in step 122 the 2-port memory 4
The instruction corresponding to the special function unit stored in 1 is read, and it is checked whether or not the content of this instruction is the instruction defined by the special function unit 4A. If not, an error occurs, and error processing is performed in step 127. If not, the instruction is decoded in step 124 and the processing defined in step 125 is executed. At this time, if necessary, the device data contents stored in the 2-port memory 41 are used for execution.

【0044】次に、ステップ126で特殊機能ユニット
4Aは正常に実行したか/エラーであったか等の情報及
びCPUユニット1に返すべきデータがあればそのデー
タを2ポートメモリ41に格納し、CPUユニット1に
より実行結果をアクセス可能とする。フローBにおける
ステップ117で、CPUユニット1は実行結果に基づ
き定められ処理を行い、次ステップ処理、即ちステップ
112へ戻り、次の命令の実行に移る。
Next, in step 126, the special function unit 4A stores information such as whether the special function unit 4A has executed normally / has an error, and if there is data to be returned to the CPU unit 1, the data is stored in the 2-port memory 41, and the CPU unit is stored. 1 makes the execution result accessible. At step 117 in the flow B, the CPU unit 1 performs a process determined based on the execution result, returns to the next step process, that is, step 112, and executes the next instruction.

【0045】定められた処理とは例えば、正常に実行し
た場合は無処理、エラーであった場合はエラー表示、C
PUユニット1に返すべきデータがあった場合は、デバ
イスメモリ12にそのデータを転送する等である。
The predetermined processing includes, for example, no processing when executed normally, error display when there is an error, and C
When there is data to be returned to the PU unit 1, the data is transferred to the device memory 12 or the like.

【0046】2CHD/Aユニット(デジタル/アナロ
グ変換機能を2つ持つ特殊機能ユニット)では、Z_A
NALOG_1が1CH目にアナログ値を出力する命
令、Z_ANALOG_2が2CH目にアナログ値を出
力する命令と定義されているものとする。同様に、8C
HD/Aユニット(デジタル/アナログ変換機能を8つ
持つ特殊機能ユニット)でも、Z_ANALOG_1及
びZ_ANALOG_2はそれぞれ1CH目に及び2C
H目にアナログ値を出力する命令と定義されているもの
とする。また、表示ユニットでは、LOCATEが表示
位置を指定する命令、PRINTが表わす命令と定義さ
れているものとする。
In the 2CHD / A unit (special function unit having two digital / analog conversion functions), Z_A
It is assumed that NALOG_1 is defined as an instruction to output an analog value on CH1 and Z_ANALOG_2 is defined as an instruction to output an analog value on CH2. Similarly, 8C
Even in the HD / A unit (special function unit having eight digital / analog conversion functions), Z_ANALOG_1 and Z_ANALOG_2 are on the 1st CH and 2C, respectively.
It is assumed that it is defined as an instruction for outputting an analog value to the Hth. Further, in the display unit, LOCATE is defined as a command for designating a display position and a command represented by PRINT.

【0047】上記において、入出力NO50の位置に2
CHD/Aユニット(デジタル/アナログ変換機能を2
つ持つ特殊機能ユニット)を装着し、1CH目にデバイ
スD0の内容に対応したアナログ値を出力したい場合の
プログラムについて考える。
In the above, 2 is placed at the position of input / output NO50.
CHD / A unit (digital / analog conversion function 2
Consider a program in the case of mounting a special function unit having two units and outputting an analog value corresponding to the contents of the device D0 on the 1st CH.

【0048】この場合、プログラムは図4に示したプロ
グラムステップ7Aとなる。ユーザは、プログラム装置
により、図3のプログラム7Aを作成し、CPUユニッ
ト1のプログラムメモリ11に通信ケーブル3を介して
プログラム7Aを書き込む。次に、実際にCPUユニッ
ト1がプログラムメモリ11に書かれたプログラム7A
を実行する時には、その命令の命令名の先頭2文字がZ
_であることを調べ、特殊機能ユニット対応命令である
と判別する。次に、CPUユニット1は、そのプログラ
ムおよびその命令で指定されたデバイスメモリ12のD
0の内容を、その命令で指定された入出力NO50の位
置に装着された2CHD/Aユニット内の2ポートメモ
リ41に格納すると共に2CHD/Aユニットに割り込
みをかける。この割り込みを2CHD/Aユニットが認
識すると、2CHD/Aユニットは、2ポートメモリ4
1に格納された前記特殊機能ユニット対応命令が2CH
D/Aユニットで定義された命令であるか調べ、1CH
目にデバイスメモリの内容をアナログ値として出力する
命令であると判断したら、前記2ポートメモリ41に格
納されたデバイスメモリ12のD0の内容に応じたアナ
ログ値を1CHに出力する。
In this case, the program is the program step 7A shown in FIG. The user creates the program 7A of FIG. 3 by the programming device and writes the program 7A in the program memory 11 of the CPU unit 1 via the communication cable 3. Next, the program 7A in which the CPU unit 1 is actually written in the program memory 11
, The first two characters of the instruction name of the instruction are Z
_ Is determined, and it is determined that the instruction is a special function unit compatible instruction. Next, the CPU unit 1 determines the D of the device memory 12 designated by the program and the instruction.
The contents of 0 are stored in the 2-port memory 41 in the 2CHD / A unit mounted at the position of the input / output NO50 designated by the command, and the 2CHD / A unit is interrupted. When the 2CHD / A unit recognizes this interrupt, the 2CHD / A unit recognizes the 2-port memory 4
The special function unit corresponding instruction stored in 1 is 2CH
Check if the command is defined by D / A unit, 1CH
When it is judged that the instruction is to output the content of the device memory as an analog value to the eye, an analog value corresponding to the content of D0 of the device memory 12 stored in the 2-port memory 41 is output to 1CH.

【0049】次に、例えば、入出力NO50の位置に8
CHD/Aユニット(デジタル/アナログ変換機能を8
つ持つ特殊機能ユニット)を装着し、1CH目にデバイ
スD0の内容に対応したアナログ値を出力したい場合の
プログラムについて考える。この場合も、前記同様にプ
ログラムは図3の命令eとなり命令の実行動作もまった
く同様になる。
Next, for example, at the position of input / output NO50, 8
CHD / A unit (8 digital / analog conversion functions
Consider a program in the case of mounting a special function unit having two units and outputting an analog value corresponding to the contents of the device D0 on the 1st CH. In this case as well, the program becomes the instruction e of FIG.

【0050】このように、同様な機能を持つ特殊機能ユ
ニット対応命令はZ_ANALOG_1と言う同じ命令
名となり、また、命令名を見て1CH目にアナログ値を
出力する命令であることも容易に判る。
As described above, the special function unit corresponding command having the same function has the same command name of Z_ANALOG_1, and it is also easily understood that the command name is output and the analog value is output to the first channel.

【0051】実施例2.次に、第3〜第5の発明の制御
装置及びその方法による一実施例を図について説明す
る。なお、プログラマブルコントローラの構成は従来例
および第1の発明で説明した図7のものとほぼ同一であ
り、改めて説明することを省略する。
Example 2. Next, an embodiment of the control device and method according to the third to fifth inventions will be described with reference to the drawings. The configuration of the programmable controller is almost the same as that of the conventional example and that of FIG. 7 described in the first aspect of the invention, and the description thereof will be omitted.

【0052】図5a〜dは、CPUユニット/特殊機能
ユニットの両方からアクセスできる2ポートメモリ41
の構成(特殊機能ユニット対応命令情報の内容)例であ
る。図において、41ABは特殊機能ユニットの一般例
である。メモリはバイト単位で示し、すべての特殊機能
ユニットをこのような形式で構成する。アドレス0には
コノユニット定義されている特殊機能ユニット対応命令
の総数4120が格納される。以後に各特殊機能ユニッ
ト対応命令の情報が格納される。この情報を1番目の命
令を例に説明する。アドレス1には一番目に定義された
特殊機能ユニット対応命令の命令名4121aが文字コ
ードで格納される。アドレス11には上記命令で定義さ
れるデバイスメモリの数4121bが、アドレス12に
は前記らデバイスメモリのしよう可能な種類4121c
がコードに変換されて格納される。アドレス13に読み
だし/書き込みの区分4121dを、アドレス14には
アクセスするバッファメモリの先頭アドレス4121e
を、アドレス15には前記バッファメモリの先頭アドレ
スから読みだし/書き込みする個数4121fを格納す
る。アドレス16には読みだし/書き込みするときにC
PUユニットが行なわなければならないハンドシェイク
信号とそのON/OFF状態4121gを、アドレス1
7には命令を実行できるかを示すフラグ4121hを格
納する。ひとつの命令の情報はこのように4121a〜
4121hを一組の命令情報4121として示され、以
下アドレス0に格納されて特殊機能ユニット対応命令の
総数分各命令に対する情報4122〜412nが格納さ
れる。
5a-d show a two-port memory 41 accessible by both the CPU unit / special function unit.
Is a configuration example (contents of special function unit corresponding command information). In the figure, 41AB is a general example of a special function unit. The memory is shown in bytes and all special function units are organized in this way. At address 0, the total number 4120 of special function unit corresponding instructions defined in the cono unit is stored. After that, information of each special function unit corresponding instruction is stored. This information will be described using the first instruction as an example. In the address 1, the instruction name 4121a of the special function unit corresponding instruction defined first is stored in the character code. At address 11, the number of device memories 4121b defined by the above instruction is set, and at address 12, the available type of device memory 4121c is set.
Is converted into a code and stored. The read / write section 4121d is stored in the address 13, and the start address 4121e of the buffer memory to be accessed is stored in the address 14.
In address 15, the number 4121f to be read / written from the top address of the buffer memory is stored. C when reading / writing to address 16
The handshake signal that the PU unit must perform and its ON / OFF state 4121g are set to the address 1
7 stores a flag 4121h indicating whether the instruction can be executed. Information of one command is 4121a ~
4121h is shown as a set of instruction information 4121, and information 4122 to 412n for each instruction is stored for the total number of special function unit corresponding instructions, which is stored at address 0 below.

【0053】以下、41BBは2CHD/Aユニットに
おける、41CBは8CHD/Aユニットにおける、4
1DBは表示ユニットにおける各メモリの構成例であ
る。
In the following, 41BB is in 2 CHD / A units, 41CB is in 8 CHD / A units, 4
1DB is a configuration example of each memory in the display unit.

【0054】図6は、第2の発明の方法を用いた実施例
において、特殊機能ユニット対応命令を実行する時のC
PUユニットの処理動作を示すフローチャート出ある。
FIG. 6 shows C when executing a special function unit corresponding instruction in the embodiment using the method of the second invention.
There is a flow chart showing the processing operation of the PU unit.

【0055】次に動作について説明する。図7に示した
プログラム装置2でプログラムを行う時、命令名の入力
の初めにZ_と入力されると、その後は任意の命令名の
入力を受け付け可能としておき、プログラム装置2によ
り図1に示すような形式のプログラムを作成し、CPU
ユニット1のプログラムメモリ11に通信ケーブル3を
介して前記プログラムを書き込む。次にCPUユニット
1はプログラムメモリ11に書かれたシーケンスプログ
ラムを実行するに際し、図6に示したフローチャートに
おけるステップ201でその命令の命令名の先頭2文字
がZ_であれば特殊機能ユニット対応命令であると判断
し、Z_以外の文字であればステップ2−8で通常の命
令の処理であるシーケンス処理を実行する。以上の動作
までは第1の発明の場合と同様である。以上の動作まで
は第1の発明の場合と同様である。
Next, the operation will be described. When the program device 2 shown in FIG. 7 executes a program, if Z_ is entered at the beginning of the input of the command name, the input of any command name can be accepted thereafter, and the program device 2 shows the command name shown in FIG. Create a program of the form like
The program is written in the program memory 11 of the unit 1 via the communication cable 3. Next, when the CPU unit 1 executes the sequence program written in the program memory 11, if the first two characters of the instruction name of the instruction are Z_ in step 201 in the flowchart shown in FIG. If it is determined that there is a character other than Z_, a sequence process which is a normal instruction process is executed in step 2-8. The above operation is similar to that of the first invention. The above operation is similar to that of the first invention.

【0056】次に、CPUユニット1は、ステップ20
3で特殊機能ユニット対応命令であると判別した命令が
その命令で指定された入出力noの位置に装着された特
殊機能ユニット4内の2ポートメモリ41に格納された
特殊機能ユニット対応命令情報からこのユニットに定義
された命令数4120を読みだし、その個数分の特殊機
能ユニット対応命令から文字コードが一致する命令を検
索し、ステップ203でこの命令がこの特殊機能ユニッ
トに定義されているかを調べる。一致する命令が見つか
らなかった場合、この命令名が特殊機能ユニット側で定
義されていないとみなしてエラーとしてステップ207
でエラー処理を行ない、見つかったら定義されていたと
みなして次の処理に移る。まず、ステップ204でその
命令を実行するのに必要な情報が定義されているか、つ
まり、命令の構成が正しいかを、前記特殊機能ユニット
対応命令情報にしたがって、例えばデバイスメモリの数
及び種類等を調べる。
Next, the CPU unit 1 executes step 20.
The instruction determined to be the special function unit corresponding instruction in 3 is based on the special function unit corresponding instruction information stored in the 2-port memory 41 in the special function unit 4 mounted at the input / output no position designated by the instruction. The number of instructions 4120 defined in this unit is read, and the instructions corresponding to the character code are retrieved from the instructions of the special function unit corresponding to that number, and it is checked in step 203 whether this instruction is defined in this special function unit. . If no matching instruction is found, it is considered that this instruction name is not defined on the special function unit side, and an error is determined in step 207.
Error processing is performed with, and if found, it is regarded as defined and moves to the next processing. First, in step 204, it is determined whether the information necessary for executing the instruction is defined, that is, whether the instruction structure is correct. For example, the number and type of device memories are determined according to the instruction information corresponding to the special function unit. Find out.

【0057】デバイスメモリの数はシーケンスプログラ
ムの図1の72で指定されるデバイスメモリの数を、デ
バイスメモリの種類はデバイスメモリの数で指定したデ
バイスメモリの使用可能なデバテイメモリの種類をF5
H、F6H等、コードで示している。命令の構成が正し
ければ、次にステップ205にて、実行可/否フラグで
この命令が実行できるかを調べ、実行可であればステッ
プ206で前記特殊機能ユニット対応命令情報の読みだ
し/書き込みの区別、読みだし/書き込み先頭アドレ
ス、読みだし/書き込み個数、ハンドシェイク信号、
(命令実行時ON/OFFしなければならないデバイス
メモリとそのON/OFF状態)等の情報にしたがって
処理を行なう。実行否の場合はエラーとなり、ステップ
207で所定のエラー処理を行なう。
The number of device memories is the number of device memories designated by 72 in FIG. 1 of the sequence program, and the type of device memory is the type of usable defect memory of the device memories designated by the number of device memories F5.
Codes such as H and F6H are shown. If the instruction structure is correct, then in step 205, it is checked whether this instruction can be executed by the execution enable / disable flag. If it is executable, in step 206, the read / write of the special function unit corresponding command information is executed. Discrimination, read / write start address, read / write number, handshake signal,
Processing is performed in accordance with information such as (device memory that must be turned ON / OFF when an instruction is executed and its ON / OFF state). If it is not executed, an error occurs, and predetermined error processing is performed in step 207.

【0058】この処理を正常に終了して、また、途中エ
ラーが発生した場合はエラー表示等のエラー処理をして
ステップ209でこの命令の処理を終了し、ステップ2
01に戻り、次の命令の実行に移る。
If this processing is completed normally, or if an error occurs on the way, error processing such as error display is performed, and the processing of this instruction is completed at step 209, and then step 2
Return to 01 to execute the next instruction.

【0059】第1の発明の方法による場合と同様に、こ
の第2の発明の方法による場合にもも、2CHD/Aユ
ニット(デジタル/アナログ変換機能を2つ持つ特殊機
能ユニット)では、Z_ANALOG_1が1CH目に
アナログ値を出力する命令、Z_ANALOG_2が2
CH目にアナログ値を出力する命令と定義されているも
のとする。同様に、8CHD/Aユニット(デジタル/
アナログ変換機能を8つ持つ特殊機能ユニット)では、
Z_ANALOG_1が1CH目にアナログ値を出力す
る命令、Z_ANALOG_2が2CH目にアナログ値
を出力する命令、・・・・Z_ANALOG_8が8C
H目にアナログ値を出力する命令と定義されているもの
とし、表示ユニットでは、LOCATEが表示位置を指
定する命令、PRINTが表示命令と定義されているも
のとする。
As in the case of the method of the first invention, also in the case of the method of the second invention, in the 2CHD / A unit (special function unit having two digital / analog conversion functions), Z_ANALOG_1 is Z_ANALOG_2 is an instruction to output an analog value on CH1
It is assumed that it is defined as an instruction to output an analog value on the CHth. Similarly, 8CHD / A unit (digital /
With a special function unit that has eight analog conversion functions,
Z_ANALOG_1 outputs an analog value on 1CH, Z_ANALOG_2 outputs an analog value on 2CH ... Z_ANALOG_8 is 8C
It is assumed that the H-th order is defined as a command for outputting an analog value, and in the display unit, LOCATE is defined as a command for designating a display position, and PRINT is defined as a display command.

【0060】この時、例えば、入出力NO50の位置に
2CHD/Aユニット(デジタル/アナログ変換機能を
2つ持つ特殊機能ユニット)を装着し、1CH目にデバ
イスD0の内容に対応したアナログ値を出力したい場合
のプログラムについて考える。この場合、プログラムは
図2に示したプログラムステップ7Aとなる。CPUユ
ニット1がプログラムメモリにおけるプログラムステッ
プ7Aを実行する時は、その命令の命令名の先頭2文字
がZ_であることを調べ、特殊機能ユニット対応命令で
あると判別する。
At this time, for example, a 2CHD / A unit (a special function unit having two digital / analog conversion functions) is mounted at the position of input / output NO50, and an analog value corresponding to the contents of the device D0 is output on the 1st CH. Think about the program if you want to. In this case, the program is the program step 7A shown in FIG. When the CPU unit 1 executes the program step 7A in the program memory, it checks that the first two characters of the instruction name of the instruction are Z_ and determines that it is a special function unit corresponding instruction.

【0061】次に、CPUユニット1は、その命令で指
定された入出力NO50の位置に装着された2CHD/
Aユニット内の2ポートメモリ41に格納された特殊機
能ユニット対応命令の数430を読みだす。このユニッ
トは4個の特殊機能ユニット対応命令が定義されている
ものとすると4個分の命令の文字コードを順次調べる。
個の場合、1CH目対応のメモリ情報は一番目にあるの
で、この一番目のメモリ情報、即ち、特殊機能ユニット
対応命令の情報に基づいて処理を行なう。
Next, the CPU unit 1 is mounted on the position of the input / output NO50 designated by the command, and 2CHD /
The number 430 of special function unit corresponding instructions stored in the 2-port memory 41 in the A unit is read. Assuming that four special function unit corresponding instructions are defined in this unit, the character codes of the four instructions are sequentially examined.
In the case of individual pieces, since the memory information corresponding to the 1st CH is the first, the processing is performed based on this first memory information, that is, the information of the special function unit corresponding instruction.

【0062】まず、この命令におけるデバイスメモリの
指定は1個あり、コードF5Hで示されるデバイスの種
類が指定されていることがわかるので、これをプログラ
ムメモリ11の命令のDCと比較し、正しいことがわか
る。次に、読みだし/書き込み区分、バッファメモリ先
頭アドレス、読みだし/書き込み個数、ハンドシェイク
信号(0=なし)からデバイスメモリ12のDCの内容
をバッファメモリのアドレス2に書き込む命令であると
判断し、実行可/否フラグ可(=0)によりこれを実行
し、特殊機能ユニットは2ポートメモリ42に格納され
たデバイスメモリ12のDCの内容に応じたアナログ値
を1CHに出力する。
First, it can be seen that there is one device memory designation in this instruction, and the device type indicated by the code F5H has been designated. Therefore, this is compared with the instruction DC in the program memory 11 and it is correct. I understand. Next, based on the read / write classification, the buffer memory start address, the read / write number, and the handshake signal (0 = none), it is determined that the instruction is to write the DC content of the device memory 12 to the address 2 of the buffer memory. The execution is enabled / disabled by the enable / disable flag (= 0), and the special function unit outputs an analog value corresponding to the DC content of the device memory 12 stored in the 2-port memory 42 to 1CH.

【0063】次に、例えば、入出力NO50の位置に8
CHD/Aユニット(デジタル/アナログ変換機能を8
つ持つ特殊機能ユニット)を装着し、1CHにデバイス
DCの内容に対応したアナログ値を出力したい場合のプ
ログラムについて考える。この場合も、プログラムは図
1のプログラムステップ7Aとなり、命令の実行動作も
まったく同様になる。
Next, for example, at the position of input / output NO50, 8
CHD / A unit (8 digital / analog conversion functions
Consider a program in the case where a special function unit (having two functions) is mounted and an analog value corresponding to the contents of the device DC is to be output to 1CH. In this case as well, the program is the program step 7A in FIG. 1, and the operation of executing the instruction is exactly the same.

【0064】このように、同様な機能を持つ特殊機能ユ
ニット対応命令は、Z_ANALOG_1と言う同じ命
令名となり、また命令名を見て1CH目にアナログ値を
出力する命令であることも容易に判る。
As described above, the special function unit corresponding command having the same function has the same command name as Z_ANALOG_1, and it is easily understood that the command name is output and the analog value is output to the first channel.

【0065】実施例3.以下、第6の発明の一実施例を
図8について説明する。図8において、1はプログラマ
ブルコントローラ全体を制御するCPUユニット、11
はシーケンスプログラムが格納されるプログラムメモ
リ、12はシーケンスプログラムで使われる、あるいは
演算結果のデータが格納されているデバイスメモリ、2
はプログラムメモリ11に格納するシーケンスプログラ
ムを作成するプログラム装置、3はCPUユニット1と
プログラム装置2を接続する通信ケーブル、4は入出力
ユニット、4Bは特殊機能ユニット、42はCPUユニ
ット1からアクセスでき、特殊命令用情報が格納されて
いる2ポートメモリ、45はバッファメモリである。
Example 3. An embodiment of the sixth invention will be described below with reference to FIG. In FIG. 8, 1 is a CPU unit for controlling the entire programmable controller, 11
Is a program memory in which the sequence program is stored, 12 is a device memory used in the sequence program, or data of operation results is stored, 2
Is a program device for creating a sequence program to be stored in the program memory 11, 3 is a communication cable connecting the CPU unit 1 and the program device 2, 4 is an input / output unit, 4B is a special function unit, and 42 is accessible from the CPU unit 1. , A 2-port memory storing special instruction information, and 45 a buffer memory.

【0066】CPUユニットからアクセスできるメモリ
42の構成(特殊命令用情報の内容)例は図5に示した実
施例2のもの構成例とほぼ同一である。即ち、図5にお
ける2ポートメモリ41の代わりに、図8においては特
殊命令用情報メモリとしての2ポートメモリ42とバッ
ファメモリ45とが備わり、2ポートメモリ42は特殊
命令用情報の格納専用に用いられている。
An example of the structure (contents of special command information) of the memory 42 accessible from the CPU unit is almost the same as the example of the structure of the second embodiment shown in FIG. That is, instead of the 2-port memory 41 in FIG. 5, a 2-port memory 42 as a special instruction information memory and a buffer memory 45 are provided in FIG. 8, and the 2-port memory 42 is used exclusively for storing special instruction information. Has been.

【0067】図3は、特殊命令10の形式であり、Z_
の後には任意の命令名を記述できることを示している。
図に於て、101は特殊機能ユニットの装着位置に対応
する入出力NO、102は必要に応じデバイスを記述す
る部分である。
FIG. 3 shows the format of the special instruction 10, Z_
It is shown that an arbitrary instruction name can be described after the.
In the figure, 101 is an input / output NO corresponding to the mounting position of the special function unit, and 102 is a part for describing the device as required.

【0068】特殊命令の形式は図1に示した例と同じで
ある。 又、特殊命令を実行するときのCPUユニット
1の処理を示す動作フロー図は図6に示した実施例2の
動作フロー図とほぼ同じである。
The format of the special instruction is the same as the example shown in FIG. An operation flow chart showing the processing of the CPU unit 1 when executing the special instruction is almost the same as the operation flow chart of the second embodiment shown in FIG.

【0069】以下、この実施例3の動作について具体的
に説明する。2CHD/Aユニット(デジタル/アナロ
グ変換機能を2つ持つ特殊機能ユニット)において、”
Z_ANALOG_1”が1CH目にアナログ値を出力
する命令、”Z_ANALOG_2”が2CH目にアナ
ログ値を出力する命令と定義されているものとする。
The operation of the third embodiment will be specifically described below. In the 2CHD / A unit (special function unit with two digital / analog conversion functions),
It is assumed that "Z_ANALOG_1" is defined as an instruction to output an analog value on 1CH and "Z_ANALOG_2" is defined as an instruction to output an analog value on 2CH.

【0070】同じように、8CHD/Aユニット(デジ
タル/アナログ変換機能を8つ持つ特殊機能ユニット)
において、”Z_ANALOG_1”が1CH目にアナ
ログ値を出力する命令、”Z_ANALOG_2”が2
CH目にアナログ値を出力する命令、・・・”Z_ANA
LOG_8”が8CH目にアナログ値を出力する命令と
定義されているものとする。また、表示ユニットで
は、”Z_LOCATE”が表示位置を指定する命
令、”Z_PRINT”が表示する命令と定義されてい
るものとする。
Similarly, 8CHD / A unit (special function unit having eight digital / analog conversion functions)
, "Z_ANALOG_1" is an instruction to output an analog value on CH1 and "Z_ANALOG_2" is 2
Command to output analog value to CH, ... "Z_ANA
It is assumed that LOG_8 "is defined as an instruction to output an analog value on the 8th CH. Further, in the display unit," Z_LOCATE "is defined as an instruction to specify a display position and" Z_PRINT "is defined as an instruction to be displayed. I shall.

【0071】この時、例えば、入出力NO50 の位置
に2CHD/Aユニット (デジタル/アナログ変換機能
を2つ持つ特殊機能ユニット)を装着し、1CH目にデ
バイスD0の内容に対応したアナログ値を出力したい場
合のプログラムについて考える。この場合、プログラム
は図2の命令7Aとなる。ユーザは、プログラム装置2
により、図2の命令7Aというプログラムを作成し、C
PUユニット1のプログラムメモリ11に通信ケーブル
3を介してそのプログラム7Aを書き込む。
At this time, for example, a 2CHD / A unit (a special function unit having two digital / analog conversion functions) is attached to the position of input / output NO50, and an analog value corresponding to the contents of the device D0 is output on the 1st CH. Think about the program if you want to. In this case, the program is instruction 7A in FIG. The user is the programming device 2
To create a program called instruction 7A in FIG.
The program 7A is written in the program memory 11 of the PU unit 1 via the communication cable 3.

【0072】次に、実際にCPUユニット1が、プログ
ラムメモリ11に書かれたプログラム7Aを実行する時
は、その命令の命令名の先頭2文字がZ_であることを
調べ、特殊命令であると判別する。次に、CPUユニッ
ト1は、その命令で指定された入出力NO50の位置に
装着された2CH D/Aユニット内のCPUユニッ
トからアクセスできるメモリ42に格納された特殊命令
について、図5bに示した特殊命令の数4130を読み
だす。このユニットには4個の特殊命令が定義されてい
るとわかるので、4個分の命令の文字コードを順次調べ
る。この場合一番目で命令名が一致するので、この一番
目の特殊命令の情報に基づいて処理を行なう。
Next, when the CPU unit 1 actually executes the program 7A written in the program memory 11, it checks that the first two characters of the instruction name of the instruction are Z_, and determines that it is a special instruction. Determine. Next, the CPU unit 1 shows the special instruction stored in the memory 42 accessible from the CPU unit in the 2CH D / A unit mounted at the position of the input / output NO50 designated by the instruction in FIG. 5b. The number of special instructions 4130 is read. Since it is known that four special instructions are defined in this unit, the character codes of the four instructions are sequentially examined. In this case, since the instruction names match at the first position, processing is performed based on the information of this first special instruction.

【0073】まず、この命令はデバテスメモリの指定は
1個であり、その種類はコードF5Hで示される種類が
指定できることがわかるので、これをプログラムメモリ
11の命令のD0と調べ正しいことがわかる。次に、読
みだし/書き込み区分、バッファメモリ先頭アドレス、
読みだし/書き込み個数、ハンドシェイク信号(0=な
し)からのデバイスメモリ12のD0内容をバッファメ
モリ45のアドレス2に書き込む命令であると判断し、
実行可/否フラグ(0=可)によりこれを実行し、デバ
テイメモリ12のD0の内容をバッファメモリ45のア
ドレス2に書き込む。特殊機能ユニットは従来通りバッ
ファメモリ45のアドレス2の内容に応じたアナログ値
を1CHに出力する。即ち、デバイスメモリ12のD0
の内容アナログ値を1CHに出力することになる。
First, since it is understood that this instruction has only one designation of the debates memory and the type indicated by the code F5H can be designated, this is checked as D0 of the instruction of the program memory 11 and it is understood that it is correct. Next, read / write classification, buffer memory start address,
Judged as the command to write the read / write number, the D0 content of the device memory 12 from the handshake signal (0 = none) to the address 2 of the buffer memory 45,
This is executed by the execution possible / impossible flag (0 = possible), and the content of D0 of the device memory 12 is written to the address 2 of the buffer memory 45. The special function unit outputs an analog value corresponding to the contents of the address 2 of the buffer memory 45 to 1CH as in the conventional case. That is, D0 of the device memory 12
The analog value will be output to 1CH.

【0074】次に、例えば、入出力NO50の位置に8
CH D/Aユニット(デジタル/アナログ変換機能を
8つ持つ特殊機能ユニット)を装着し、1CH目にデバ
イスD0の内容に対応したアナログ値を出力したい場合
のプログラムについて考える。この場合も、前記同様、
プログラムは図2の命令7Aとなり、命令の実行動作も
まったく同様になる。
Next, for example, at the position of input / output NO50, 8
Consider a program in which a CH D / A unit (special function unit having eight digital / analog conversion functions) is mounted and an analog value corresponding to the contents of the device D0 is output on the 1st CH. In this case as well,
The program is the instruction 7A in FIG. 2, and the instruction execution operation is also the same.

【0075】更に、例えば、入出力NO50の位置に表
示ユニットを装着し、1行3列目にデバテスD0の内容
に対応した文字を表示したい場合のプログラムについて
考える。この場合も、前記同様、プログラムは図2の命
令7Bとなり、命令の実行動作もまったく同様になる。
Further, let us consider a program for mounting a display unit at the position of input / output NO50 and displaying a character corresponding to the contents of the debates D0 at the 1st row and the 3rd column. In this case as well, the program becomes the instruction 7B of FIG. 2 as in the above case, and the operation of executing the instruction becomes exactly the same.

【0076】このように、同様な機能を持つ特殊命令
は、”Z_ANALOG_1”と言う同じ命令名とな
り、また命令名を見て1CH目にアナログ値を出力する
命令であることも容易に判る。また、同様な内部処理の
特殊命令でも、2CH D/Aユニットでは、”Z_A
NALOG_1”表示ユニットでは、、”Z_LOCA
TE”、”Z_PRINT”と機能が異なることも容易
に判る。
As described above, the special instruction having the same function has the same instruction name "Z_ANALOG_1", and it can be easily understood that the instruction name is used to output the analog value to the first channel. In addition, even in the case of the special instruction of the same internal processing, "Z_A
In the NALOG_1 display unit, "Z_LOCA
It is also easy to see that the functions are different from those of TE "and" Z_PRINT ".

【0077】実施例4.次に、以下、第5の発明の一実
施例を図について説明する。図9において、13は各特
殊機能ユニットそれぞれの特殊命令用情報を格納するた
めのメモリである。
Example 4. Next, an embodiment of the fifth invention will be described below with reference to the drawings. In FIG. 9, 13 is a memory for storing special command information of each special function unit.

【0078】図10は、各特殊機能ユニットそれぞれの
特殊命令用情報を格納するためのメモリ13の構成例で
ある。図に於て、131には入出力NO0に装着されて
いる特殊機能ユニットの特殊命令用情報メモリ41の内
容が格納される。132には入出力NO10に装着され
ている特殊機能ユニットの特殊命令用情報メモリ41の
内容が格納される。以下、同様である。
FIG. 10 shows an example of the structure of the memory 13 for storing the special command information of each special function unit. In the figure, 131 stores the contents of the special command information memory 41 of the special function unit attached to the input / output NO0. In 132, the contents of the special command information memory 41 of the special function unit attached to the input / output NO10 are stored. The same applies hereinafter.

【0079】図11は、シーケンスプログラムを実行す
る前に、予め、特殊機能ユニット内のメモリに格納され
た特殊命令用情報メモリの内容をCPUユニット内の前
記情報を格納するためのメモリ13に転送するときのC
PUユニットの処理を示す動作フロー図である。
In FIG. 11, before executing the sequence program, the contents of the special instruction information memory previously stored in the memory in the special function unit are transferred to the memory 13 in the CPU unit for storing the information. C when doing
It is an operation | movement flowchart which shows the process of a PU unit.

【0080】次に動作について説明する。プログラム装
置2でプログラムを行う時、命令名の入力の初めにZ_
と入力されると、その後は任意の命令名の入力を受け付
け可能としておく。こうしてプログラム装置2により図
1に示すような形式のプログラムを作成し、CPUユニ
ット1のプログラムメモリ11に通信ケーブル3を介し
て前記プログラムを書き込む。
Next, the operation will be described. When programming with the programming device 2, at the beginning of the input of the command name, Z_
After that, input of an arbitrary command name can be accepted. In this way, the program device 2 creates a program of the format shown in FIG. 1, and writes the program in the program memory 11 of the CPU unit 1 via the communication cable 3.

【0081】次に、CPUユニット1が、シーケンスプ
ログラムを実行する前に、予め、特殊機能ユニット内の
特殊命令用情報メモリ42に格納された特殊命令用情報
をCPUユニット内の前記情報を格納するためのメモリ
13に転送する。即ち、先頭のユニットから順に(ステ
ップ301)、最終のユニットまで(ステップ305)
以下の処理を行う。該当のユニットが特殊機能ユニット
であるかを調べる(ステップ302)。特殊機能ユニッ
トであれば、特殊命令定義されているかを調べる(ステ
ップ303)。定義されていれば、該当の特殊機能ユニ
ット内のメモリ42に格納された特殊命令用情報をCP
Uユニット内の前記メモリ13に転送する(ステップ3
04)。ステップ305で最終ユニットでなければ、次
のユニットへ進む(ステップ306)。
Next, before the CPU unit 1 executes the sequence program, the special instruction information stored in the special instruction information memory 42 in the special function unit in advance is stored in the information in the CPU unit. To the memory 13 for storing. That is, from the first unit to the last unit (step 301) to the last unit (step 305).
The following processing is performed. It is checked whether the corresponding unit is a special function unit (step 302). If it is a special function unit, it is checked whether a special instruction is defined (step 303). If defined, the special instruction information stored in the memory 42 in the corresponding special function unit is used as the CP.
Transfer to the memory 13 in the U unit (step 3)
04). If it is not the final unit in step 305, the process proceeds to the next unit (step 306).

【0082】次に、実際にCPUユニット1が、プログ
ラムメモリ11に書かれたシーケンスプログラムを実行
する。この時の処理は、第1の発明で説明した通りであ
る(図6の動作フロー図の通りである)。但し、第1の
発明では、該当の特殊機能ユニット内のメモリ42に格
納された特殊命令用情報に基づいて処理するとしたが、
この第7の発明では、予め、前記情報を格納しておいた
CPUユニット内のメモリ13の該当特殊命令用情報に
基づいて処理する点が異なる。つまり、一般に、特殊機
能ユニットのメモリ42よりもCPUユニット内のメモ
リ13の方がアクセススピードが数段高速なため、第7
の発明では、特殊命令の実行速度が高速である。
Next, the CPU unit 1 actually executes the sequence program written in the program memory 11. The processing at this time is as described in the first aspect of the invention (as shown in the operation flow chart of FIG. 6). However, in the first invention, the processing is performed based on the special command information stored in the memory 42 in the special function unit,
The seventh invention is different in that the processing is performed based on the information for the special command in the memory 13 in the CPU unit in which the information is stored in advance. That is, in general, the access speed of the memory 13 in the CPU unit is several steps higher than that of the memory 42 of the special function unit.
In the invention, the execution speed of the special instruction is high.

【0083】上記説明では、予め、特殊命令を持つ全て
の特殊機能ユニットのメモリ42の特殊命令用情報全て
を、CPU機能ユニットのメモリ13に転送するとした
が、メモリの節約と解読の高速のために、シーケンスプ
ログラム中で実際にプログラムされている特殊命令を検
索し、それに対応する該当の特殊機能ユニットのメモリ
42の該当する特殊命令用情報のみをCPUユニットの
メモリ13に転送するという方法でもよい。
In the above description, all the special instruction information in the memories 42 of all special function units having special instructions are transferred to the memory 13 of the CPU function unit in advance. In addition, a method of searching for a special instruction actually programmed in the sequence program and transferring only the corresponding special instruction information in the memory 42 of the corresponding special function unit corresponding thereto to the memory 13 of the CPU unit may be used. .

【0084】実施例5.次に、以下、第8の発明の一実
施例を図について説明する。図12において、43はC
PUユニットからアクセスでき、特殊命令用シーケンス
プログラムが格納されているメモリである。
Example 5. Next, an embodiment of the eighth invention will be described below with reference to the drawings. In FIG. 12, 43 is C
It is a memory that can be accessed from the PU unit and that stores a sequence program for special instructions.

【0085】図13は、CPUユニットからアクセスで
きるメモリ42の構成(特殊命令用シーケンスメモリの
内容)例である。図に於て、(a)は特殊機能ユニット
の前記メモリ43の一般例である。特殊機能ユニットの
前記メモリ43は、このような形式で構成されている。
43aはこのユニットに定義されている特殊命令の総数
が格納される部分。以降に各特殊命令の命令名とシーケ
ンスプログラムが格納される部分がある。この情報を1
番目の命令を例に説明する。431aは一番目に定義さ
れた特殊命令の命令名が文字コードで格納されている部
分、431bはこの命令に対応するシーケンスプログラ
ムが格納されている部分である。ひとつの命令の情報は
このように431aと431bを一組として構成されさ
れ(431と略す)、以下432・・・43nとアドレ
ス0に格納された特殊命令の総数分格納されている。
(b)は2CHD/Aユニットの、(c)は8CHD/
Aユニットの、(d)は表示ユニットの、各メモリの構
成例である。
FIG. 13 shows an example of the configuration of the memory 42 accessible by the CPU unit (contents of the special instruction sequence memory). In the figure, (a) is a general example of the memory 43 of the special function unit. The memory 43 of the special function unit is configured in this way.
43a is a portion for storing the total number of special instructions defined in this unit. After that, there is a portion where the instruction name of each special instruction and the sequence program are stored. This information 1
The second instruction will be described as an example. Reference numeral 431a is a portion in which the instruction name of the special instruction defined first is stored in a character code, and 431b is a portion in which the sequence program corresponding to this instruction is stored. The information of one instruction is thus configured as a set of 431a and 431b (abbreviated as 431), and is stored below 432 ... 43n and the total number of special instructions stored at address 0.
(B) of 2CHD / A unit, (c) of 8CHD / A unit
In the unit A, (d) is a configuration example of each memory of the display unit.

【0086】図14は、前記メモリ43に格納されてい
る特殊命令に対応するシーケンスプログラムの例であ
る。図に於て、81は2CH D/Aユニットの特殊命
令”Z_ANALOG_1”に対応するシーケンスプロ
グラムおよび表示ユニットの特殊命令”Z_PRIN
T”に対応するシーケンスプログラムの例である。82
は8CH D/Aユニットの特殊命令”Z_ANALO
G_1”に対応するシーケンスプログラムの例である。
83は8CH D/Aユニットの特殊命令”Z_ANA
LOG”に対応するシーケンスプログラムの例である。
FIG. 14 shows an example of the sequence program corresponding to the special instruction stored in the memory 43. In the figure, 81 is a sequence command corresponding to the special instruction "Z_ANALOG_1" of the 2CH D / A unit and the special instruction "Z_PRIN of the display unit".
This is an example of a sequence program corresponding to T ″.
Is a special command "Z_ANALO" of 8CH D / A unit.
It is an example of a sequence program corresponding to G_1 ".
83 is a special command "Z_ANA" of 8CH D / A unit.
It is an example of a sequence program corresponding to LOG ".

【0087】図15は、特殊命令を実行するときのCP
Uユニットの処理を示す動作フロー図である。 次に動
作について説明する。プログラム装置2でプログラムを
行う時、命令名の入力の初めにZ_と入力されると、そ
の後は任意の命令名の入力を受け付け可能としておく。
こうしてプログラム装置2により図1に示すような形式
のプログラムを作成し、CPUユニット1のプログラム
メモリ11に通信ケーブル3を介して前記プログラムを
書き込む。
FIG. 15 shows a CP when executing a special instruction.
It is an operation | movement flowchart which shows the process of U unit. Next, the operation will be described. When programming is performed by the programming device 2, if Z_ is input at the beginning of the input of a command name, the input of any command name can be accepted thereafter.
In this way, the program device 2 creates a program of the format shown in FIG. 1, and writes the program in the program memory 11 of the CPU unit 1 via the communication cable 3.

【0088】次に、実際にCPUユニット1が、プログ
ラムメモリ11に書かれたシーケンスプログラムを実行
する。この時の処理を図15の動作フロー図に示す。ま
ず、その命令の命令名の先頭2文字がZ_であれば特殊
命令であると判別する(ステップ501)。Z_以外の
文字であれば通常の命令の処理をする(ステップ50
8)。次に、CPUユニット1は、特殊命令であると判
別した命令が、その命令で指定された入出力NOの位置
に装着された特殊機能ユニット4内のCPUユニットか
らアクセスできるメモリ43に格納された特殊命令の数
43aからこのユニットに定義された命令数を読みだし
(ステップ502)、その個数分の特殊命令から文字コ
ードが一致する命令を検索し、この命令がこの特殊機能
ユニットに定義されているかを調べる(ステップ50
3)。
Next, the CPU unit 1 actually executes the sequence program written in the program memory 11. The processing at this time is shown in the operation flow chart of FIG. First, if the first two characters of the instruction name of the instruction are Z_, it is determined to be a special instruction (step 501). If it is a character other than Z_, a normal instruction is processed (step 50).
8). Next, in the CPU unit 1, the command determined to be the special command is stored in the memory 43 accessible from the CPU unit in the special function unit 4 mounted at the input / output NO position designated by the command. The number of instructions defined in this unit is read from the number of special instructions 43a (step 502), and the instructions with the same character code are searched from the number of special instructions, and this instruction is defined in this special function unit. Check if there is any (step 50)
3).

【0089】一致する命令が見つからなかった場合、こ
の命令名が特殊機能ユニット側で定義されていないとみ
なしてエラーとし(ステップ506)、見つかったら定
義されていたとみなしてCPUユニット1は、次の処理
に移る。まず、その命令で指定されたデバイスの内容を
専用デバイスA(A0,A1,A2・・・)にセットす
る(ステップ504)。次に、その命令に対応する特殊
命令用シーケンスプログラムを実行する(ステップ50
5)。この処理を正常に終了して、また、途中エラーが
発生した場合はエラー表示等、エラー処理をして(ステ
ップ506)、この命令の処理を終了し、次の命令の実
行に移る。
If a matching instruction is not found, it is regarded as an error because this instruction name is not defined on the special function unit side (step 506), and if found, it is regarded as being defined and the CPU unit 1 Move on to processing. First, the contents of the device designated by the command are set in the dedicated device A (A0, A1, A2 ...) (step 504). Next, the special instruction sequence program corresponding to the instruction is executed (step 50).
5). If this process ends normally, or if an error occurs on the way, error processing such as error display is performed (step 506), the process of this command ends, and the process moves to the execution of the next command.

【0090】以下、具体的に説明する。 2CH D/
Aユニット(デジタル/アナログ変換機能を2つ持つ特
殊機能ユニット)において、Z_ANALOG_1が1
CH目にアナログ値を出力する命令、Z_NALOG_
2が2CH目にアナログ値を出力する命令と定義されて
いるものとする。同じように、8CHD/Aユニット
(デジタル/アナログ変換機能を8つ持つ特殊機能ユニ
ット)において、Z_ANALOG_1が1CH目にア
ナログ値を出力する命令、Z_ANALOG_2が2C
H目にアナログ値を出力する命令、・・・Z_ANAL
OG_8が8CH目にアナログ値を出力する命令、Z_
ANALOGが指定CH目にアナログ値を出力する命令
と定義されているものとする。また、表示ユニットで
は、Z_LOCATEが表示位置を指定する命令、Z_
PRINTが表示する命令と定義されているものとす
る。
A detailed description will be given below. 2CH D /
In the A unit (special function unit having two digital / analog conversion functions), Z_ANALOG_1 is 1
Z_NALOG_ command to output analog value to CH
It is assumed that 2 is defined as an instruction to output an analog value on the 2nd CH. Similarly, in the 8CH D / A unit (special function unit having eight digital / analog conversion functions), Z_ANALOG_1 outputs an analog value to the 1st CH, and Z_ANALOG_2 outputs 2C.
A command to output an analog value to the Hth ... Z_ANAL
OG_8 command to output analog value on CH8, Z_
It is assumed that ANALOG is defined as an instruction to output an analog value to the designated CH. Further, in the display unit, Z_LOCATE is an instruction to specify the display position, Z_LOCATE.
It is assumed that it is defined as an instruction displayed by PRINT.

【0091】この時、例えば、入出力NO50の位置に
2CH D/Aユニット(デジタル/アナログ変換機能
を2つ持つ特殊機能ユニット)を装着し、1CH目にデ
バイスD0の内容に対応したアナログ値を出力したい場
合のプログラムについて考える。この場合、プログラム
は図4の命令11となる。ユーザは、プログラム装置2
により、図2の命令7Aというプログラムを作成し、C
PUユニット1のプログラムメモリ11に通信ケーブル
3を介してそのプログラム7Aを書き込む。
At this time, for example, a 2CH D / A unit (a special function unit having two digital / analog conversion functions) is attached to the position of input / output NO50, and an analog value corresponding to the contents of the device D0 is set on the 1st CH. Consider a program that you want to output. In this case, the program is instruction 11 in FIG. The user is the programming device 2
To create a program called instruction 7A in FIG.
The program 7A is written in the program memory 11 of the PU unit 1 via the communication cable 3.

【0092】次に、実際にCPUユニット1が、プログ
ラムメモリ11に書かれたプログラム7Aを実行する時
は、その命令の命令名の先頭2文字がZ_であることを
調べ、特殊命令であると判別する。次に、CPUユニッ
ト1は、その命令で指定された入出力NO50の位置に
装着された2CHD/Aユニット内のCPUユニットか
らアクセスできるメモリ43に格納された特殊命令の数
43bを読みだす。このユニットには4個の特殊命令が
定義されているとわかるので、4個分の命令の文字コー
ドを順次調べる。この場合一番目で命令名が一致する。
次に、この命令で指定された入出力NO50をA0に、
デバイスメモリ12のD0の内容をA1に格納する。そ
の後、この命令に対応するシーケンスプログラム81を
実行する。この命令は、A0に50が、A1にD0の内
容が格納されているのでので、即ち、デバイスメモリ1
2のD0の内容に応じたアナログ値を入出力NO50の
位置に装着された2CHD/Aユニットの1CHに出力
することになる。
Next, when the CPU unit 1 actually executes the program 7A written in the program memory 11, it checks that the first two characters of the instruction name of the instruction are Z_, and determines that it is a special instruction. Determine. Next, the CPU unit 1 reads out the number 43b of special instructions stored in the memory 43 which can be accessed from the CPU unit in the 2CHD / A unit mounted at the position of the input / output NO50 designated by the instruction. Since it is known that four special instructions are defined in this unit, the character codes of the four instructions are sequentially examined. In this case, the instruction names match at the first position.
Next, set the input / output NO50 specified by this command to A0,
The contents of D0 of the device memory 12 are stored in A1. After that, the sequence program 81 corresponding to this instruction is executed. Since this command stores the contents of 50 in A0 and the contents of D0 in A1, that is, the device memory 1
An analog value corresponding to the content of D0 of 2 will be output to 1CH of the 2CH D / A unit mounted at the position of the input / output NO50.

【0093】次に、例えば、入出力NO50の位置に8
CH D/Aユニット(デジタル/アナログ変換機能を
8つ持つ特殊機能ユニット)を装着し、1CH目にデバ
イスD0の内容に対応したアナログ値を出力したい場合
のプログラムについて考える。この場合も、前記同様、
プログラムは図2の命令71となり、命令の実行動作も
まったく同様になる。即ち、この命令に対応するシーケ
ンスプログラム82を実行することになる。
Next, for example, at the position of input / output NO50, 8
Consider a program in which a CH D / A unit (special function unit having eight digital / analog conversion functions) is mounted and an analog value corresponding to the contents of the device D0 is output on the 1st CH. In this case as well,
The program becomes the instruction 71 in FIG. 2, and the operation of executing the instruction becomes exactly the same. That is, the sequence program 82 corresponding to this instruction is executed.

【0094】更に、例えば、入出力NO50の位置に表
示ユニットを装着し、1行3列目にデバイスD0の内容
に対応した文字を表示したい場合のプログラムについて
考える。この場合も、前記同様、プログラムは図2の命
令7Bとなり、命令の実行動作もまったく同様になる。
Further, let us consider a program in which a display unit is mounted at the position of input / output NO50 and a character corresponding to the contents of the device D0 is displayed at the first row and third column. In this case as well, the program becomes the instruction 7B of FIG. 2 as in the above case, and the operation of executing the instruction becomes exactly the same.

【0095】このように、同様な機能を持つ特殊命令
は、”Z_ANALOG_1”と言う同じ命令名とな
り、また命令名を見て1CH目にアナログ値を出力する
命令であることも容易に判る。また、同様な内部処理の
特殊命令でも、2CH D/Aユニットでは”Z_AN
ALOG_1”、表示ユニットでは、”Z_LOCAT
E”、”Z_PRINT”と機能が異なることも容易に
判る。
As described above, the special instruction having the same function has the same instruction name "Z_ANALOG_1", and it can be easily understood that it is an instruction to output the analog value on the 1st CH by looking at the instruction name. In addition, even if a special instruction for the same internal processing is used, "Z_AN" is used in the 2CH D / A unit.
ALOG_1 ", in the display unit," Z_LOCAT
It is also easy to see that the functions are different from E "and" Z_PRINT ".

【0096】更に、例えば、入出力NO50の位置に8
CH D/Aユニット(デジタル/アナログ変換機能を
8つ持つ特殊機能ユニット)を装着し、1CH目にデバ
イスD0の内容に対応したアナログ値を出力したい場合
のプログラムについて考える。この場合、プログラムは
図4の命令7Cとなる。ユーザは、プログラム装置2に
より、図2の命令7Cというプログラムを作成し、CP
Uユニット1のプログラムメモリ11に通信ケーブル3
を介してそのプログラム7Cを書き込む。
Further, for example, 8 at the position of input / output NO50.
Consider a program in which a CH D / A unit (special function unit having eight digital / analog conversion functions) is mounted and an analog value corresponding to the contents of the device D0 is output on the 1st CH. In this case, the program is instruction 7C in FIG. The user uses the programming device 2 to create a program called command 7C in FIG.
Communication cable 3 in the program memory 11 of U unit 1
The program 7C is written via.

【0097】次に、実際にCPUユニット1が、プログ
ラムメモリ11に書かれたプログラム7Cを実行する時
は、その命令の命令名の先頭2文字がZ_であることを
調べ、特殊命令であると判別する。次に、CPUユニッ
ト1は、その命令で指定された入出力NO50の位置に
装着された2CH D/Aユニット内のCPUユニッ
トからアクセスできるメモリ43に格納された特殊命令
の数43dを読みだす。このユニットには4個の特殊命
令が定義されているとわかるので、4個分の命令の文字
コードを順次調べる。この場合9番目で命令名が一致す
る。
Next, when the CPU unit 1 actually executes the program 7C written in the program memory 11, it checks that the first two characters of the instruction name of the instruction are Z_, and determines that it is a special instruction. Determine. Next, the CPU unit 1 reads out the number 43d of special instructions stored in the memory 43 which can be accessed from the CPU unit in the 2CH D / A unit mounted at the position of the input / output NO50 designated by the instruction. Since it is known that four special instructions are defined in this unit, the character codes of the four instructions are sequentially examined. In this case, the command name matches at the 9th position.

【0098】次に、この命令で指定された入出力NO5
0をA0に、CH番号3をA1に、デバイスメモリ12
のD0の内容をA2に格納する。その後、この命令に対
応するシーケンスプログラム16を実行する。この命令
では、A0に50が、A1に3が、A2にD0の内容が
格納されているのでので、”=A1 3”が成立し、”
TOA010A21”が実行され、バッファメモリ44
のアドレス10にA2の内容が書き込まれる。即ち、デ
バイスメモリ12のD0の内容に応じたアナログ値を入
出力NO50の位置に装着された2CHD/Aユニット
の3CHに出力することになる。
Next, the input / output NO5 designated by this command
0 to A0, CH number 3 to A1, device memory 12
Store the contents of D0 in A2. After that, the sequence program 16 corresponding to this instruction is executed. In this instruction, 50 is stored in A0, 3 is stored in A1, and the content of D0 is stored in A2. Therefore, “= A1 3” is satisfied, and “
TOA010A21 ”is executed and the buffer memory 44
The contents of A2 are written in the address 10 of. That is, the analog value corresponding to the content of D0 of the device memory 12 is output to the 3CH of the 2CH D / A unit mounted at the position of the input / output NO50.

【0099】このように、特殊命令の動作をシームンス
プログラムで自由に記述しているため、複雑な機能を”
Z_ANALOG”という1つの特殊命令で実現でき
る。また、”Z_ANALOG”という命令名を見て指
定CH目にアナログ値を出力する命令であることも容易
に判る。
As described above, since the operation of the special instruction is freely described in the seamless program, the complicated function is not required.
It can be realized by one special instruction "Z_ANALOG". Also, it is easy to understand that the instruction name "Z_ANALOG" outputs an analog value to the designated CH.

【0100】実施例6.次に、以下、第9の発明の一実
施例を図について説明する。図16において、14は各
特殊機能ユニットそれぞれの特殊命令用シーケンスプロ
グラムを格納するためのメモリである。
Example 6. Next, an embodiment of the ninth invention will be described below with reference to the drawings. In FIG. 16, 14 is a memory for storing the special instruction sequence program of each special function unit.

【0101】図17は、各特殊機能ユニットそれぞれの
特殊命令用シーケンスプログラムを格納するためのメモ
リ14の構成例である。図に於て、141には入出力N
O0に装着されている特殊機能ユニットの特殊命令用シ
ーケンスメモリ43の内容が格納される。142には入
出力NO10に装着されている特殊機能ユニットの特殊
命令用シーケンスメモリ43の内容が格納される。以
下、同様である。
FIG. 17 is a structural example of the memory 14 for storing the special instruction sequence program of each special function unit. In the figure, 141 is an input / output N
The contents of the special command sequence memory 43 of the special function unit attached to O0 are stored. The content of the special command sequence memory 43 of the special function unit attached to the input / output NO10 is stored in 142. The same applies hereinafter.

【0102】図18は、シーケンスプログラムを実行す
る前に、予め、特殊機能ユニット内のメモリに格納され
た特殊命令用シーケンスメモリ43の内容をCPUユニ
ット内の前記内容を格納するためのメモリ14に転送す
るときのCPUユニットの処理を示す動作フロー図であ
る。
In FIG. 18, before executing the sequence program, the contents of the special instruction sequence memory 43 stored in the memory of the special function unit in advance are stored in the memory 14 for storing the contents in the CPU unit. It is an operation | movement flowchart which shows the process of a CPU unit at the time of transfer.

【0103】次に動作について説明する。プログラム装
置2でプログラムを行う時、命令名の入力の初めにZ_
と入力されると、その後は任意の命令名の入力を受け付
け可能としておく。こうしてプログラム装置2により図
1に示すような形式のプログラムを作成し、CPUユニ
ット1のプログラムメモリ11に通信ケーブル3を介し
て前記プログラムを書き込む。
Next, the operation will be described. When programming with the programming device 2, at the beginning of the input of the command name, Z_
After that, input of an arbitrary command name can be accepted. In this way, the program device 2 creates a program of the format shown in FIG. 1, and writes the program in the program memory 11 of the CPU unit 1 via the communication cable 3.

【0104】次に、CPUユニット1が、シーケンスプ
ログラムを実行する前に、予め、特殊機能ユニット内の
特殊命令用シーケンスメモリ42に格納された特殊命令
用シーケンスプログラム等をCPUユニット内の前記内
容を格納するためのメモリ14に転送する。即ち、先頭
のユニットから順に(ステップ601)、最終のユニッ
トまで(ステップ605)以下の処理を行う。該当のユ
ニットが特殊機能ユニットであるかを調べる(ステップ
602)。特殊機能ユニットであれば、特殊命令定義さ
れているかを調べる(ステップ603)。定義されてい
れば、該当の特殊機能ユニット内のメモリ42に格納さ
れた特殊命令用シーケンスプログラム等をCPUユニッ
ト内の前記メモリ14に転送する(ステップ604)。
ステップ605で最終ユニットでなければ、次のユニッ
トへ進む(ステップ606)。
Next, before the CPU unit 1 executes the sequence program, the special instruction sequence program or the like previously stored in the special instruction sequence memory 42 in the special function unit is loaded into the contents in the CPU unit. Transfer to memory 14 for storage. That is, the following processes are performed in order from the first unit (step 601) to the last unit (step 605). It is checked whether the corresponding unit is a special function unit (step 602). If it is a special function unit, it is checked whether a special instruction is defined (step 603). If it is defined, the special instruction sequence program or the like stored in the memory 42 in the corresponding special function unit is transferred to the memory 14 in the CPU unit (step 604).
If it is not the final unit in step 605, the process proceeds to the next unit (step 606).

【0105】次に、実際にCPUユニット1が、プログ
ラムメモリ11に書かれたシーケンスプログラムを実行
する。この時の処理は、第8の発明で説明した通りであ
る(図15の動作フロー図の通りである)。但し、第8
の発明では、該当の特殊機能ユニット内のメモリ43に
格納された特殊命令用シーケンスプログラムに基づいて
処理するとしたが、本第9の発明では、予め、前記情報
を格納しておいたCPUユニット内のメモリ14の該当
特殊命令用シーケンスプログラムに基づいて処理する点
が異なる。つまり、一般に、特殊機能ユニットのメモリ
43よりもCPUユニット内のメモリ14の方がアクセ
ススピードが数段高速なため、本第9の発明では、特殊
命令の実行速度が高速である。
Next, the CPU unit 1 actually executes the sequence program written in the program memory 11. The processing at this time is as described in the eighth aspect of the invention (as shown in the operation flow chart of FIG. 15). However, the 8th
In the invention, the processing is performed based on the special instruction sequence program stored in the memory 43 in the corresponding special function unit. However, in the ninth invention, the processing is performed in the CPU unit in which the information is stored in advance. The difference is that processing is performed based on the sequence program for the corresponding special instruction in the memory 14 of FIG. That is, in general, the memory 14 in the CPU unit has an access speed several steps faster than the memory 43 in the special function unit. Therefore, in the ninth aspect of the invention, the execution speed of the special instruction is high.

【0106】また、上記説明では、予め、特殊命令を持
つ全ての特殊機能ユニットのメモリ42の特殊命令用シ
ーケンスプログラム全てを、CPU機能ユニットのメモ
リ14に転送するとしたが、メモリの節約と解読の高速
のために、シーケンスプログラム中で実際にプログラム
されている特殊命令を検索し、それに対応する該当の特
殊機能ユニットのメモリ43の該当する特殊命令用シー
ケンスプログラムのみをCPUユニットのメモリ14に
転送するという方法でもよい。
In the above description, all the special instruction sequence programs in the memories 42 of all special function units having special instructions are transferred to the memory 14 of the CPU function unit in advance. For high speed, the special instruction actually programmed in the sequence program is searched, and only the corresponding special instruction sequence program in the memory 43 of the corresponding special function unit corresponding thereto is transferred to the memory 14 of the CPU unit. You can use this method.

【0107】実施例7.次に、以下、第10の発明の一
実施例を図について説明する。図19において、44は
CPUユニットからアクセスでき、特殊命令用マイコン
プログラムが格納されているメモリである。
Example 7. Next, an embodiment of the tenth invention will be described below with reference to the drawings. In FIG. 19, reference numeral 44 denotes a memory which can be accessed from the CPU unit and which stores a special instruction microcomputer program.

【0108】即ち、第8の発明の実施例5における特殊
命令用シーケンスプログラムを特殊命令用マイコンプロ
グラムに置き換えたものである。通常、CPUユニット
には、制御を司るマイクロプロセッサが搭載されてお
り、前記マイクロプロセッサの機械語で構成されたプロ
グラムをマイコンプログラムと呼ぶ。動作も、第3の発
明における特殊命令用シーケンスプログラムの代わり
に、特殊命令用マイコンプログラムを実行するものであ
る。動作は第8の発明の実施例5とほぼ同様である。
That is, the special instruction sequence program in the fifth embodiment of the eighth invention is replaced with a special instruction microcomputer program. Usually, the CPU unit is equipped with a microprocessor for controlling, and a program constituted by the machine language of the microprocessor is called a microcomputer program. The operation is also to execute the special instruction microcomputer program in place of the special instruction sequence program in the third invention. The operation is almost the same as in the fifth embodiment of the eighth invention.

【0109】実施例8.次に、以下、第11の発明の一
実施例を図について説明する。図20において、15は
各特殊機能ユニットそれぞれの特殊命令用マイコンプロ
グラムを格納するためのメモリである。
Example 8. Next, an embodiment of the eleventh invention will be described below with reference to the drawings. In FIG. 20, reference numeral 15 is a memory for storing a special instruction microcomputer program for each special function unit.

【0110】即ち、第9の発明の実施例6における特殊
命令用シーケンスプログラムを特殊命令用マイコンプロ
グラムに置き換えたものである。通常、CPUユニット
には、制御を司るマイクロプロセッサが搭載されてお
り、前記マイクロプロセッサの機械語で構成されたプロ
グラムをマイコンプログラムと呼ぶ。動作も、第9の発
明における特殊命令用シーケンスプログラムの代わり
に、特殊命令用マイコンプログラムを予め転送してお
き、その後、実行するものである。動作は第9の発明の
実施例6とほぼ同様である。
That is, the special instruction sequence program in the sixth embodiment of the ninth invention is replaced with a special instruction microcomputer program. Usually, the CPU unit is equipped with a microprocessor for controlling, and a program constituted by the machine language of the microprocessor is called a microcomputer program. As for the operation, instead of the special instruction sequence program in the ninth aspect of the invention, the special instruction microcomputer program is transferred in advance and then executed. The operation is almost the same as that of the sixth embodiment of the ninth invention.

【0111】以上のように、第1〜第11の発明の方法
を用いた各々の実施例において、特殊機能ユニット2ポ
ートメモリのアドレスを意識せずにプログラムでき、ま
た、特殊機能ユニットに対する命令を見てその命令がど
のような動作をするかがすぐに判るのでプログラムの可
読性が上がり、設計効率/保守効率を向上させることが
できると共に、特殊機能ユニットの種類が増えても、C
PUユニット側に影響を与える事なく適切な特殊機能ユ
ニット対応命令を持たせることができる。
As described above, in each of the embodiments using the methods of the first to eleventh inventions, it is possible to program without paying attention to the address of the special function unit 2-port memory, and to instruct the special function unit. By looking at it, it is possible to immediately understand how the instruction operates, so that the readability of the program is improved, the design efficiency / maintenance efficiency can be improved, and even if the number of special function units increases, C
It is possible to have an appropriate special function unit compatible instruction without affecting the PU unit side.

【0112】なお、上記実施例1〜8では、プログラム
装置2とCPUユニット1が通信ケーブル3で接続され
ているとしたが、通信ケーブルなしで直接接続されてい
てもよい。また、通信用特殊機能ユニットにプログラム
装置2が通信ケーブル3を介して接続されていてもよ
い。また、特殊機能ユニットの1つがプログラム装置2
であってもよい。
Although the programming device 2 and the CPU unit 1 are connected by the communication cable 3 in the first to eighth embodiments, they may be directly connected without the communication cable. Further, the program device 2 may be connected to the communication special function unit via the communication cable 3. Also, one of the special function units is the programming device 2.
May be

【0113】更に、特殊機能ユニットが持つ特殊命令用
情報を図5のように定義したが、メモリの構成はワード
単位でも他の単位でもよいし、1情報ごとに異なっても
よい。各命令の情報はこれらのうちから限定してもよい
し、他にも必要な情報を追加してもよい。また、ユニッ
トによって異なってもよいし、異なることを知らせる情
報を付加させてもよい。さらに、1命令ずつまとめて格
納したが情報ごとにまとめてもよい。
Further, although the special instruction information held by the special function unit is defined as shown in FIG. 5, the memory structure may be a word unit or another unit, or may be different for each information. The information of each command may be limited from these, or other necessary information may be added. Further, it may differ depending on the unit, or information for notifying the difference may be added. Further, although one instruction is stored collectively, it may be stored for each information.

【0114】上記各実施例では命令記号における第1の
記号がZ_で始まる命令を特殊機能ユニット対応命令で
あるとしたが、Z_に限定されるものではなく、例えば
X_、Y_で始まる命令を特殊機能ユニット対応命令で
あるとし、X_はアナログ系特殊機能ユニット対応命
令、Y_はリンク系特殊機能ユニット対応命令、Z_は
その他の特殊機能ユニット対応命令などのように使い分
ければプログラムの判読がより容易になる。
In each of the above embodiments, the instruction whose first symbol in the instruction symbol starts with Z_ is the instruction corresponding to the special function unit, but the instruction is not limited to Z_, and the instruction starting with X_, Y_ is special. It is easier to read the program if it is used as a function unit corresponding instruction, X_ is an analog special function unit corresponding instruction, Y_ is a link special function unit corresponding instruction, and Z_ is another special function unit corresponding instruction. become.

【0115】また、Z_で始まる命令名が特殊機能ユニ
ット対応命令であるとしたが、CPUユニットが標準で
装備する(サポートする)命令名以外を特殊機能ユニッ
ト対応命令であるとしてもよい。即ち、特殊機能種別を
示す第2の記号が特殊機能ユニット対応命令であること
を示す第1の記号の役割も兼ね示す。さらに、Z_が特
殊機能ユニット対応命令の判断基準であるとしたが、命
令名等が中間コードに変換されプログラムメモリに格納
されており、その中間コードにより、特殊機能ユニット
対応命令であるか判断してもよい。
Although the instruction name starting with Z_ is the special function unit corresponding instruction, the instruction name other than the standard (equipped) instruction of the CPU unit may be the special function unit corresponding instruction. That is, the second symbol indicating the special function type also serves as the first symbol indicating that it is the special function unit corresponding instruction. Further, although Z_ is the criterion for the special function unit corresponding instruction, the instruction name and the like are converted into the intermediate code and stored in the program memory, and the intermediate code determines whether the instruction is the special function unit corresponding instruction. May be.

【0116】さらに、特殊機能ユニットに対する実行要
求を、CPUユニットから特殊機能ユニットに割り込み
をかけることにより行なったが、特殊機能ユニット内の
フリップフロップ(図示せず)をCPUユニット1が立
て、特殊機能ユニットがそれをポーリンリングして実行
要求があったか判断してもよいし、CPUユニット1が
特殊機能ユニット内の2ポートメモリに実行要求のコー
ドを書き込み、特殊機能ユニット4がそれをポーリング
して実行要求があったか判断してもよい。
Further, the execution request to the special function unit was made by interrupting the special function unit from the CPU unit. The CPU unit 1 sets up a flip-flop (not shown) in the special function unit, and The unit may poll it to determine whether there is an execution request, or the CPU unit 1 writes an execution request code in the 2-port memory in the special function unit, and the special function unit 4 polls it for execution. You may decide whether there was a request.

【0117】なお、上記実施例においては2方向アクセ
スメモリとして2ポートメモリを例示したが、2ポート
メモリに限定されるものではなく、通常のメモリを用い
ハードウェアの切替スイッチを用いてCPU部1と特殊
機能部4に属するデータ及びアドレスバスを切替える方
法であっても良い。
In the above embodiment, the two-port memory is exemplified as the two-way access memory, but the present invention is not limited to the two-port memory and a normal memory is used and a hardware changeover switch is used for the CPU unit 1. Alternatively, a method of switching the data and address buses belonging to the special function unit 4 may be used.

【0118】また、上記実施例においては制御装置とし
てプログラマブルコントローラを例に説明したが、この
発明の方法はプログラマブルコントローラ以外の、例え
ば、数値制御装置等にも適用できる。
Further, although the programmable controller has been described as an example of the control device in the above embodiments, the method of the present invention can be applied to other than the programmable controller, for example, a numerical control device.

【0119】[0119]

【発明の効果】以上のように、第1〜第4の発明によれ
ば、特殊機能対応命令及びその種別を表わす命令記号を
用いた命令形式の命令ステップを有するプログラムを実
行することにより、特殊機能部における多方向アクセス
メモリのアドレスを意識せずにプログラム作成可能とし
たもので、上記命令形式をみてその命令が指定する特殊
機能部が制御する制御対象が判かり、プログラムの可読
性が高く、プログラム設計及び保守効率のよい制御装置
の制御方法を得られる効果がある。
As described above, according to the first to fourth aspects of the invention, by executing the program having the instruction step of the instruction format using the instruction corresponding to the special function and the instruction symbol indicating the type, the special function is executed. It is possible to create a program without being aware of the address of the multi-directional access memory in the function part, and by looking at the above instruction format, the control target controlled by the special function part specified by the instruction can be understood, and the readability of the program is high, There is an effect that it is possible to obtain a control method of a control device with good program design and maintenance efficiency.

【0120】また、第6の発明によれば、特殊機能部に
上記特殊機能部をアクセスする命令用情報を格納し、上
記CPU部からアクセス可能な命令用情報メモリを備え
たので、上記命令用情報の格納を目的とする上記CPU
部及び上記特殊機能部の両方からアクセス可能なメモリ
を不要とし、第1〜第5の発明による効果に加えるに、
安価なものが得られる効果がある。
Further, according to the sixth aspect of the invention, since the instruction information for accessing the special function section is stored in the special function section and the instruction information memory accessible from the CPU section is provided, The CPU for the purpose of storing information
In addition to the effects of the first to fifth inventions, a memory that is accessible from both the control unit and the special function unit is unnecessary.
There is an effect that an inexpensive one can be obtained.

【0121】また、第7の発明によれば、特殊機能部に
CPU部からアクセス可能な第1の命令用情報メモリ
を、上記CPU部に第2の命令用情報メモリを備え、上
記第1の命令用情報メモリに格納されている命令用情報
を上記第2の命令用情報メモリに転送し、上記第2の命
令用情報メモリに格納された上記命令用情報に基づいて
解読した命令を実行するようにしたので、高速にプログ
ラム制御可能、かつ安価なものが得られる効果がある。
According to the seventh invention, the special function unit is provided with a first instruction information memory accessible from the CPU unit, and the CPU unit is provided with a second instruction information memory, and the first instruction information memory is provided. The command information stored in the command information memory is transferred to the second command information memory, and the command decoded based on the command information stored in the second command information memory is executed. As a result, there is an effect that a program can be controlled at high speed and that the cost is low.

【0122】また、第8の発明によれば、特殊機能部に
シーケンスプログラムを格納し、上記CPU部からアク
セス可能なシーケンスプログラム格納メモリを備えたの
で、本来、複数の命令になる複雑な機能を1つの特殊機
能対応命令でプログラムでき、また、特殊機能ユニット
に対する命令を見て、その命令がどのような動作をする
かがすぐに判り、プログラムの可読性が上がり、設計効
率/保守効率を向上させることができるものが得られる
効果がある。
Further, according to the eighth aspect of the invention, since the sequence program is stored in the special function section and the sequence program storage memory accessible from the CPU section is provided, the complicated function which is originally a plurality of instructions is provided. It is possible to program with one special function compatible instruction, and by looking at the instruction to the special function unit, you can immediately see how that instruction works, improve program readability and improve design efficiency / maintenance efficiency There is an effect that what can be obtained.

【0123】また、第9の発明によれば、特殊機能部に
CPU部からアクセス可能な第1のシーケンスプログラ
ム格納メモリを、上記CPU部に第2のシーケンスプロ
グラム格納メモリを備え、上記第1のシーケンスプログ
ラム格納メモリに格納されているシーケンスプログラム
を上記第2のシーケンスプログラム格納メモリに転送
し、解読した上記特殊機能部をアクセスする命令に対応
する上記シーケンスプログラムを上記第2のシーケンス
プログラム格納メモリから読み出して実行するようにし
たので、第8の発明による効果に加えるに、高速にプロ
グラム制御可能、かつ安価なものが得られる効果があ
る。
According to the ninth invention, the special function section is provided with a first sequence program storage memory accessible from the CPU section, and the CPU section is provided with a second sequence program storage memory. The sequence program stored in the sequence program storage memory is transferred to the second sequence program storage memory, and the sequence program corresponding to the decoded instruction to access the special function unit is transferred from the second sequence program storage memory. Since the program is read and executed, in addition to the effect of the eighth aspect of the invention, there is an effect that a program control can be performed at high speed and the cost is low.

【0124】また、第10の発明によれば、特殊機能部
にマイコンプログラムを格納し、上記CPU部からアク
セス可能なマイコンプログラム格納メモリを備えたの
で、本来、シーケンスプログラムでプログラムできない
ような処理をを1つの特殊機能対応命令でプログラムで
き、第8の発明による効果に加えるに、広範な用途のプ
ログラム制御に適用できるものが得られる効果がある。
Further, according to the tenth aspect of the invention, since the microcomputer program is stored in the special function section and accessible from the CPU section, the processing which cannot be originally programmed by the sequence program is performed. Can be programmed with one special function corresponding instruction, and in addition to the effect according to the eighth aspect of the invention, an effect that can be applied to program control for a wide range of applications can be obtained.

【0125】また、第11の発明によれば、特殊機能部
にCPU部からアクセス可能な第1のマイコンプログラ
ム格納メモリを、上記CPU部に第2のマイコンプログ
ラム格納メモリを備え、上記第1のマイコンプログラム
格納メモリに格納されているマイコンプログラムを上記
第2のマイコンプログラム格納メモリに転送し、解読し
た上記特殊機能部をアクセスする命令に対応する上記マ
イコンプログラムを上記第2のマイコンプログラム格納
メモリから読み出して実行するようにしたので、第10
の発明による効果に加えるに、高速にプログラム制御可
能なものが得られる効果がある。
According to the eleventh invention, the special function unit is provided with a first microcomputer program storage memory accessible from the CPU unit, and the CPU unit is provided with a second microcomputer program storage memory. From the second microcomputer program storage memory, the microcomputer program stored in the microcomputer program storage memory is transferred to the second microcomputer program storage memory, and the microcomputer program corresponding to the decoded instruction to access the special function unit is transferred from the second microcomputer program storage memory. Since it was read and executed,
In addition to the effect of the invention described above, there is an effect that a program controllable at high speed can be obtained.

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

【図1】第1から第11の発明の一実施例による特殊命
令の形式を示す図である。
FIG. 1 is a diagram showing a format of a special instruction according to an embodiment of the first to eleventh inventions.

【図2】第1から第11の発明の一実施例による特殊命
令の例を示す図である。
FIG. 2 is a diagram showing an example of a special instruction according to an embodiment of the first to eleventh inventions.

【図3】第1及び第2の発明の一実施例によるCPUユ
ニットからアクセスできるメモリ41の構成(特殊命令
用情報の内容)例である。
FIG. 3 is an example of a configuration (contents of special command information) of a memory 41 accessible from a CPU unit according to an embodiment of the first and second inventions.

【図4】第1及び第2のの発明の一実施例による特殊命
令を実行するときのCPUユニットの処理を示す動作フ
ロー図である。
FIG. 4 is an operational flow chart showing the processing of the CPU unit when executing a special instruction according to an embodiment of the first and second inventions.

【図5】第3〜の第5発明の一実施例による各特殊機能
ユニットそれぞれの特殊命令用情報格納メモリ41の構
成例である。
FIG. 5 is a structural example of a special command information storage memory 41 of each special function unit according to one embodiment of the third to fifth inventions.

【図6】第3〜第5の発明の一実施例による特殊命令を
実行するときのCPUユニットの処理を示す動作フロー
図である。
FIG. 6 is an operational flowchart showing the processing of the CPU unit when executing a special instruction according to an embodiment of the third to fifth inventions.

【図7】第1〜第5の発明及び従来に共通なプログラマ
ブルコントローラのシステム構成図である。
FIG. 7 is a system configuration diagram of a programmable controller common to the first to fifth inventions and the related art.

【図8】第6の発明の一実施例によるプログラマブルコ
ントローラの構成図である。
FIG. 8 is a configuration diagram of a programmable controller according to an embodiment of the sixth invention.

【図9】第7の発明の一実施例によるプログラマブルコ
ントローラの構成図である。
FIG. 9 is a configuration diagram of a programmable controller according to an embodiment of the seventh invention.

【図10】第7の発明の一実施例による各特殊機能ユニ
ットそれぞれの特殊命令用情報を格納するためのCPU
ユニット内のメモリ13の構成例である。
FIG. 10 is a CPU for storing special command information of each special function unit according to an embodiment of the seventh invention.
It is an example of composition of memory 13 in a unit.

【図11】第7の発明の一実施例による、特殊機能ユニ
ット内のメモリに格納された特殊命令用情報メモリ42
の内容をCPUユニット内の前記情報を格納するための
メモリ13に転送するときのCPUユニットの処理を示
す動作フロー図である。
FIG. 11 is a special command information memory 42 stored in a memory in a special function unit according to an embodiment of the seventh invention.
FIG. 9 is an operational flowchart showing the processing of the CPU unit when the contents of the above are transferred to the memory 13 for storing the information in the CPU unit.

【図12】第8の発明の一実施例によるプログラマブル
コントローラの構成図である。
FIG. 12 is a configuration diagram of a programmable controller according to an embodiment of the eighth invention.

【図13】第8及び第9の発明の一実施例によるCPU
ユニットからアクセスできるメモリ43の構成(特殊命
令用シーケンスメモリの内容)例である。
FIG. 13 is a CPU according to an embodiment of the eighth and ninth inventions.
It is an example of the configuration of the memory 43 that can be accessed from the unit (contents of the special instruction sequence memory).

【図14】第8及び第9の発明の一実施例による前記メ
モリ43に格納されている特殊命令に対応するシーケン
スプログラムの例である。
FIG. 14 is an example of a sequence program corresponding to a special instruction stored in the memory 43 according to an embodiment of the eighth and ninth inventions.

【図15】第9の発明の一実施例による特殊命令を実行
するときのCPUユニットの処理を示す動作フロー図で
ある。
FIG. 15 is an operational flowchart showing the processing of the CPU unit when executing a special instruction according to an embodiment of the ninth invention.

【図16】第9の発明の一実施例によるプログラマブル
コントローラの構成図である。
FIG. 16 is a configuration diagram of a programmable controller according to an embodiment of the ninth invention.

【図17】第9の発明の一実施例による各特殊機能ユニ
ットそれぞれの特殊命令用シーケンスプログラムを格納
するためのメモリ14の構成例である。
FIG. 17 is a structural example of a memory for storing a special instruction sequence program for each special function unit according to an embodiment of the ninth invention.

【図18】第9の発明の一実施例による、特殊機能ユニ
ット内のメモリに格納された特殊命令用シーケンスメモ
リ43の内容をCPUユニット内の前記内容を格納する
ためのメモリ14に転送するときのCPUユニットの処
理を示す動作フロー図である。
FIG. 18 is a diagram showing a case where the contents of the special instruction sequence memory 43 stored in the memory in the special function unit are transferred to the memory 14 for storing the contents in the CPU unit according to the embodiment of the ninth invention. 3 is an operation flow chart showing the processing of the CPU unit of FIG.

【図19】第10の発明の一実施例によるプログラマブ
ルコントローラの構成図である。
FIG. 19 is a configuration diagram of a programmable controller according to an embodiment of the tenth invention.

【図20】第11の発明の一実施例によるプログラマブ
ルコントローラの構成図である。
FIG. 20 is a configuration diagram of a programmable controller according to an embodiment of the eleventh invention.

【図21】バッファメモリの構成(内容)例である。FIG. 21 is an example of a configuration (contents) of a buffer memory.

【図22】従来の特殊命令の形式である。FIG. 22 is a format of a conventional special instruction.

【図23】従来の特殊機能ユニットとのデータの書き込
みを行う命令の例である。
FIG. 23 is an example of an instruction for writing data with a conventional special function unit.

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

1、1A、1B、1C CPUユニット 11 プログラムメモリ 12 デバイスメモリ 13 特殊命令用情報メモリ 14 特殊命令用シーケンスメモリ 15 特殊命令用マイコンメモリ 2 プログラム装置 3 通信ケーブル 4 入出力ユニット 4A、4B、4C、4D 特殊機能ユニット 41 2ポートメモリ 42 特殊命令用情報メモリ 43 特殊命令用シーケンスメモリ 44 特殊命令用マイコンメモリ 45 バッファメモリ 1, 1A, 1B, 1C CPU unit 11 Program memory 12 device memory 13 Information memory for special instructions 14 Sequence memory for special instructions 15 Microcomputer memory for special instructions 2 programming equipment 3 communication cable 4 I / O unit 4A, 4B, 4C, 4D Special function unit 41 2-port memory 42 Information memory for special instructions 43 Sequence memory for special instructions 44 Microcomputer memory for special instructions 45 buffer memory

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 プログラム制御を行なうCPU部と、上
記CPU部からもアクセス可能な多方向アクセスメモリ
を有し、上記CPU部からの指令により特殊制御を行な
う複数の特殊機能部とを備えた制御装置において、特殊
機能部対応命令であること及びその種別を表わす命令記
号を用いた命令ステップを有するプログラムを作成して
おく段階と、上記CPU部にて上記プログラムを実行
し、実行中の上記命令ステップが特殊機能部対応命令で
あることを上記命令記号により判別し、上記命令ステッ
プの内容を対応する特殊機能部の上記多方向アクセスメ
モリへ格納すると共に上記特殊機能部に対してその実行
を要求する段階と、上記特殊機能部にて上記多方向アク
セスメモリへ格納された上記命令ステップの内容をメモ
リアドレスによらずに上記記号に基づきアクセスして実
行する段階とからなることを特徴とする制御装置の制御
方法。
1. A control comprising a CPU section for performing program control, a multi-directional access memory accessible from the CPU section, and a plurality of special function sections for performing special control according to commands from the CPU section. In the apparatus, a step of creating a program having an instruction step using an instruction symbol representing a special function unit corresponding instruction and its type, and executing the program in the CPU unit and executing the instruction It is determined that the step is an instruction corresponding to the special function section by the instruction symbol, the contents of the instruction step are stored in the multidirectional access memory of the corresponding special function section, and the execution of the special function section is requested. And the contents of the instruction step stored in the multi-directional access memory in the special function unit without depending on the memory address. And a step of accessing and executing the symbol based on the above symbol.
【請求項2】 請求項1記載の制御装置において、命令
ステップの命令記号は特殊機能部対応命令を表わす第1
の記号及び特殊機能種別を表わす第2の記号からなり、
実行中の上記命令ステップが特殊機能部対応命令である
ことを上記第1の記号により判別し、上記特殊機能部に
て上記多方向アクセスメモリへ格納された上記命令ステ
ップの内容をメモリアドレスによらずに上記第2の記号
に基づいてアクセスして実行することを特徴とする制御
装置の制御方法。
2. The control device according to claim 1, wherein the instruction symbol of the instruction step represents a special function unit corresponding instruction.
And a second symbol representing the special function type,
It is determined by the first symbol that the command step being executed is a command corresponding to the special function unit, and the contents of the command step stored in the multi-directional access memory by the special function unit are read from the memory address. A control method of a control device, characterized in that the program is accessed and executed based on the second symbol without being executed.
【請求項3】 請求項1記載の制御装置において、複数
の特殊機能部のそれぞれに対応の命令情報をそれぞれが
有する多方向アクセスメモリに格納し、かつ特殊機能部
対応命令であること及びその種別を表わす命令記号を用
いた命令ステップを有するプログラムを作成しておく段
階と、上記CPU部にて上記プログラムを実行して実行
中の上記命令ステップが上記特殊機能部対応命令である
ことを上記命令記号により判別し、対応する特殊機能部
の上記多方向アクセスメモリに格納された上記命令情報
をアクセスし、上記命令情報と上記命令ステップの内容
とが一致したら上記特殊機能部に対して上記命令情報に
従ってその実行を要求する段階と、上記特殊機能部にて
上記多方向アクセスメモリへ格納された上記命令情報の
実行部分を上記命令記号に基づいてアクセスし、命令を
実行する段階とからなることを特徴とする制御装置の制
御方法。
3. The control device according to claim 1, wherein the instruction information corresponding to each of the plurality of special function units is stored in a multi-directional access memory each of which has a special function unit corresponding instruction and its type. A step of preparing a program having an instruction step using an instruction symbol indicating that the instruction step being executed by executing the program in the CPU section corresponds to the special function section instruction. When the instruction information stored in the multi-directional access memory of the corresponding special function unit is accessed by the symbol and the instruction information and the content of the instruction step match, the instruction information is sent to the special function unit. According to the step of requesting the execution of the instruction information and the execution part of the instruction information stored in the multi-directional access memory in the special function section A method of controlling a control device, comprising the steps of accessing based on a symbol and executing an instruction.
【請求項4】 請求項3記載の制御装置の制御方法にお
いて、命令ステップの命令記号は特殊機能部対応命令を
表わす第1の記号及び特殊機能種別を表わす第2の記号
からなり、実行中の上記命令ステップが上記特殊機能部
対応命令であることを上記第1の記号により判別し、上
記特殊機能部にて上記多方向アクセスメモリへ格納され
た上記命令情報の実行部分を上記第2の記号に基づいて
アクセスし、命令を実行することを特徴とする制御装置
の制御方法。
4. The control method according to claim 3, wherein the instruction symbol of the instruction step comprises a first symbol indicating a special function unit corresponding instruction and a second symbol indicating a special function type, which is being executed. It is determined by the first symbol that the instruction step is an instruction corresponding to the special function unit, and the execution portion of the instruction information stored in the multi-directional access memory by the special function unit is the second symbol. A method of controlling a control device, characterized in that the control device accesses the device based on the instruction and executes an instruction.
【請求項5】 プログラム制御を行なうCPU部と、上
記CPU部からの指令により特殊制御を行なう特殊機能
部とを備え、上記特殊機能部は上記特殊機能部をアクセ
スする命令用情報を格納し、上記CPU部及び特殊機能
部の両方からアクセス可能なメモリと、上記メモリに上
記命令用情報を格納する情報格納手段とを有し、上記C
PU部は任意の命令名で入力されたプログラム中の命令
が特殊機能部をアクセスする命令であることを判別する
命令判別手段と、上記特殊機能部をアクセスする命令を
解読し、上記メモリに格納された上記命令用情報に基づ
いて上記解読した命令を実行する命令実行手段とを有す
ることを特徴とする制御装置。
5. A CPU section for performing program control and a special function section for performing special control in response to a command from the CPU section, wherein the special function section stores information for instructions for accessing the special function section, The memory includes a memory accessible from both the CPU unit and the special function unit, and an information storage unit that stores the command information in the memory.
The PU unit decodes the instruction determining means for determining that the instruction in the program input with an arbitrary instruction name is the instruction for accessing the special function unit, and the instruction for accessing the special function unit, and stores it in the memory. And a command executing means for executing the decoded command based on the command information thus obtained.
【請求項6】 プログラム制御を行なうCPU部と、上
記CPU部からの指令により特殊制御を行なう特殊機能
部とを備え、上記特殊機能部は上記特殊機能部をアクセ
スする命令用情報を格納し、上記CPU部からアクセス
可能な命令用情報メモリを有し、上記CPU部は任意の
命令名で入力されたプログラム中の命令が特殊機能部を
アクセスする命令であることを判別する命令判別手段
と、上記特殊機能部をアクセスする命令を解読し、上記
命令用情報メモリに格納された上記命令用情報に基づい
て上記解読した命令を実行する命令実行手段とを有する
ことを特徴とする制御装置。
6. A CPU section for performing program control, and a special function section for performing special control in response to a command from the CPU section, wherein the special function section stores information for instructions to access the special function section, An instruction discriminating means which has an instruction information memory accessible from the CPU unit, and the CPU unit discriminates that an instruction in a program inputted with an arbitrary instruction name is an instruction to access the special function unit; And a command executing means for decoding an instruction for accessing the special function unit and executing the decoded instruction based on the instruction information stored in the instruction information memory.
【請求項7】 プログラム制御を行なうCPU部と、上
記CPU部からの指令により特殊制御を行なう特殊機能
部とを備え、上記特殊機能部は上記特殊機能部をアクセ
スする命令用情報を格納し、上記CPU部からアクセス
可能な第1の命令用情報メモリを有し、上記CPU部は
上記命令用情報を格納可能な第2の命令用情報メモリ
と、上記第1の命令用情報メモリに格納されている上記
命令用情報を上記第2の命令用情報メモリに転送して格
納するデータ転送手段と、任意の命令名で入力されたプ
ログラム中の命令が特殊機能部をアクセスする命令であ
ることを判別する命令判別手段と、上記特殊機能部をア
クセスする命令を解読し、上記第2の命令用情報メモリ
に格納された上記命令用情報に基づいて上記解読した命
令を実行する命令実行手段とを有することを特徴とする
制御装置。
7. A CPU section for performing program control, and a special function section for performing special control in response to a command from the CPU section, wherein the special function section stores instruction information for accessing the special function section, It has a first instruction information memory accessible from the CPU section, and the CPU section is stored in a second instruction information memory capable of storing the instruction information and in the first instruction information memory. And a data transfer means for transferring and storing the command information in the second command information memory, and that the command in the program input with an arbitrary command name is a command for accessing the special function unit. Command determining means for determining, and command execution for decoding the command for accessing the special function unit and executing the decoded command based on the command information stored in the second command information memory And a control device.
【請求項8】 請求項6記載の制御装置において、特殊
機能部は命令用情報メモリの代わりにシーケンスプログ
ラムを格納し、CPU部からアクセス可能なシーケンス
プログラム格納メモリを有し、上記CPU部は解読した
上記特殊機能部をアクセスする命令に対応する上記シー
ケンスプログラムを上記シーケンスプログラム格納メモ
リから読み出して実行することを特徴とする制御装置。
8. The control device according to claim 6, wherein the special function section stores a sequence program instead of the instruction information memory, and has a sequence program storage memory accessible from the CPU section, and the CPU section decodes the sequence program. A control device, wherein the sequence program corresponding to an instruction for accessing the special function unit is read from the sequence program storage memory and executed.
【請求項9】 請求項7記載の制御装置において、特殊
機能部は第1の命令用情報メモリの代わりにシーケンス
プログラムを格納し、CPU部からアクセス可能な第1
のシーケンスプログラム格納メモリを有し、上記CPU
部は第2の命令用情報メモリの代わりに上記第1のシー
ケンスプログラム格納メモリに格納されている上記シー
ケンスプログラムを転送して格納する第2のシーケンス
プログラム格納メモリを有し、解読した上記特殊機能部
をアクセスする命令に対応する上記シーケンスプログラ
ムを上記第2のシーケンスプログラム格納メモリから読
み出して実行することを特徴とする制御装置。
9. The control device according to claim 7, wherein the special function unit stores a sequence program instead of the first instruction information memory, and is accessible from the CPU unit.
CPU having a sequence program storage memory of
The section has a second sequence program storage memory for transferring and storing the sequence program stored in the first sequence program storage memory instead of the second instruction information memory, and the decoded special function A control device for reading the sequence program corresponding to an instruction for accessing a unit from the second sequence program storage memory and executing the sequence program.
【請求項10】 請求項6記載の制御装置において、特
殊機能部は命令用情報メモリの代わりにマイコンプログ
ラムを格納し、CPU部からアクセス可能なマイコンプ
ログラム格納メモリを有し、上記CPU部は解読した上
記特殊機能部をアクセスする命令に対応する上記マイコ
ンプログラムを上記マイコンプログラム格納メモリから
読み出して実行することを特徴とする制御装置。
10. The control device according to claim 6, wherein the special function section stores a microcomputer program instead of the instruction information memory, and has a microcomputer program storage memory accessible from the CPU section, and the CPU section decodes the program. A control device, wherein the microcomputer program corresponding to an instruction to access the special function unit is read from the microcomputer program storage memory and executed.
【請求項11】 請求項7記載の制御装置において、特
殊機能部は第1の命令用情報メモリの代わりにマイコン
プログラムを格納し、CPU部からアクセス可能な第1
のマイコンプログラム格納メモリを有し、上記CPU部
は第2の命令用情報メモリの代わりに上記第1のマイコ
ンプログラム格納メモリに格納されている上記マイコン
プログラムを転送して格納する第2のマイコンプログラ
ム格納メモリを有し、解読した上記特殊機能部をアクセ
スする命令に対応する上記マイコンプログラムを上記第
2のマイコンプログラム格納メモリから読み出して実行
することを特徴とする制御装置。
11. The control device according to claim 7, wherein the special function section stores a microcomputer program instead of the first instruction information memory and is accessible from the CPU section.
A second microcomputer program for transferring and storing the microcomputer program stored in the first microcomputer program storage memory instead of the second instruction information memory. A control device having a storage memory, wherein the microcomputer program corresponding to a decoded instruction to access the special function unit is read from the second microcomputer program storage memory and executed.
JP3286221A 1990-10-31 1991-10-31 Sequence control method Expired - Lifetime JP2542465B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3286221A JP2542465B2 (en) 1990-10-31 1991-10-31 Sequence control method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP29450490 1990-10-31
JP2-294504 1990-10-31
JP3286221A JP2542465B2 (en) 1990-10-31 1991-10-31 Sequence control method

Publications (2)

Publication Number Publication Date
JPH056208A true JPH056208A (en) 1993-01-14
JP2542465B2 JP2542465B2 (en) 1996-10-09

Family

ID=26556216

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3286221A Expired - Lifetime JP2542465B2 (en) 1990-10-31 1991-10-31 Sequence control method

Country Status (1)

Country Link
JP (1) JP2542465B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102365903A (en) * 2009-04-09 2012-02-29 株式会社派特莱 Mars light, mars light system and method for controlling light emitting of mars light
JP5015153B2 (en) * 2006-07-13 2012-08-29 三菱電機株式会社 Equipment management system, programmable controller and centralized controller

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS608939A (en) * 1983-06-28 1985-01-17 Fujitsu Ltd Special function set-up controlling system
JPS63116209A (en) * 1986-11-05 1988-05-20 Mitsubishi Electric Corp Sequence controller

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS608939A (en) * 1983-06-28 1985-01-17 Fujitsu Ltd Special function set-up controlling system
JPS63116209A (en) * 1986-11-05 1988-05-20 Mitsubishi Electric Corp Sequence controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5015153B2 (en) * 2006-07-13 2012-08-29 三菱電機株式会社 Equipment management system, programmable controller and centralized controller
CN102365903A (en) * 2009-04-09 2012-02-29 株式会社派特莱 Mars light, mars light system and method for controlling light emitting of mars light

Also Published As

Publication number Publication date
JP2542465B2 (en) 1996-10-09

Similar Documents

Publication Publication Date Title
EP0148478A2 (en) A data processor with control of the significant bit lenghts of general purpose registers
US5600807A (en) Programmable controller capable of updating a user program during operation by switching between user program memories
JPS6355119B2 (en)
KR920004279B1 (en) Microprocessor with pointer register
JPH056208A (en) Controller and control method therefor
EP0059758A1 (en) Numerical control unit
US5565895A (en) Programmable controller with independent display
EP0483862B1 (en) Control apparatus controlling process
JP2593548B2 (en) Data processing device
JPS6148742B2 (en)
JP2506591B2 (en) Auxiliary processor
JPS59127154A (en) Instruction decoder of electronic computer
JPS59186048A (en) Microprogram control system
JP3428253B2 (en) Sequencer
JPH06314118A (en) Monitor device
JPH03144705A (en) Operation state monitor for programmable controller
JP2526710B2 (en) Programmable controller programming method
JPH08297583A (en) Processor and method for interruption processing
JPS6144339B2 (en)
JPH0454531A (en) Program reading circuit
JPH10134013A (en) Multi-cpu system
JPH06348549A (en) Software processor
JPS58101352A (en) Data processor
JPS645342B2 (en)
JPH0659065B2 (en) Data transmission method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070725

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20080725

Year of fee payment: 12

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

Year of fee payment: 13

Free format text: PAYMENT UNTIL: 20090725

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

Year of fee payment: 14

Free format text: PAYMENT UNTIL: 20100725

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

Free format text: PAYMENT UNTIL: 20100725

Year of fee payment: 14

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

Year of fee payment: 15

Free format text: PAYMENT UNTIL: 20110725

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

Year of fee payment: 15

Free format text: PAYMENT UNTIL: 20110725

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

Year of fee payment: 16

Free format text: PAYMENT UNTIL: 20120725

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 16

Free format text: PAYMENT UNTIL: 20120725