JPH08339210A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH08339210A
JPH08339210A JP7147134A JP14713495A JPH08339210A JP H08339210 A JPH08339210 A JP H08339210A JP 7147134 A JP7147134 A JP 7147134A JP 14713495 A JP14713495 A JP 14713495A JP H08339210 A JPH08339210 A JP H08339210A
Authority
JP
Japan
Prior art keywords
shared contact
user program
shared
information
programmable controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP7147134A
Other languages
Japanese (ja)
Other versions
JP3358045B2 (en
Inventor
Masato Yoshioka
誠人 吉岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP14713495A priority Critical patent/JP3358045B2/en
Publication of JPH08339210A publication Critical patent/JPH08339210A/en
Application granted granted Critical
Publication of JP3358045B2 publication Critical patent/JP3358045B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE: To make execution of a user program follow in real time the change of the contact information that is shared with other programmable controllers by the communication carried out via a network. CONSTITUTION: A CPU unit 1 divides a user program into a shared contact user program and an independent contact user program and stores the former program in the memory 15b or 15c and the latter program in a memory 15a respectively. An MPU 11 usually carries out only the independent contact user program stored in the memory 15a. When the shared contact information is received via a network N, the MPU 11 interrupts the execution of the independent contact user program by interruption and carries out the shared contact user program stored in the memory 15b or 15c based on the shared contact information.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ネットワークを介した
通信によって他のプログラマブルコントローラと接点情
報を共有し、その共有接点情報に基づきユーザプログラ
ムを実行するプログラマブルコントローラに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller that shares contact information with another programmable controller by communication via a network and executes a user program based on the shared contact information.

【0002】[0002]

【従来の技術】近年、生産ライン等のスイッチやロボッ
ト等の各種FA機器の動作制御を行うプログラマブルコ
ントローラの分野でも、ネットワークを介し他のプログ
ラマブルコントローラと接続してネットワークシステム
を構築することが行われており、このようなシステムで
は、複数の各プログラマブルコントローラ間でネットワ
ークを介した通信によって接点情報を共有することが行
われている。
2. Description of the Related Art In recent years, even in the field of programmable controllers for controlling the operation of various FA devices such as switches in production lines and robots, network systems have been constructed by connecting to other programmable controllers via a network. In such a system, contact information is shared among a plurality of programmable controllers by communication via a network.

【0003】このようなプログラマブルコントローラで
は、従来、ネットワークを介し他のプログラマブルコン
トローラとの間で共有する接点情報(以下、「共有接点
情報」という。)を使用する共有接点処理と、そのよう
な共有接点情報を必要としない各プログラマブルコント
ローラ独自の接点情報(以下、「独自接点情報」とい
う。)を使用する独自接点処理とを分けずに混在させた
ユーザプログラムを、共有接点情報の通信とは無関係に
サイクリックに実行していた。
In such a programmable controller, conventionally, shared contact processing using contact information (hereinafter referred to as “shared contact information”) shared with another programmable controller via a network, and such sharing. A user program that does not require contact information and is mixed with original contact processing that uses unique contact information of each programmable controller (hereinafter referred to as "independent contact information") is not related to the communication of shared contact information. Was running cyclically.

【0004】[0004]

【発明が解決しようとする課題】しかし、このようなプ
ログラマブルコントローラでは、共有接点情報を使用す
る共有接点処理と、ネットワークNを介した通信とは関
係のない独自接点情報を使用する独自接点処理とが混在
したユーザプログラムを、共有接点情報の通信とは無関
係にサイクリックに実行していたため、他のプログラマ
ブルコントローラからネットワークを介して更新された
共有接点情報が送信されてきた場合でも、ユーザプログ
ラムの実行中であれば、直ぐにその共有接点情報を使用
できず、次サイクルまで待つ必要が有るので、ユーザプ
ログラムの実行が共有接点情報の変化にリアルタイムに
追従できない、という問題があった。
However, in such a programmable controller, the shared contact point processing using the shared contact point information and the unique contact point processing using the unique contact point information not related to the communication via the network N are performed. Since the user program in which the shared contact information was mixed was cyclically executed irrespective of the communication of the shared contact information, even if the updated shared contact information is sent from another programmable controller via the network, If it is being executed, the shared contact information cannot be used immediately, and it is necessary to wait until the next cycle. Therefore, there is a problem that the execution of the user program cannot follow the change of the shared contact information in real time.

【0005】特に、実行サイクルの長いユーザプログラ
ムを実行している際に、共有接点情報がネットワークを
介し送信されてきて入力した場合には、その入力タイミ
ングからその共有接点情報を使用してユーザプログラム
を実行するタイミングまで時間がかかる場合があり、共
有接点情報を使用したリアルタイムな処理が実行できな
かった。
Particularly, when the shared contact information is transmitted and input via the network during execution of a user program having a long execution cycle, the user program is used by using the shared contact information from the input timing. It may take some time to execute, and real-time processing using shared contact information could not be executed.

【0006】本発明は、このような問題に着目してなさ
れたもので、ユーザプログラムの実行がネットワークを
介した共有接点情報の変化にリアルタイムに追従できる
プログラマブルコントローラを提供することを目的とす
る。
The present invention has been made in view of such a problem, and an object of the present invention is to provide a programmable controller capable of following execution of a user program in real time according to changes in shared contact information via a network.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するた
め、請求項1記載の発明では、ネットワークを介した通
信によって他のプログラマブルコントローラと接点情報
を共有し、その共有接点情報に基づきユーザプログラム
を実行するプログラマブルコントローラにおいて、上記
共有接点情報を使用する共有接点ユーザプログラムを格
納した共有接点ユーザプログラムメモリと、上記共有接
点情報を使用しない独自接点ユーザプログラムを格納し
た独自接点ユーザプログラムメモリと、通常は上記独自
接点ユーザプログラムメモリに格納された独自接点ユー
ザプログラムを実行し、ネットワークを介し他のプログ
ラマブルコントローラから共有接点情報が送信されてき
た場合には、割込みにより上記独自接点ユーザプログラ
ムの実行を中断し、上記共有接点ユーザプログラムメモ
リに格納された共有接点ユーザプログラムを上記送信さ
れてきた共有接点情報を使用して実行するプログラム実
行手段と、を具備することを特徴とする。
In order to achieve the above object, the invention according to claim 1 shares contact information with another programmable controller by communication through a network, and a user program is created based on the shared contact information. In the programmable controller to be executed, a shared contact user program memory that stores the shared contact user program that uses the shared contact information, a unique contact user program memory that stores the unique contact user program that does not use the shared contact information, and normally When the unique contact user program stored in the unique contact user program memory is executed and the shared contact information is transmitted from another programmable controller via the network, the execution of the unique contact user program is interrupted by an interrupt. , The serial Share Share contacts the user program stored in the contact user program memory, characterized by comprising: a program executing means for executing using shared contact information transmitted above.

【0008】請求項2記載の発明では、請求項1記載の
プログラマブルコントローラにおいて、共有接点ユーザ
プログラムメモリには、複数の共有接点ユーザプログラ
ムが格納され、かつ、共有接点情報には、当該共有接点
情報を使用する共有接点ユーザプログラムを指示するプ
ログラム指示情報が付加されており、プログラム実行手
段は、ネットワークを介し他のプログラマブルコントロ
ーラから共有接点情報が送信されてきた場合には、割込
みにより上記独自接点ユーザプログラムの実行を中断
し、当該共有接点情報に付加されたプログラム指示情報
に基づいて上記共有接点ユーザプログラムメモリに格納
された対応する共有接点ユーザプログラムを読出し、そ
の共有接点ユーザプログラムを上記送信されてきた共有
接点情報を使用して実行する、ことを特徴とする。
According to a second aspect of the invention, in the programmable controller according to the first aspect, the shared contact user program memory stores a plurality of shared contact user programs, and the shared contact information includes the shared contact information. Program instruction information for instructing a shared contact user program that uses the shared contact information is added, and when the shared contact information is transmitted from another programmable controller via the network, the program execution means causes an interrupt to cause the unique contact user to operate. The execution of the program is interrupted, the corresponding shared contact user program stored in the shared contact user program memory is read based on the program instruction information added to the shared contact information, and the shared contact user program is transmitted. Using shared contact information Rows, characterized in that.

【0009】請求項3記載の発明では、請求項2記載の
プログラマブルコントローラにおいて、複数の共有接点
ユーザプログラムが各々使用する共有接点情報は、通信
ポート毎に送受信され、かつ、その各共有接点情報には
プログラム指示情報として通信ポート番号が付加される
ものとし、プログラム実行手段は、予め各通信ポート番
号と、各通信ポートを介して送信されてくる各共有接点
情報を使用する共有接点ユーザプログラムとを対応させ
た通信ポート情報テーブルを有しており、ネットワーク
を介し他のプログラマブルコントローラから共有接点情
報が送信されてきた場合には、当該共有接点情報に付加
されたプログラム指示情報としての通信ポート番号に基
づき上記通信ポート情報テーブルを参照して共有接点ユ
ーザプログラムメモリに格納された対応する共有接点ユ
ーザプログラムを読出す、ことを特徴とする。
According to a third aspect of the present invention, in the programmable controller according to the second aspect, the shared contact information used by each of the plurality of shared contact user programs is transmitted / received for each communication port, and the shared contact information is contained in each shared contact information. The communication port number is added as the program instruction information, and the program execution means stores each communication port number in advance and a shared contact user program using each shared contact information transmitted via each communication port. It has a corresponding communication port information table, and when the shared contact information is transmitted from another programmable controller via the network, the communication port number as the program instruction information added to the shared contact information is added. Based on the above communication port information table, the shared contact user program Reads the shared contact user program corresponding stored in Li, characterized in that.

【0010】請求項4記載の発明では、請求項1、請求
項2または請求項3記載のプログラマブルコントローラ
において、独自接点ユーザプログラムには、ネットワー
クを介して他のプログラマブルコントローラに対し共有
接点情報の読出しを要求する共有接点読出しコマンドを
送信させる命令が含まれており、プログラム実行手段
は、通常は上記独自接点ユーザプログラムメモリに格納
された独自接点ユーザプログラムを実行し、上記命令を
実行した場合には、ネットワークを介して他のプログラ
マブルコントローラに対し上記共有接点読出しコマンド
を送信すると共に、ネットワークを介し当該他のプログ
ラマブルコントローラから共有接点情報が送信されてき
た場合には、割込みにより上記独自接点ユーザプログラ
ムの実行を中断し、共有接点ユーザプログラムメモリに
格納された共有接点ユーザプログラムを上記送信されて
きた共有接点情報を使用して実行する、ことを特徴とす
る。
According to a fourth aspect of the present invention, in the programmable controller according to the first aspect, the second aspect, or the third aspect, the unique contact user program reads shared contact information from another programmable controller via a network. The command execution means normally executes the unique contact user program stored in the unique contact user program memory, and when the above command is executed, the program execution means normally executes the unique contact user program stored in the unique contact user program memory. , If the shared contact read command is transmitted to another programmable controller via the network and the shared contact information is transmitted from the other programmable controller via the network, an interrupt causes the unique contact user program of the above-mentioned unique contact user program to be transmitted. Interrupt the execution, Shared contacts the user program stored in the Reed user program memory using a shared contact information sent the run, characterized in that.

【0011】請求項5記載の発明では、ネットワークを
介した通信によって他のプログラマブルコントローラと
接点情報を共有し、その共有接点情報に基づきユーザプ
ログラムを実行するプログラマブルコントローラにおい
て、上記共有接点情報を使用しない独自接点ユーザプロ
グラムを格納した独自接点ユーザプログラムメモリと、
通常は上記独自接点ユーザプログラムメモリに格納され
た独自接点ユーザプログラムを実行し、ネットワークを
介し他のプログラマブルコントローラから共有接点情報
およびその共有接点情報を使用する共有接点ユーザプロ
グラムが送信されてきた場合には、割込みにより上記独
自接点ユーザプログラムの実行を中断し、上記送信され
てきた共有接点情報を使用して上記共有接点ユーザプロ
グラムを実行するプログラム実行手段と、を具備するこ
とを特徴とする。
According to another aspect of the invention, the shared contact information is not used in a programmable controller that shares contact information with another programmable controller by communication via a network and executes a user program based on the shared contact information. Unique contact user program memory that stores the unique contact user program,
Normally, when the unique contact user program stored in the unique contact user program memory is executed and the shared contact information and the shared contact user program using the shared contact information are sent from another programmable controller via the network. Includes a program executing means for interrupting the execution of the unique contact user program by an interrupt and executing the shared contact user program using the transmitted shared contact information.

【0012】[0012]

【作用】本発明では、共有接点情報を使用する共有接点
ユーザプログラムと、共有接点情報を使用しない独自接
点ユーザプログラムとを分けて格納しておき、通常は独
自接点ユーザプログラムを実行し、ネットワークを介し
他のプログラマブルコントローラから共有接点情報が送
信されてきた場合には、割込みによりその独自接点ユー
ザプログラムの実行を中断し、送信されてきた共有接点
情報を使用して共有接点ユーザプログラムを実行するよ
うにする。
According to the present invention, the shared contact user program that uses the shared contact information and the unique contact user program that does not use the shared contact information are separately stored, and normally, the unique contact user program is executed to establish the network. If shared contact information is sent from another programmable controller via an interrupt, the execution of the unique contact user program is interrupted and the shared contact user program is executed using the sent shared contact information. To

【0013】また、複数の共有接点ユーザプログラムを
プログラム番号により区別し、共有接点情報には当該共
有接点情報を使用する共有接点ユーザプログラムのプロ
グラム番号を指示するプログラム指示情報を付加して送
信するようにして、このような共有接点情報が送信がさ
れてきた場合には、割込みにより独自接点ユーザプログ
ラムの実行を中断し、当該共有接点情報に付加されたプ
ログラム指示情報が指示する共有接点ユーザプログラム
を、送信されてきた共有接点情報を使用して実行するよ
うにしても良い。
Further, a plurality of shared contact point user programs are distinguished by program numbers, and the shared contact point information is transmitted by adding program instruction information indicating the program number of the shared contact point user program using the shared contact point information. Then, when such shared contact information is transmitted, the execution of the unique contact user program is interrupted and the shared contact user program specified by the program instruction information added to the shared contact information is interrupted. Alternatively, the shared contact information transmitted may be used for execution.

【0014】さらに、本発明では、共有接点情報を使用
する共有接点ユーザプログラムを所有せず、共有接点情
報を使用しない独自接点ユーザプログラムのみを所有す
るようにして、通常は独自接点ユーザプログラムメモリ
に格納された独自接点ユーザプログラムを実行し、ネッ
トワークを介し他のプログラマブルコントローラから共
有接点情報およびその共有接点情報を使用する共有接点
ユーザプログラムが送信されてきた場合には、割込みに
よりその独自接点ユーザプログラムの実行を中断し、そ
の共有接点情報を使用して上記共有接点ユーザプログラ
ムを実行するようにしても良い。
Further, according to the present invention, the shared contact point user program that uses the shared contact point information is not owned, and only the unique contact point user program that does not use the shared contact point information is owned. When the stored unique contact user program is executed and the shared contact information and the shared contact user program that uses the shared contact information are sent from another programmable controller via the network, the interrupt causes the unique contact user program. May be interrupted and the shared contact user program may be executed using the shared contact information.

【0015】[0015]

【実施例】以下、本発明に係るプログラマブルコントロ
ーラの実施例を図面に基づいて説明する。
Embodiments of a programmable controller according to the present invention will be described below with reference to the drawings.

【0016】図1に、本発明に係るプログラマブルコン
トローラの第1実施例の構成を示す。
FIG. 1 shows the configuration of the first embodiment of the programmable controller according to the present invention.

【0017】このプログラマブルコントローラAは、図
に示すように、CPUユニット1と、通信ユニット2と
から構成されており、内部的にはCPUユニット1と通
信ユニット2とがシステムバス3を介して接続され、外
部的には通信ユニット2を介して通信ネットワークNと
接続されている。
As shown in the figure, the programmable controller A is composed of a CPU unit 1 and a communication unit 2, and the CPU unit 1 and the communication unit 2 are internally connected via a system bus 3. And is externally connected to the communication network N via the communication unit 2.

【0018】CPUユニット1は、本ユニット1全体を
制御するMPU11と、本ユニット1全体を制御するた
めのシステムプログラムが格納されたシステムROM1
2と、MPU11のワークエリアとして使用されるワー
クRAM13と、システムバスインタフェース(I/
F)14と、各々異なるユーザプログラムが格納された
ユーザプログラムメモリ15a〜15cとを有してい
る。
The CPU unit 1 includes an MPU 11 for controlling the entire unit 1 and a system ROM 1 in which a system program for controlling the entire unit 1 is stored.
2, a work RAM 13 used as a work area for the MPU 11, and a system bus interface (I /
F) 14 and user program memories 15a to 15c in which different user programs are stored.

【0019】ここで、本実施例では、ユーザプログラム
メモリ15aには、ネットワークNの通信を介した共有
接点情報を使用しない独自接点情報を使用する独自接点
ユーザプログラムが格納されており、ユーザプログラム
メモリ15b,15cには、各々、ネットワークNの通
信を介した共有接点情報を使用する共有接点ユーザプロ
グラムが格納されており、共有接点ユーザプログラムが
複数有るので、各々にプログラム番号が割り付けられて
いるものとする。
Here, in this embodiment, the user program memory 15a stores a unique contact user program that uses unique contact information that does not use shared contact information through communication of the network N. Each of 15b and 15c stores a shared contact point user program that uses shared contact point information through communication of the network N. Since there are a plurality of shared contact point user programs, a program number is assigned to each of them. And

【0020】通信ユニット2は、本ユニット2全体を制
御するMPU21と、本ユニット2全体を制御するため
のシステムプログラムが格納されたシステムROM22
と、MPU21のワークエリアとして使用されるワーク
RAM23と、システムバスインタフェース(I/F)
24と、システムインタフェース24に接続された共有
RAM25と、ネットワークNに対しデータの送受信を
行う通信コントローラ26とを有する。
The communication unit 2 includes an MPU 21 that controls the entire main unit 2 and a system ROM 22 that stores a system program for controlling the entire main unit 2.
And a work RAM 23 used as a work area for the MPU 21, and a system bus interface (I / F)
24, a shared RAM 25 connected to the system interface 24, and a communication controller 26 that transmits and receives data to and from the network N.

【0021】共有RAM25は、通信ユニット2のMP
U21だけでなく、CPUユニット1のMPU11がシ
ステムバス3を介しアクセス可能で、MPU11がネッ
トワークN上に送信すべき接点情報のデータやコマンド
等を書き込んだり、あるいは通信ユニット2がネットワ
ークN上から取り込んだ接点情報のデータやレスポンス
等を読出せるようにマルチポート、あるいはシングルポ
ートでMPU11とMPU21とのアクセスをバスアー
ビトレーションするように構成されている。
The shared RAM 25 is an MP of the communication unit 2.
Not only U21, but also the MPU 11 of the CPU unit 1 can access via the system bus 3, and the MPU 11 writes contact information data and commands to be transmitted on the network N, or the communication unit 2 fetches from the network N. In order to read the data of the contact information, the response, etc., the access between the MPU 11 and MPU 21 is configured to be bus arbitrated by the multiport or single port.

【0022】尚、この図では、図示していないが、この
通信ネットワークN上には、以上のように構成された他
のプログラマブルコントローラが複数台接続されてお
り、ネットワークNを介した通信によりこのプログラマ
ブルAとの間で共有接点情報を共有するように構成され
ている。
Although not shown in the figure, a plurality of other programmable controllers configured as described above are connected to the communication network N, and communication is performed through the network N to establish communication. The shared contact information is shared with the programmable A.

【0023】図2は、各ユーザプログラムメモリ15a
〜15cに格納される独自接点および共有接点ユーザプ
ログラムのメモリマップを示している。
FIG. 2 shows each user program memory 15a.
15C shows a memory map of the unique contact and shared contact user programs stored in 15c.

【0024】このメモリマップMに示すように、各ユー
ザプログラムメモリ15a〜15cに格納されるユーザ
プログラムには、そのプログラム格納エリアの先頭アド
レスが割り当てられている。
As shown in the memory map M, the user program stored in each of the user program memories 15a to 15c is assigned the top address of the program storage area.

【0025】具体的には、ユーザプログラムメモリ15
aに格納される独自接点ユーザプログラムには、先頭ア
ドレス1が割り当てられ、ユーザプログラムメモリ15
bに格納される共有接点ユーザプログラム1には、先頭
アドレス2が割り当てられ、ユーザプログラムメモリ1
5cに格納される共有接点ユーザプログラム2には、先
頭アドレス3が割り当てられる。
Specifically, the user program memory 15
The start address 1 is assigned to the unique contact user program stored in a, and the user program memory 15
The head address 2 is assigned to the shared contact user program 1 stored in b and the user program memory 1
A head address 3 is assigned to the shared contact user program 2 stored in 5c.

【0026】尚、このメモリマップMでは、まだ他に共
有接点ユーザプログラムがあれば、同様に先頭アドレス
がnまで割り当てられることを示している。
Incidentally, this memory map M shows that if there are still other shared contact user programs, the leading addresses up to n are similarly assigned.

【0027】図3は、CPUユニット11におけるユー
ザプログラム管理テーブルを示している。
FIG. 3 shows a user program management table in the CPU unit 11.

【0028】このユーザプログラム管理テーブルT1
は、プログラミングツール等によってユーザプログラム
メモリ15a〜15cに格納すべきユーザプログラムを
作成する際に同時に作成されるもので、図2に示すメモ
リマップMを参照して、各ユーザプログラムの先頭アド
レス1〜nを格納して構成されており、MPU11内あ
るいはワークRAM13等に格納しておくものである。
This user program management table T1
Are created at the same time when a user program to be stored in the user program memories 15a to 15c is created by a programming tool or the like. Referring to the memory map M shown in FIG. n is stored and is stored in the MPU 11 or the work RAM 13 or the like.

【0029】次に、以上のように構成されたプログラマ
ブルコントローラにおけるユーザプログラム実行処理を
説明する。
Next, a user program execution process in the programmable controller configured as above will be described.

【0030】図4に、このプログラマブルコントローラ
の全体の処理を示す。
FIG. 4 shows the overall processing of this programmable controller.

【0031】このプログラマブルコントローラAでは、
まず、MPU11が一般的な初期処理を行い(ステップ
100)、続いてネットワークNの通信を介した共有接
点情報を使用しない、すなわちこのプログラマブルコン
トローラA独自で他のプログラマブルコントローラとは
関係のない独自接点情報を使用して、ユーザプログラム
メモリ15aに格納された独自接点ユーザプログラムを
実行する後述の独自接点処理を行い(ステップ20
0)、ネットワークNを介し他のプログラマブルコント
ローラから共有接点情報等を含む各種コマンドやレスポ
ンスが送られてくるまで(ステップ300“No”)、
この独自接点処理(ステップ200)を繰り返すように
する。
In this programmable controller A,
First, the MPU 11 performs general initial processing (step 100), and subsequently does not use the shared contact information via the communication of the network N, that is, this programmable controller A is a unique contact that is independent of other programmable controllers. The information is used to perform the unique contact processing described later that executes the unique contact user program stored in the user program memory 15a (step 20).
0) until various commands and responses including shared contact information are sent from another programmable controller via the network N (step 300 “No”),
This unique contact processing (step 200) is repeated.

【0032】そして、この独自接点処理中にネットワー
クNを介し他のプログラマブルコントローラから共有接
点情報を含む各種コマンドやレスポンスが送られてきた
場合には(ステップ300“Yes”)、通信ユニット
2の通信コントローラ26がそれを受信して、システム
バスインタフェース24を介し共有RAM25に書き込
み、通信ユニット2のMPU21等がシステムバス3を
介してCPUユニット1に対し他のプログラマブルコン
トローラからコマンドやレスポンスの受信があったこと
を割り込みにより通知する(ステップ400)。
When various commands and responses including shared contact information are sent from another programmable controller via the network N during this unique contact processing (step 300 "Yes"), the communication of the communication unit 2 is performed. The controller 26 receives it, writes it in the shared RAM 25 via the system bus interface 24, and the MPU 21 or the like of the communication unit 2 receives a command or response from another programmable controller to the CPU unit 1 via the system bus 3. This is notified by interruption (step 400).

【0033】CPUユニット1では、MPU11がシス
テムバスインタフェース14を介しその割込み通知を受
けて、上記独自接点処理をいったん中断し、システムバ
ス3を介し通信ユニット2の共有RAM25にアクセス
して、ネットワークNを介して他のプログラマブルコン
トローラから通信されてきたコマンドやレスポンスを共
有RAM25からワークRAM13に書込み、かつ、解
析して、その受信したコマンドやレスポンスに共有接点
情報が含まれているか否かを判断する(ステップ50
0)。
In the CPU unit 1, the MPU 11 receives the interrupt notification via the system bus interface 14, temporarily interrupts the above-mentioned unique contact processing, and accesses the shared RAM 25 of the communication unit 2 via the system bus 3 to access the network N. A command or response communicated from another programmable controller via the shared RAM 25 is written to the work RAM 13 and analyzed to determine whether the received command or response includes shared contact information. (Step 50
0).

【0034】ここで、ネットワークNを介し他のプログ
ラマブルコントローラから受信したコマンドやレスポン
スに共有接点情報が含まれていない場合には(ステップ
500“No”)、その割込み処理を終了して、上記ス
テップ200の独自接点処理を継続して実行する一方、
その受信したコマンドやレスポンスに共有接点情報が含
まれている場合には(ステップ500“Yes”)、そ
の共有接点情報等を使用してユーザプログラムメモリ1
5b,15cに格納された共有接点ユーザプログラムを
実行する後述の共有接点処理を行い(ステップ60
0)、その共有接点処理の終了後は上記ステップ200
の独自接点処理に戻る。
Here, if the shared contact information is not included in the command or response received from another programmable controller via the network N (step 500 "No"), the interrupt processing is terminated and the above step is executed. While continuing to carry out 200 unique contact processing,
When the received command or response includes the shared contact information (step 500 “Yes”), the user program memory 1 is used by using the shared contact information or the like.
The shared contact processing described below is executed to execute the shared contact user program stored in 5b and 15c (step 60).
0), and after the shared contact processing is completed, the above step 200
Return to the original contact processing of.

【0035】次に、図4におけるステップ200の独自
接点処理を図面を参照して詳細に説明する。
Next, the unique contact processing of step 200 in FIG. 4 will be described in detail with reference to the drawings.

【0036】図5に、図4におけるステップ200の独
自接点処理を示す。
FIG. 5 shows the unique contact processing of step 200 in FIG.

【0037】この独自接点処理では、MPU11が、ま
ず、ユーザプログラムメモリ15aに格納された独自接
点を使用する独自接点ユーザプログラムを読出して実行
すると共に(ステップ210)、その独自接点ユーザプ
ログラム実行中にネットワークNを介し他のプログラマ
ブルコントローラへ共有接点読出しコマンドの送信を指
示するN_READ命令を実行したか否かを判断する
(ステップ220)。
In this unique contact processing, the MPU 11 first reads and executes the unique contact user program using the unique contact stored in the user program memory 15a (step 210), and during execution of the unique contact user program. It is determined whether or not the N_READ command for instructing the transmission of the shared contact read command to the other programmable controller via the network N has been executed (step 220).

【0038】ここで、N_READ命令を実行したもの
と判断した場合には、その独自接点ユーザプログラムの
1スキャン分実行終了後、周辺処理の1つの処理として
共有接点読出しコマンドをネットワークNを介し当該他
のプログラマブルコントローラに送信し(ステップ23
0)、その共有接点読出しコマンドの送信後、データの
入出力処理等の他の周辺処理を行い(ステップ24
0)、その周辺処理の終了後、独自接点ユーザプログラ
ムの実行処理(ステップ210)に戻って以上の処理を
サイクリックに繰り返すようにする。
If it is determined that the N_READ command has been executed, after the execution of one scan of the unique contact user program is completed, a shared contact read command is issued via the network N as one of the peripheral processing. To the programmable controller (step 23
0), after the shared contact read command is transmitted, other peripheral processing such as data input / output processing is performed (step 24).
0) After the peripheral processing is completed, the processing returns to the processing for executing the unique contact user program (step 210) and the above processing is cyclically repeated.

【0039】図6に、図5におけるステップ230の共
有接点読出しコマンドの送信処理を詳細に示す。
FIG. 6 shows in detail the transmission processing of the shared contact read command of step 230 in FIG.

【0040】この第1実施例では、ネットワークNを介
した他のプログラマブルコントローラへの共有接点読出
しコマンドの送信を、上述の通り独自接点ユーザプログ
ラム内に記述されたN_READ命令の実行により行う
ようにしている。
In the first embodiment, the shared contact read command is transmitted to another programmable controller via the network N by executing the N_READ command described in the unique contact user program as described above. There is.

【0041】また、本実施例では、共有接点情報はプロ
グラマブルコントローラAのチャネル単位で通信するた
め、このN_READ命令には、この命令の送信相手と
なる相手プログラマブルコントローラのネットワークア
ドレスや、通信ポート番号(複数のプログラマブルコン
トローラに同時に共有接点読出しコマンドを送信する場
合には、そのレスポンスを区別するための識別子とな
る。)、共有接点読出しレスポンスを受信したときに起
動する共有接点ユーザプログラムのプログラム番号、相
手プログラマブルコントローラにおける共有接点情報の
開始チャネル、相手プログラマブルコントローラから受
信した共有接点情報等を格納するエリアの開始チャネ
ル、および受信を要求するチャネル数等のパラメータを
記述するようにする。
Further, in this embodiment, since the shared contact information is communicated in units of channels of the programmable controller A, the N_READ command includes the network address of the partner programmable controller to which the command is transmitted and the communication port number ( When sending a shared contact read command to multiple programmable controllers at the same time, this is an identifier for distinguishing the responses.), The program number of the shared contact user program that is started when the shared contact read response is received, the other party Parameters such as the start channel of shared contact information in the programmable controller, the start channel of the area for storing the shared contact information received from the partner programmable controller, and the number of channels requested to be received are described.

【0042】送信処理の動作を説明すると、MPU11
は、N_READ命令の実行により、まず、そのN_R
EAD命令の上記パラメータから相手プログラマブルコ
ントローラのネットワークアドレスを取り出し、送信す
べき共有接点読出しコマンドにセットすると共に(ステ
ップ231)、自プログラマブルコントローラのネット
ワークアドレスも共有接点読出しコマンドにセットし
(ステップ232)、さらにコマンドコードをセットす
る(ステップ233)。
The operation of the transmission process will be described below.
Is executed by executing the N_READ instruction.
The network address of the partner programmable controller is taken out from the above parameters of the EAD command and set to the shared contact read command to be transmitted (step 231), and the network address of the own programmable controller is also set to the shared contact read command (step 232). Further, a command code is set (step 233).

【0043】次に、そのパラメータから通信ポート番号
を取り出し、送信すべき共有接点読出しコマンドにセッ
トすると共に(ステップ234)、そのパラメータから
受信しようとする相手プログラマブルコントローラにお
ける共有接点情報の開始チャネルを取り出して共有接点
読出しコマンドにセットし(ステップ235)、さらに
そのパラメータに記述された受信要求チャネル数をその
共有接点読出しコマンドにセットして(ステップ23
6)、指定ポートを用い上記のようにN_READ命令
の各種パラメータがセットされた共有接点読出しコマン
ドを送信する(ステップ237)。
Next, the communication port number is extracted from the parameter and set in the shared contact read command to be transmitted (step 234), and the start channel of the shared contact information in the partner programmable controller to be received is extracted from the parameter. Set to the shared contact read command (step 235), and the number of reception request channels described in the parameter is set to the shared contact read command (step 23).
6) Send the shared contact read command in which the various parameters of the N_READ command are set using the designated port (step 237).

【0044】その後、N_READ命令のパラメータか
ら当該共有接点読出しコマンドに対するレスポンスを受
信したときに起動する共有接点ユーザプログラムのプロ
グラム番号を取り出し、そのプログラム番号を図2に示
すメモリマップM、および図3に示すユーザプログラム
管理テーブルT1を参照して各ユーザプログラムの先頭
アドレスに変換して、後述する図8に示す通信ポート情
報テーブルT2にセットすると共に(ステップ23
8)、そのパラメータから相手プログラマブルコントロ
ーラの接点情報格納エリア開始チャネルを取り出しその
通信ポート情報テーブルT2にセットして(ステップ2
39)、このN_READ命令の実行による共有接点読
出しコマンド送信処理が終了する。
After that, the program number of the shared contact user program which is activated when the response to the shared contact read command is received is taken out from the parameter of the N_READ command, and the program number is shown in the memory map M shown in FIG. 2 and in FIG. With reference to the user program management table T1 shown in the table, it is converted into the head address of each user program and set in the communication port information table T2 shown in FIG.
8) Then, the contact information storage area start channel of the partner programmable controller is taken out from the parameter and set in the communication port information table T2 (step 2).
39), the shared contact read command transmission process by the execution of this N_READ command ends.

【0045】図7に、図6に示すN_READ命令の処
理によって送信される共有接点読出しコマンドのフォー
マットを示す。
FIG. 7 shows the format of the shared contact read command transmitted by the processing of the N_READ command shown in FIG.

【0046】この共有接点読出しコマンドC1は、上記
図6に示す処理により、相手プログラマブルコントロー
ラのネットワークアドレス、自プログラムコントローラ
のネットワークアドレス、コマンド/レスポンスコー
ド、通信ポート番号、受信しようとする相手プログラマ
ブルコントローラからの共有接点情報の開始チャネル、
および受信を要求するチャネル数がセットされて送信さ
れることになる。
The shared contact read command C1 is transmitted from the partner programmable controller network address, the self program controller network address, the command / response code, the communication port number, and the partner programmable controller to be received by the processing shown in FIG. Start channel for shared contact information,
And the number of channels requesting reception is set and transmitted.

【0047】図8は、図6に示すステップ238,23
9の処理で作成される通信ポート情報テーブルT2を示
している。
FIG. 8 shows steps 238 and 23 shown in FIG.
9 shows a communication port information table T2 created by the processing of No. 9.

【0048】この通信ポート情報テーブルT2には、図
に示すように、通信ポート毎にそのポート番号0〜m
(mは自然数)に対応させて、共有接点読出しコマンド
を送信した相手プログラマブルコントローラからの共有
接点読出しレスポンスを受信した際に起動する共有接点
ユーザプログラムの先頭アドレス、および相手プログラ
マブルコントローラからの共有接点情報の格納エリアの
開始チャネルが格納されている。
In this communication port information table T2, as shown in the figure, the port numbers 0 to m are set for each communication port.
Corresponding to (m is a natural number), the start address of the shared contact user program that is activated when the shared contact read response from the partner programmable controller that sent the shared contact read command is received, and the shared contact information from the partner programmable controller. The start channel of the storage area of is stored.

【0049】従って、この通信ポート情報テーブルT2
に示すように、共有接点読出しコマンドC1(図7参
照)および後述する構成の共有接点読出しレスポンスR
1(図10参照)にも含まれている通信ポート番号と、
共有接点読出しレスポンスを受信した際に起動する共有
接点ユーザプログラムの先頭アドレスとが対応してお
り、かつ、各ユーザプログラムの先頭アドレスがメモリ
マップM(図2参照)により対応しているので、この通
信ポート番号が、共有接点情報を使用する共有接点ユー
ザプログラムを指示するプログラム指示情報ということ
になる。
Therefore, this communication port information table T2
, A shared contact read command C1 (see FIG. 7) and a shared contact read response R having a configuration described later.
1 (see FIG. 10) and the communication port number,
Since the start address of the shared contact user program that is activated when the shared contact read response is received and the start address of each user program correspond by the memory map M (see FIG. 2), The communication port number is the program instruction information for instructing the shared contact user program that uses the shared contact information.

【0050】なお、本実施例では、このように通信ポー
ト番号をプログラム指示情報として使用しているが、共
有接点ユーザプログラムのプログラム番号をプログラム
指示情報として直接使用して、共有接点読出しコマンド
C1や共有接点読出しレスポンスR1に通信ポート番号
と共に、あるいは通信ポート番号の代わりに共有接点ユ
ーザプログラムのプログラム番号をセットするようにし
ても良い。
Although the communication port number is used as the program instruction information in this embodiment, the program number of the shared contact user program is directly used as the program instruction information, and the shared contact read command C1 or The program number of the shared contact user program may be set in the shared contact read response R1 together with the communication port number or instead of the communication port number.

【0051】次に、共有接点読出しコマンドを受信した
相手プログラマブルコントローラ側における共有接点情
報の送信処理等を説明する。
Next, the process of transmitting shared contact information on the partner programmable controller side that has received the shared contact read command will be described.

【0052】図9に、共有接点読出しコマンドを受信し
た相手プログラマブルコントローラ側における共有接点
情報の送信処理を示す。
FIG. 9 shows a process of transmitting shared contact information on the partner programmable controller side that has received the shared contact read command.

【0053】共有接点読出しコマンドを受けた相手プロ
グラマブルコントローラでは、まず、その共有接点読出
しコマンドから当該要求元プログラマブルコントローラ
のネットワークアドレスを取り出して、共有接点読出し
レスポンスの相手プログラマブルコントローラのネット
ワークアドレスにセットすると共に(ステップ70
0)、続いてその自プログラマブルコントローラのネッ
トワークアドレスを共有接点読出しレスポンスにセット
し(ステップ710)、レスポンスコードをセットする
(ステップ7220)。
Upon receiving the shared contact read command, the partner programmable controller first takes out the network address of the request source programmable controller from the shared contact read command and sets it in the network address of the partner programmable controller of the shared contact read response. (Step 70
0), followed by setting the network address of its own programmable controller in the shared contact read response (step 710) and the response code (step 7220).

【0054】次いで、その共有接点読出しコマンド内の
通信ポート番号を、そのまま共有接点読出しレスポンス
にセットし(ステップ740)、さらに受信側の相手プ
ログラマブルコントローラの接点情報開始チャネルと、
受信要求チャネル数とを取り出し、そのチャネルより要
求チャネル数分の接点情報を読出して、その読出したチ
ャネル数と共に共有接点読出しレスポンスにセットして
(ステップ750)、その共有接点読出しレスポンスを
送信し(ステップ760)、この処理を終了する。
Next, the communication port number in the shared contact read command is set as it is in the shared contact read response (step 740), and the contact information start channel of the partner programmable controller on the receiving side is set.
The number of reception request channels is taken out, contact information corresponding to the number of request channels is read from the channels, the shared contact read response is set together with the read channel number (step 750), and the shared contact read response is transmitted ( Step 760), the process ends.

【0055】図10に、図9の処理により共有接点読出
しコマンドを送信してきたプログラマブルコントローラ
に返送される共有接点読出しレスポンスのフォーマット
を示す。
FIG. 10 shows the format of the shared contact read response returned to the programmable controller that has transmitted the shared contact read command by the processing of FIG.

【0056】共有接点読出しレスポンスR1は、図に示
すように、共有接点読出しコマンドの送信元である相手
プログラマブルコントローラのネットワークアドレス、
共有接点読出しコマンドの受信側である自プログラマブ
ルコントローラのネットワークアドレス、コマンド/レ
スポンスコード、通信ポート番号、読出した共有接点情
報のチャネル数、および読出した共有接点情報から構成
されて送信される。
The shared contact read response R1 is, as shown in the figure, the network address of the partner programmable controller which is the source of the shared contact read command,
The shared contact read command is composed of the network address of its own programmable controller which is the receiving side, the command / response code, the communication port number, the number of channels of the read shared contact information, and the read shared contact information, and is transmitted.

【0057】次に、図4におけるステップ600の共有
接点処理を詳細に説明する。
Next, the shared contact process of step 600 in FIG. 4 will be described in detail.

【0058】図11に、図4におけるステップ600の
共有接点処理を詳細に示す。
FIG. 11 shows the shared contact processing of step 600 in FIG. 4 in detail.

【0059】この図11に示す共有接点処理は、独自接
点処理中、すなわち独自接点ユーザプログラム中のN_
READ命令の実行により共有接点読出しコマンドを送
信したプログラマブルコントローラが、その共有接点読
出しレスポンスを受信した場合の処理を示している。
The shared contact process shown in FIG. 11 is during the unique contact process, that is, N_in the unique contact user program.
It shows the processing when the programmable controller that has transmitted the shared contact read command by executing the READ command receives the shared contact read response.

【0060】具体的には、MPU11は、相手プログラ
ムコントローラからネットワークNを介して共有接点読
出しレスポンスを受信すると、まずは、図8に示す通信
ポート情報テーブルT2から通信ポート番号に対応する
相手プログラマブルコントローラの共有接点情報格納エ
リアの開始チャネルを検索して、そのチャネルを介し受
信した共有接点読出しレスポンスに含まれている共有接
点情報を読出して(ステップ610)、さらに独自接点
ユーザプログラムの実行中か否かを判断する(ステップ
620)。
Specifically, when the MPU 11 receives the shared contact read response from the partner program controller via the network N, first, the MPU 11 selects the partner programmable controller corresponding to the communication port number from the communication port information table T2 shown in FIG. The start channel of the shared contact information storage area is searched, the shared contact information included in the shared contact read response received via that channel is read (step 610), and whether or not the unique contact user program is being executed. Is determined (step 620).

【0061】ここで、独自接点ユーザプログラムの実行
中である場合には(ステップ620“Yes”)、その
独自接点ユーザプログラムの実行を中断して(ステップ
630)、さらにその中断した独自接点ユーザプログラ
ムの実行情報をワークRAM13等の任意の退避エリア
に退避させる(ステップ640)。
If the unique contact user program is being executed (step 620 "Yes"), the execution of the unique contact user program is interrupted (step 630), and the interrupted unique contact user program is further interrupted. The execution information of is saved in an arbitrary save area such as the work RAM 13 (step 640).

【0062】そして、通信ポート情報テーブルT2よ
り、通信ポート番号に対応する共有接点ユーザプログラ
ムの先頭アドレスを取り出し、そのプログラム中にEN
D命令を発見するまで上記送信してきた共有接点情報を
使用してその共有接点ユーザプログラムを実行し続け
(ステップ650)、その共有接点ユーザプログラムの
実行終了後、割込により独自接点ユーザプログラム等の
実行を中断していたか否かを判断し(ステップ66
0)、独自接点ユーザプログラムの実行を中断していた
場合のみ(ステップ660“Yes”)、ワークRAM
13等に退避させていたその実行情報を復帰させ(ステ
ップ670)、中断していた独自接点ユーザプログラム
の実行を再開させて(ステップ680)、以上の共有接
点処理を終了する。
Then, the head address of the shared contact user program corresponding to the communication port number is fetched from the communication port information table T2, and the EN is entered in the program.
Until the D command is found, the shared contact user program that has been transmitted is continuously used to execute the shared contact user program (step 650), and after the execution of the shared contact user program, the unique contact user program or the like is interrupted. It is determined whether the execution is suspended (step 66).
0), only when the execution of the unique contact user program is interrupted (step 660 “Yes”), work RAM
The execution information saved in 13 or the like is restored (step 670), the suspended unique contact user program is resumed (step 680), and the above shared contact processing is ended.

【0063】尚、共有接点ユーザプログラムの実行終了
後、実行を中断していた他の共有接点ユーザプログラム
がある場合、すなわち異なる共有接点ユーザプログラム
に共有接点情報が連続して入力していた場合には、中断
していた他の共有接点ユーザプログラムも同様にして実
行を再開させ、その後に実行を中断していた独自接点ユ
ーザプログラムの実行を再開させるようにする。
When there is another shared contact user program whose execution is interrupted after the execution of the shared contact user program, that is, when the shared contact information is continuously input to different shared contact user programs. Causes the other shared contact user program that has been suspended to resume execution in the same manner, and then resumes the execution of the unique contact user program that has suspended execution.

【0064】次に、本実施例における独自接点ユーザプ
ログラムおよび共有接点ユーザプログラムの具体例を説
明する。
Specific examples of the unique contact user program and the shared contact user program in this embodiment will be described below.

【0065】図12に、上記第1実施例のプログラマブ
ルコントローラにより構成されたPCシステム全体を示
す。
FIG. 12 shows the entire PC system constituted by the programmable controller of the first embodiment.

【0066】このPCシステムでは、図に示すように、
本実施例に係る3台のプログラマブルコントローラPC
(A)〜(C)がネットワークNを介して構成されてお
り、各々が、図1に示すような構成を有している。
In this PC system, as shown in the figure,
Three programmable controller PCs according to this embodiment
(A) to (C) are configured via the network N, and each has a configuration as shown in FIG.

【0067】このシステムでは、ネットワークNを介し
た共有接点情報等のデータの読出しは、上述の通りチャ
ネル単位で行われているため、PC(A)は、接点A1
〜A4のチャネルA、PC(B)は、接点B1,B2の
チャネルB、PC(C)は、接点C1,C2のチャネル
Cとして指定するものとする。なお、PC(A)〜
(C)は、内部接点エリアとしてチャネルX,Yを有し
ており、通常接点としてチャネルX1,X2,・・・・
や、Y1,Y2,・・・をユーザプログラムの実行に利
用できるように構成されている。
In this system, since the reading of data such as shared contact information via the network N is performed for each channel as described above, the PC (A) is connected to the contact A1.
Channel A and PC (B) of ~ A4 are designated as channel B of contacts B1 and B2, and PC (C) is designated as channel C of contacts C1 and C2. In addition, PC (A) ~
(C) has channels X and Y as internal contact areas, and channels X1, X2, ...
, Y1, Y2, ... Can be used to execute the user program.

【0068】ここでは、PC(A)は、入力接点A1が
ONになると、PC(B)の入力接点B1,B2をネッ
トワークNを介して読出し、入力接点B1,B2の双方
がONの場合にその出力接点A3をONにし、入力接点
A2がONになると、PC(C)の入力接点C1,C2
をネットワークNを介して読出し、入力接点C1,C2
の双方がONの場合にその出力接点A4をONにする、
というアプリケーション処理を想定している。
Here, when the input contact A1 is turned on, the PC (A) reads the input contacts B1 and B2 of the PC (B) through the network N, and when both the input contacts B1 and B2 are turned on. When the output contact A3 is turned on and the input contact A2 is turned on, the input contacts C1 and C2 of the PC (C) are turned on.
Is read out via the network N and input contacts C1, C2
When both are ON, the output contact A4 is turned ON,
The application processing is called.

【0069】図13(a)〜(c)に、上記アプリケー
ション処理を想定した場合のPLC(A)におけるラダ
ー言語で記述したユーザプログラムの具体例を示す。
FIGS. 13A to 13C show specific examples of user programs written in the ladder language in PLC (A) assuming the above application processing.

【0070】(a)は、図1に示す本実施例の構成で
は、ユーザプログラムメモリ15aに格納される独自接
点ユーザプログラムを示している。
In the configuration of this embodiment shown in FIG. 1, (a) shows the unique contact user program stored in the user program memory 15a.

【0071】具体的には、この独自接点ユーザプログラ
ムP1は、接点A1がONになると、通信ポート0番を
使用して、PC(B)のチャネルBより共有接点情報を
読出し、その共有接点情報を含むレスポンスが返送され
ると、チャネルXに書き込んだ後、ユーザプログラムメ
モリ15bに格納された共有接点ユーザプログラムP2
を読出して起動する。次いで、接点A2がONになる
と、通信ポート1番を使用して、PC(C)のチャネル
Cより共有接点情報を読出し、その共有接点情報を含む
レスポンスが返送されると、チャネルYに書き込んだ
後、ユーザプログラムメモリ15cに格納された他の共
有接点ユーザプログラムP3を読出し起動する、という
プログラムを示している。
Specifically, when the contact A1 is turned on, the unique contact user program P1 reads the shared contact information from the channel B of the PC (B) using the communication port 0, and the shared contact information. When a response including is sent back, the shared contact user program P2 stored in the user program memory 15b after being written in the channel X
To read and start. Next, when the contact A2 is turned on, the shared contact information is read from the channel C of the PC (C) using the communication port No. 1, and when the response including the shared contact information is returned, it is written in the channel Y. After that, another shared contact user program P3 stored in the user program memory 15c is read and activated.

【0072】(b)は、ユーザプログラムメモリ15b
に格納される共有接点ユーザプログラムP2を示してお
り、具体的には、接点X1とX2とが共にONのとき、
接点A3をONにする、というプログラムを示してい
る。
(B) is the user program memory 15b
Shows a shared contact user program P2 stored in, specifically, when both contacts X1 and X2 are ON,
A program for turning on the contact A3 is shown.

【0073】(c)は、ユーザプログラムメモリ15c
に格納される共有接点ユーザプログラムP3を示してお
り、具体的には、接点Y1とY2とが共にONのとき、
接点A4をONにする、というプログラムを示してい
る。
(C) is a user program memory 15c
Shows a shared contact user program P3 stored in, specifically, when both contacts Y1 and Y2 are ON,
A program for turning on the contact A4 is shown.

【0074】よって、以上説明した本実施例における命
令実行やコマンド/レスポンス処理を行うことにより、
この図13(a)〜(c)に示すユーザプログラムを処
理すれば、独自接点ユーザプログラムP1中の第1のN
_READ命令を実行することによって、ネットワーク
Nを介した共有接点情報を受信した後、その共有接点情
報を使用して共有接点ユーザプログラムP2が実行され
る一方、独自接点ユーザプログラムP1中の第2のN_
READ命令を実行することによって、ネットワークN
を介した共有接点情報を受信した後、その共有接点情報
を使用して共有接点ユーザプログラムP2が実行される
ことになる。
Therefore, by executing the command execution and the command / response processing in this embodiment described above,
By processing the user programs shown in FIGS. 13A to 13C, the first N in the unique contact user program P1 is processed.
After receiving the shared contact information via the network N by executing the _READ command, the shared contact user program P2 is executed using the shared contact information, while the second contact in the unique contact user program P1 is executed. N_
By executing the READ command, the network N
After receiving the shared contact information via the shared contact information, the shared contact user program P2 is executed using the shared contact information.

【0075】従って、本実施例によれば、ユーザプログ
ラムを共有接点ユーザプログラムと、独自接点ユーザプ
ログラムとに分けて格納し、通常はネットワークNを介
した通信と関係のない独自接点ユーザプログラムのみが
実行される一方、共有接点情報がネットワークを介して
送信されてきた場合には、割込みによってその共有接点
情報を使用して共有接点ユーザプログラムが実行される
ので、共有接点ユーザプログラムと独自接点ユーザプロ
グラムとが混在して1つになっていた従来のプログラマ
ブルコントローラと比較して、ユーザプログラムの実行
が接点情報の変化に対しリアルタイムで追従することが
可能になる。
Therefore, according to this embodiment, the user program is divided into the shared contact user program and the unique contact user program and stored, and normally only the unique contact user program unrelated to the communication via the network N is stored. On the other hand, when the shared contact information is transmitted through the network, the shared contact user program is executed using the shared contact information by the interrupt, so the shared contact user program and the unique contact user program are executed. It becomes possible for the execution of the user program to follow the change of the contact information in real time, as compared with the conventional programmable controller in which and are mixed together into one.

【0076】また、ネットワークを介し他のプログラマ
ブルコントローラから共有接点情報が送られてきない場
合には、共有接点ユーザプログラムを実行しないため、
このような場合でも共有接点ユーザプログラムと独自接
点ユーザプログラムとが混在して1つになっている共有
接点ユーザプログラムを実行してしまう従来のプログラ
マブルコントローラと比較して、サイクルタイムを短縮
化できることになる。
If shared contact information is not sent from another programmable controller via the network, the shared contact user program is not executed.
Even in such a case, the cycle time can be shortened as compared with the conventional programmable controller that executes the shared contact user program in which the shared contact user program and the unique contact user program are mixed and integrated into one. Become.

【0077】さらに、本実施例では、プログラマブルコ
ントローラAが複数の共有接点ユーザプログラムを有
し、通信ポートに対応させて各共有接点ユーザプログラ
ムを実行するようにしており、かつ、相手プログラマブ
ルコントローラから送信されてくる共有接点読出しレス
ポンスには、共有接点情報だけでなく、その共有接点情
報を使用する共有接点ユーザプログラムに対応させた通
信ポート番号を含めるようにしたので、共有接点読出し
レスポンスを受信したプログラマブルコントローラで
は、その共有接点読出しレスポンスに含まれている共有
接点情報を使用して、複数の共有接点ユーザプログラム
の中からその通信ポート番号に対応した共有接点ユーザ
プログラムを選択して実行でき、共有接点処理の応用性
および弾力性が向上する。
Further, in this embodiment, the programmable controller A has a plurality of shared contact user programs, executes each shared contact user program corresponding to the communication port, and transmits from the partner programmable controller. The shared contact read response that is sent includes not only the shared contact information but also the communication port number corresponding to the shared contact user program that uses the shared contact information. The controller can select and execute the shared contact user program corresponding to the communication port number from multiple shared contact user programs by using the shared contact information included in the shared contact read response. Improves processing applicability and elasticity .

【0078】次に、本発明に係るプログラマブルコント
ローラの第2実施例を説明する。
Next, a second embodiment of the programmable controller according to the present invention will be described.

【0079】この第2実施例のプログラマブルコントロ
ーラでは、ハード構成等は図1に示す上記第1実施例と
ほぼ同じだが、この第2実施例では、上記第1実施例と
は異なり、共有接点ユーザプログラムを実行するプログ
ラマブルコントローラ側で共有接点ユーザプログラムを
所有する必要がなく、図1に示す第1実施例の構成にお
いて、独自接点ユーザプログラムを格納したユーザプロ
グラムメモリ15aのみを有し、共有接点ユーザプログ
ラムを格納したユーザプログラムメモリ15b,15c
を有していないことを特徴としている。
The programmable controller of the second embodiment has almost the same hardware configuration as that of the first embodiment shown in FIG. 1, but the second embodiment differs from the first embodiment in that the shared contact user. The programmable controller side that executes the program does not need to own the shared contact user program, and in the configuration of the first embodiment shown in FIG. 1, it has only the user program memory 15a storing the unique contact user program, User program memories 15b and 15c storing programs
It is characterized by not having.

【0080】つまり、この第2実施例のプログラマブル
コントローラは、上記第1実施例とは異なり、N_RE
AD命令の実行により他のプログラマブルコントローラ
へ共有接点読出しコマンドの送信、および当該プログラ
マブルコントローラから共有接点読出しレスポンスの受
信により共有接点ユーザプログラムを実行するのではな
く、他のプログラマブルコントローラによるN_WRI
TE命令の実行により、ネットワークを介した当該他の
プログラマブルコントローラからの共有接点情報、およ
び当該共有接点情報を使用して実行すべき共有接点ユー
ザプログラムを含む共有接点書込みコマンドの受信によ
り、共有接点ユーザプログラムの実行処理を行うことを
特徴としている。
That is, unlike the first embodiment, the programmable controller of the second embodiment has N_RE.
Instead of executing a shared contact read command to another programmable controller by executing the AD instruction and receiving a shared contact read response from the programmable controller, the shared contact user program is not executed, but N_WRI by another programmable controller.
The shared contact user receives the shared contact information from the other programmable controller via the network by executing the TE command, and the shared contact write command including the shared contact user program to be executed using the shared contact information. The feature is that the program is executed.

【0081】従って、N_WRITE命令は、上述のよ
うにユーザプログラム中に記述されるが、上記第1実施
例と同様に、その命令と共に、この命令の送信となる相
手プログラマブルコントローラのネットワークアドレス
や、通信ポート番号(複数のプログラマブルコントロー
ラに同時に共有接点読出しコマンドを送信する場合に
は、そのレスポンスを区別するための識別子とな
る。)、この命令に基づく共有接点書込みコマンドを受
信した相手プログラマブルコントローラ側で実行させる
共有接点ユーザプログラムのプログラム番号、書込むべ
き自プログラマブルコントローラにおける共有接点情報
の開始チャネル、相手プログラマブルコントローラにお
ける自プログラマブルコントローラからの共有接点情報
の格納エリア開始チャネル、および書込みを要求するチ
ャネル数、等のパラメータがユーザプログラム中に記述
されることになる。
Therefore, the N_WRITE command is described in the user program as described above, but like the first embodiment, the N_WRITE command is sent together with the command, the network address of the partner programmable controller to which this command is transmitted, and the communication. Executed on the partner programmable controller that received the shared contact write command based on this command, the port number (when sending shared contact read commands to multiple programmable controllers at the same time, this is an identifier for distinguishing the responses.) Program number of shared contact user program to be set, start channel of shared contact information in self programmable controller to be written, storage channel start channel of shared contact information from self programmable controller in partner programmable controller And the number of channels for requesting writing, parameters etc. is to be written in a user program.

【0082】図14に、この第2実施例における共有接
点書込みコマンドの送信処理を詳細に示す。
FIG. 14 shows in detail the process of transmitting the shared contact write command in the second embodiment.

【0083】この共有接点書込みコマンドを送信するプ
ログラマブルコントローラ側で、MPU等が独自接点ユ
ーザプログラム中のN_WRITE命令を実行すると、
まずは、そのN_WRITE命令の上記パラメータから
相手プログラマブルコントローラのネットワークアドレ
スを取り出し、送信すべき共有接点書込みコマンドにセ
ットすると共に(ステップ800)、自プログラマブル
コントローラのネットワークアドレスも共有接点書込み
コマンドにセットして(ステップ810)、さらにコマ
ンドコードをセットする(ステップ820)。
When the MPU or the like executes the N_WRITE command in the unique contact user program on the programmable controller side that transmits this shared contact write command,
First, the network address of the partner programmable controller is fetched from the above parameters of the N_WRITE command and set in the shared contact write command to be transmitted (step 800), and the network address of the own programmable controller is also set in the shared contact write command ( In step 810, a command code is set (step 820).

【0084】次に、そのパラメータから通信ポート番号
を取り出し、共有接点書込みコマンドにセットすると共
に(ステップ830)、そのパラメータから受信しよう
とする自プログラマブルコントローラにおける共有接点
情報格納エリアの開始チャネルを取り出して、その共有
接点書込みコマンドにセットし(ステップ840)、さ
らに書込み要求チャネル数も共有接点書込みコマンドに
セットする(ステップ850)。
Next, the communication port number is extracted from the parameter and set in the shared contact write command (step 830), and the start channel of the shared contact information storage area in the own programmable controller to be received is extracted from the parameter. , The shared contact write command is set (step 840), and the number of write request channels is also set in the shared contact write command (step 850).

【0085】次いで、さらにN_WRITE命令のパラ
メータから、書込もうとする自プログラマブルコントロ
ーラの共有接点情報の開始チャネルと、書込み要求チャ
ネル数とを取り出して、そのチャネルより指定チャネル
数分の共有接点情報を読出して、書込み要求チャネル数
と共に共有接点書込みコマンドにセットし(ステップ8
60)、さらにそのパラメータからユーザプログラム番
号を取り出し、メモリマップMやユーザプログラムアド
レス管理テーブルT1を参照してそのユーザプログラム
の先頭アドレスを検索し、その先頭アドレスのユーザプ
ログラムを共有接点書込みコマンドにコピーして(ステ
ップ870)、指定ポートを使用して以上のように設定
した共有接点書込みコマンドを通信相手プログラマブル
コントローラへ送信する(ステップ880)。
Then, from the parameters of the N_WRITE command, the start channel of the shared contact information of the own programmable controller to be written and the number of write request channels are taken out, and the shared contact information for the specified number of channels is extracted from that channel. Read and set the shared contact write command together with the number of write request channels (step 8
60) Further, the user program number is extracted from the parameter, the start address of the user program is searched by referring to the memory map M and the user program address management table T1, and the user program at the start address is copied to the shared contact write command. Then, (step 870), the shared contact write command set as above using the designated port is transmitted to the communication partner programmable controller (step 880).

【0086】図15は、図14におけるステップ880
の処理で送信される共有接点書込みコマンドのフォーマ
ットを示している。
FIG. 15 shows step 880 in FIG.
The format of the shared contact write command transmitted in the process of FIG.

【0087】この共有接点書込みコマンドC2は、上記
図14に示す処理によって、相手プログラマブルコント
ローラのネットワークアドレス、自プログラムコントロ
ーラのネットワークアドレス、コマンド/レスポンスコ
ード、通信ポート番号、自プログラマブルコントローラ
の共有接点情報を格納するエリアの開始チャネル、書込
みを要求するチャネル数、書込みを要求する共有接点情
報、およびその共有接点情報書込みを使用して実行され
る共有接点ユーザプログラム、から構成されることにな
る。
The shared contact write command C2 is obtained by the process shown in FIG. 14 by setting the network address of the partner programmable controller, the network address of the own program controller, the command / response code, the communication port number, and the shared contact information of the own programmable controller. It is composed of the start channel of the area to be stored, the number of channels for which writing is requested, shared contact information for which writing is requested, and a shared contact user program executed by using the shared contact information writing.

【0088】次に、共有接点書込みコマンドの受信側の
プログラマブルコントローラの処理について説明する。
Next, the processing of the programmable controller on the receiving side of the shared contact write command will be described.

【0089】図16に、共有接点書込みコマンドの受信
側のプログラマブルコントローラの処理を詳細に示す。
FIG. 16 shows in detail the processing of the programmable controller on the receiving side of the shared contact write command.

【0090】まず、図15に示すように構成された共有
接点書込みコマンドを受信したプログラマブルコントロ
ーラでは、その共有接点書込みコマンドから、書込み要
求チャネル数分の接点情報を読出し、要求された格納エ
リア開始チャネルより書込み(ステップ900)、次い
で独自接点等のユーザプログラムの実行中か否かを判断
する(ステップ910)。
First, in the programmable controller which has received the shared contact write command configured as shown in FIG. 15, the contact information for the number of write request channels is read from the shared contact write command, and the requested storage area start channel is read. More writing (step 900), and then it is determined whether or not a user program such as a unique contact is being executed (step 910).

【0091】ここで、独自接点等のユーザプログラムの
実行中であると判断した場合には(ステップ910“Y
es”)、そのユーザプログラムの実行を中断し(ステ
ップ920)、さらにその中断したユーザプログラムの
実行情報をワークRAM13等の任意のエリアに退避す
る(ステップ930)。
If it is determined that the user program such as the unique contact is being executed (step 910 "Y").
es "), the execution of the user program is interrupted (step 920), and the execution information of the interrupted user program is saved in an arbitrary area such as the work RAM 13 (step 930).

【0092】そして、そのネットワークを介して受信し
た共有接点書込みコマンド内に格納されている共有接点
情報と、共有接点ユーザプログラムとを読出してワーク
RAM13等に格納し、その読出した共有接点情報を用
いて同様に読出した共有接点ユーザプログラムを、その
ユーザプログラム中にEND命令を発見するまで実行し
続ける(ステップ940)。
Then, the shared contact information stored in the shared contact write command received via the network and the shared contact user program are read and stored in the work RAM 13 or the like, and the read shared contact information is used. The shared contact user program that has been similarly read out is continuously executed until the END instruction is found in the user program (step 940).

【0093】共有接点ユーザプログラムの実行終了後
は、共有接点書込みコマンドに対するレスポンスを要求
元に返送し(ステップ950)、続いてユーザプログラ
ムの実行を中断していたか否かを判断して(ステップ9
60)、独自接点等のユーザプログラムの実行を中断し
ていた場合のみ(ステップ960“Yes”)、ワーク
RAM13等に退避させていたその実行情報を復帰させ
(ステップ970)、その実行情報を復帰した後、中断
していた独自接点等のユーザプログラムの実行を再開さ
せて(ステップ680)、以上の処理を終了する。
After the execution of the shared contact user program, the response to the shared contact write command is returned to the request source (step 950), and then it is judged whether or not the execution of the user program was interrupted (step 9).
60), only when the execution of the user program such as the original contact is interrupted (step 960 “Yes”), the execution information saved in the work RAM 13 or the like is restored (step 970) and the execution information is restored. After that, the execution of the interrupted user program such as the unique contact is restarted (step 680), and the above processing is ended.

【0094】尚、共有接点ユーザプログラムの実行終了
後、実行を中断していた他の共有接点ユーザプログラム
がある場合には、その他の共有接点ユーザプログラムも
同様にして実行を再開させ、その後に実行を中断してい
た独自接点ユーザプログラムの実行を再開させるように
する。
After the execution of the shared contact user program, if there is another shared contact user program whose execution has been interrupted, the other shared contact user programs are similarly restarted and then executed. Restart the execution of the original contact user program that had been suspended.

【0095】図17に、図16におけるステップ950
の処理で、共有接点書込みコマンドを送信してきたプロ
グラマブルコントローラに返送する共有接点書込みレス
ポンスのフォーマットを示す。
FIG. 17 shows step 950 in FIG.
The format of the shared contact write response returned to the programmable controller that has transmitted the shared contact write command in the processing of 1.

【0096】この共有接点書込みレスポンスR2は、図
に示すように、相手プログラマブルコントローラのネッ
トワークアドレスと、自プログラマブルコントローラの
ネットワークアドレスと、コマンド/レスポンスコード
と、通信ポート番号とにより構成されており、これが共
有接点書込みコマンドを送信してきたプログラマブルコ
ントローラに返送されることになる。
As shown in the figure, the shared contact write response R2 is composed of the network address of the partner programmable controller, the network address of its own programmable controller, the command / response code, and the communication port number. It will be returned to the programmable controller that sent the shared contact write command.

【0097】従って、この第2実施例によれば、共有接
点情報と共に、その共有接点情報を使用する共有接点ユ
ーザプログラムを含む共有接点書込みコマンドを、ネッ
トワークを介してプログラマブルコントローラ間で通信
するようにし、その共有接点書込みコマンドを受信した
プログラマブルコントローラでは、その送信されてきた
共有接点情報を使用して、同様に送信されてきた共有接
点ユーザプログラムを実行するようにしたため、共有接
点ユーザプログラムを実行するプログラマブルコントロ
ーラ側では、その共有接点ユーザプログラムを所有する
必要がなくなり、共有接点ユーザプログラムを格納する
メモリを設ける必要がなくなると共に、共有接点ユーザ
プログラムの共用化および分散化が可能になる。
Therefore, according to the second embodiment, the shared contact information and the shared contact write command including the shared contact user program that uses the shared contact information are communicated between the programmable controllers via the network. , The programmable controller that has received the shared contact write command uses the transmitted shared contact information to execute the shared contact user program that is also transmitted. Therefore, the shared contact user program is executed. The programmable controller side does not need to own the shared contact point user program, it is not necessary to provide a memory for storing the shared contact point user program, and the shared contact point user program can be shared and distributed.

【0098】このため、この第2実施例によれば、上記
第1実施例と同様に、共有接点ユーザプログラムと独自
接点ユーザプログラムとが混在して1つになっていた従
来のプログラマブルコントローラと比較して、接点情報
の変化にリアルタイムで追従することが可能になると共
に、ネットワークを介し他のプログラマブルコントロー
ラから共有接点情報やその共有接点情報を使用する共有
接点ユーザプログラムが送信されてこない場合には、共
有接点ユーザプログラムを実行する必要がないので、サ
イクルタイムを短縮化できることになる。
Therefore, according to the second embodiment, as in the first embodiment, the shared contact user program and the unique contact user program are mixed and integrated into a single programmable controller. Then, it becomes possible to follow the change of the contact information in real time, and when the shared contact information or the shared contact user program that uses the shared contact information is not transmitted from other programmable controllers via the network. Since it is not necessary to execute the shared contact user program, the cycle time can be shortened.

【0099】[0099]

【発明の効果】以上説明したように、本発明では、ユー
ザプログラムを共有接点ユーザプログラムと、独自接点
ユーザプログラムとに分けて格納しておき、通常はネッ
トワークNを介した通信と関係のない独自接点ユーザプ
ログラムのみを実行する一方、共有接点情報がネットワ
ークを介して送信されてきた場合には、割込みによって
その共有接点情報を使用して共有接点ユーザプログラム
を実行するようにしたため、共有接点ユーザプログラム
と独自接点ユーザプログラムとが混在して1つになって
いた従来のプログラマブルコントローラと比較して、ユ
ーザプログラムの実行が接点情報の変化にリアルタイム
で追従することが可能になる。
As described above, according to the present invention, the user program is separately stored in the shared contact user program and the unique contact user program, and is normally independent of communication through the network N. While executing only the contact user program, when the shared contact information is sent through the network, the shared contact user program is executed using the shared contact information by an interrupt. Compared with the conventional programmable controller in which the and unique contact user programs are mixed and integrated into one, the execution of the user program can follow the change of the contact information in real time.

【0100】また、ネットワークを介し他のプログラマ
ブルコントローラから共有接点情報が入力しない場合に
は、共有接点ユーザプログラムを実行しないため、この
ような場合でも共有接点ユーザプログラムと独自接点ユ
ーザプログラムとが混在して1つになっているため共有
接点ユーザプログラムを実行してしまう従来のプログラ
マブルコントローラと比較して、サイクルタイムを短縮
化できることになる。
If shared contact information is not input from another programmable controller via the network, the shared contact user program is not executed. Therefore, even in such a case, the shared contact user program and the unique contact user program are mixed. Therefore, the cycle time can be shortened as compared with the conventional programmable controller that executes the shared contact user program because it is only one.

【0101】さらに、本発明では、ネットワークを介し
て共有接点情報だけでなくその共有接点情報を使用する
共有接点ユーザプログラムを指示するプログラム指示情
報も送信するようにしているため、共有接点情報等を受
信したプログラマブルコントローラでは、その共有接点
情報を使用して複数の共有接点ユーザプログラムの中か
ら対応した共有接点ユーザプログラムを選択して実行で
き、共有接点ユーザプログラムの実行の応用性および弾
力性が向上する。
Further, according to the present invention, not only the shared contact information but also the program instruction information for instructing the shared contact user program that uses the shared contact information is transmitted through the network. The received programmable controller can use the shared contact information to select and execute the corresponding shared contact user program from multiple shared contact user programs, improving the applicability and elasticity of execution of the shared contact user program. To do.

【0102】またさらに、本発明では、共有接点情報と
共に、その共有接点情報を使用する共有接点ユーザプロ
グラムをネットワークを介してプログラマブルコントロ
ーラ間で通信するようにし、その共有接点情報および共
有接点ユーザプログラムを受信したプログラマブルコン
トローラにその共有接点情報を使用して、同様に送信さ
れてきた共有接点ユーザプログラムを実行させるように
もしているため、従来のプログラマブルコントローラと
比較して、上述のように接点情報の変化にリアルタイム
で追従できると共に、サイクルタイムを短縮化できるだ
けでなく、共有接点ユーザプログラムを実行するプログ
ラマブルコントローラ側ではその共有接点ユーザプログ
ラムを所有する必要がなくなることにより、共有接点ユ
ーザプログラムを格納するメモリを設ける必要がなくな
ると共に、共有接点ユーザプログラムの共用化および分
散化が可能になる。
Furthermore, in the present invention, together with the shared contact information, the shared contact user program that uses the shared contact information is communicated between the programmable controllers via the network, and the shared contact information and the shared contact user program are stored. By using the shared contact information received by the programmable controller to execute the shared contact user program that is also transmitted, the contact information of the contact information as described above is compared with the conventional programmable controller. In addition to being able to follow changes in real time and shortening the cycle time, the programmable controller that executes the shared contact user program does not need to own the shared contact user program. Together we need to provide a pay memory is eliminated, allowing shared and distributed shared contacts the user program.

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

【図1】本発明に係るプログラマブルコントローラの実
施例の構成を示す説明図。
FIG. 1 is an explanatory diagram showing a configuration of an embodiment of a programmable controller according to the present invention.

【図2】ユーザプログラムメモリ15a〜15cに格納
されるユーザプログラムのメモリマップを示す説明図。
FIG. 2 is an explanatory diagram showing a memory map of user programs stored in user program memories 15a to 15c.

【図3】ユーザプログラム管理テーブルを示す説明図。FIG. 3 is an explanatory diagram showing a user program management table.

【図4】プログラマブルコントローラの全体の処理を示
すフローチャート。
FIG. 4 is a flowchart showing the overall processing of the programmable controller.

【図5】図4におけるステップ200の通常接点処理を
詳細に示すフローチャート。
5 is a flowchart showing in detail the normal contact processing of step 200 in FIG.

【図6】図5におけるステップ230共有接点読出しコ
マンドの送信処理を詳細に示すフローチャート。
6 is a flowchart showing in detail the transmission processing of a step 230 shared contact read command in FIG.

【図7】図6におけるステップ237の処理で送信され
る共有接点読出しコマンドのフォーマットを示す説明
図。
7 is an explanatory diagram showing a format of a shared contact read command transmitted in the process of step 237 in FIG.

【図8】図6に示すステップ238等の処理で作成され
る通信ポート情報テーブルT2を示す説明図。
8 is an explanatory diagram showing a communication port information table T2 created by the processing of step 238 and the like shown in FIG.

【図9】共有接点読出しコマンドを受信した相手プログ
ラマブルコントローラ側における共有接点情報の送信処
理を示すフローチャート。
FIG. 9 is a flowchart showing a shared contact information transmission process on the partner programmable controller side that receives a shared contact read command.

【図10】図9の処理により共有接点読出しコマンドを
送信してきたプログラマブルコントローラに返送するレ
スポンスメッセージのフォーマットを示す説明図。
10 is an explanatory diagram showing a format of a response message returned to the programmable controller that has transmitted the shared contact read command by the processing of FIG. 9.

【図11】図4におけるステップ400の共有接点処理
を詳細に示すフローチャート。
FIG. 11 is a flowchart showing in detail the shared contact processing of step 400 in FIG.

【図12】第1実施例のプログラマブルコントローラに
より構成されたPCシステム全体を示す説明図。
FIG. 12 is an explanatory diagram showing an entire PC system including the programmable controller according to the first embodiment.

【図13】独自接点および共有接点のユーザプログラム
の具体例を示す説明図。
FIG. 13 is an explanatory diagram showing a specific example of a user program of a unique contact and a shared contact.

【図14】共有接点書込みコマンドの送信処理を詳細に
示す説明図。
FIG. 14 is an explanatory diagram showing details of a shared contact write command transmission process.

【図15】共有接点書込みコマンドのフォーマットを示
す説明図。
FIG. 15 is an explanatory diagram showing a format of a shared contact write command.

【図16】共有接点書込みコマンドの受信側のプログラ
マブルコントローラの処理を詳細に示すフローチャー
ト。
FIG. 16 is a flowchart showing in detail the processing of the programmable controller on the reception side of the shared contact write command.

【図17】共有接点書込みコマンドを送信してきたプロ
グラマブルコントローラに返送するレスポンスメッセー
ジのフォーマットを示す説明図。
FIG. 17 is an explanatory diagram showing a format of a response message returned to the programmable controller that has transmitted the shared contact write command.

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

A プログラマブルコントローラ(PC) B プログラマブルコントローラ C プログラマブルコントローラ N ネットワーク 1 CPUユニット 11 MPU(プログラム実行手段) 12 システムROM 13 ワークRAM 14 システムバスインタフェース 15a ユーザプログラムメモリ(通常接点プログラム
メモリ) 15b ユーザプログラムメモリ(共有接点プログラム
メモリ) 15c ユーザプログラムメモリ(共有接点プログラム
メモリ) 2 通信ユニット 21 MPU 22 システムROM 23 ワークRAM 24 システムバスインタフェース 25 共有RAM 26 通信コントローラ 3 システムバス C1 共有接点読出しコマンド C2 共有接点書込みコマンド R1 共有接点読出しレスポンス R1 共有接点書込みレスポンス T1 ユーザプログラム管理テーブル T2 通信ポート情報テーブル
A programmable controller (PC) B programmable controller C programmable controller N network 1 CPU unit 11 MPU (program executing means) 12 system ROM 13 work RAM 14 system bus interface 15a user program memory (normal contact program memory) 15b user program memory (shared Contact program memory) 15c User program memory (shared contact program memory) 2 Communication unit 21 MPU 22 System ROM 23 Work RAM 24 System bus interface 25 Shared RAM 26 Communication controller 3 System bus C1 Shared contact read command C2 Shared contact write command R1 Shared Contact read response R1 Shared contact write response T1 User program management table T2 communication port information table

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ネットワークを介した通信によって他の
プログラマブルコントローラと接点情報を共有し、その
共有接点情報に基づきユーザプログラムを実行するプロ
グラマブルコントローラにおいて、 上記共有接点情報を使用する共有接点ユーザプログラム
を格納した共有接点ユーザプログラムメモリと、 上記共有接点情報を使用しない独自接点ユーザプログラ
ムを格納した独自接点ユーザプログラムメモリと、 通常は上記独自接点ユーザプログラムメモリに格納され
た独自接点ユーザプログラムを実行し、ネットワークを
介し他のプログラマブルコントローラから共有接点情報
が送信されてきた場合には、割込みにより上記独自接点
ユーザプログラムの実行を中断し、上記共有接点ユーザ
プログラムメモリに格納された共有接点ユーザプログラ
ムを上記送信されてきた共有接点情報を使用して実行す
るプログラム実行手段と、 を具備することを特徴とするプログラマブルコントロー
ラ。
1. A programmable controller that shares contact information with another programmable controller by communication via a network and executes a user program based on the shared contact information, and stores a shared contact user program that uses the shared contact information. The shared contact user program memory, the unique contact user program memory that stores the unique contact user program that does not use the shared contact information, and the unique contact user program that is normally stored in the unique contact user program memory. When the shared contact information is sent from another programmable controller via the, the execution of the unique contact user program is interrupted and the shared contact user program stored in the shared contact user program memory is interrupted. A program controller for executing a program using the transmitted shared contact information, and a programmable controller.
【請求項2】 共有接点ユーザプログラムメモリには、
複数の共有接点ユーザプログラムが格納され、かつ、共
有接点情報には、当該共有接点情報を使用する共有接点
ユーザプログラムを指示するプログラム指示情報が付加
されており、 プログラム実行手段は、 ネットワークを介し他のプログラマブルコントローラか
ら共有接点情報が送信されてきた場合には、割込みによ
り上記独自接点ユーザプログラムの実行を中断し、当該
共有接点情報に付加されたプログラム指示情報に基づい
て上記共有接点ユーザプログラムメモリに格納された対
応する共有接点ユーザプログラムを読出し、その共有接
点ユーザプログラムを上記送信されてきた共有接点情報
を使用して実行する、 ことを特徴とする請求項1記載のプログラマブルコント
ローラ。
2. The shared contact user program memory comprises:
A plurality of shared contact point user programs are stored, and program instruction information for instructing a shared contact point user program that uses the shared contact point information is added to the shared contact point information. When the shared contact information is transmitted from the programmable controller, the execution of the unique contact user program is interrupted and the shared contact user program memory is stored in the shared contact user program memory based on the program instruction information added to the shared contact information. The programmable controller according to claim 1, wherein the stored corresponding shared contact user program is read, and the shared contact user program is executed by using the transmitted shared contact information.
【請求項3】 複数の共有接点ユーザプログラムが各々
使用する共有接点情報は、通信ポート毎に送受信され、
かつ、その各共有接点情報にはプログラム指示情報とし
て通信ポート番号が付加されるものとし、 プログラム実行手段は、 予め各通信ポート番号と、各通信ポートを介して送信さ
れてくる各共有接点情報を使用する共有接点ユーザプロ
グラムとを対応させた通信ポート情報テーブルを有して
おり、ネットワークを介し他のプログラマブルコントロ
ーラから共有接点情報が送信されてきた場合には、当該
共有接点情報に付加されたプログラム指示情報としての
通信ポート番号に基づき上記通信ポート情報テーブルを
参照して共有接点ユーザプログラムメモリに格納された
対応する共有接点ユーザプログラムを読出す、 ことを特徴とする請求項2記載のプログラマブルコント
ローラ。
3. Shared contact information used by each of a plurality of shared contact user programs is transmitted and received for each communication port,
Moreover, the communication port number is added as program instruction information to each shared contact information, and the program execution means preliminarily stores each communication port number and each shared contact information transmitted via each communication port. It has a communication port information table corresponding to the shared contact user program to be used, and when the shared contact information is transmitted from another programmable controller via the network, the program added to the shared contact information. The programmable controller according to claim 2, wherein the corresponding shared contact user program stored in the shared contact user program memory is read out by referring to the communication port information table based on the communication port number as the instruction information.
【請求項4】 独自接点ユーザプログラムには、ネット
ワークを介して他のプログラマブルコントローラに対し
共有接点情報の読出しを要求する共有接点読出しコマン
ドを送信させる命令が含まれており、 プログラム実行手段は、 通常は上記独自接点ユーザプログラムメモリに格納され
た独自接点ユーザプログラムを実行し、上記命令を実行
した場合には、ネットワークを介して他のプログラマブ
ルコントローラに対し上記共有接点読出しコマンドを送
信すると共に、ネットワークを介し当該他のプログラマ
ブルコントローラから共有接点情報が送信されてきた場
合には、割込みにより上記独自接点ユーザプログラムの
実行を中断し、共有接点ユーザプログラムメモリに格納
された共有接点ユーザプログラムを上記送信されてきた
共有接点情報を使用して実行する、 ことを特徴とする請求項1、請求項2または請求項3記
載のプログラマブルコントローラ。
4. The unique contact user program includes an instruction for transmitting a shared contact read command for requesting reading of shared contact information to another programmable controller via a network, and the program execution means is usually Executes the unique contact user program stored in the unique contact user program memory, and when the above command is executed, sends the shared contact read command to another programmable controller via the network, and connects the network. If the shared contact information is transmitted from the other programmable controller via the interrupt, the execution of the unique contact user program is interrupted by an interrupt, and the shared contact user program stored in the shared contact user program memory is transmitted. Shared contact information Claim 1, claim 2 or claim 3 programmable controller according performed using, it is characterized by the.
【請求項5】 ネットワークを介した通信によって他の
プログラマブルコントローラと接点情報を共有し、その
共有接点情報に基づきユーザプログラムを実行するプロ
グラマブルコントローラにおいて、 上記共有接点情報を使用しない独自接点ユーザプログラ
ムを格納した独自接点ユーザプログラムメモリと、 通常は上記独自接点ユーザプログラムメモリに格納され
た独自接点ユーザプログラムを実行し、ネットワークを
介し他のプログラマブルコントローラから共有接点情報
およびその共有接点情報を使用する共有接点ユーザプロ
グラムが送信されてきた場合には、割込みにより上記独
自接点ユーザプログラムの実行を中断し、上記送信され
てきた共有接点情報を使用して上記共有接点ユーザプロ
グラムを実行するプログラム実行手段と、 を具備することを特徴とするプログラマブルコントロー
ラ。
5. A programmable controller that shares contact information with another programmable controller by communication via a network and executes a user program based on the shared contact information, and stores a unique contact user program that does not use the shared contact information. Shared contact user program memory that executes the unique contact user program memory and the unique contact user program normally stored in the above unique contact user program memory, and uses the shared contact information and other shared contact information from another programmable controller via the network. When a program is transmitted, a program execution means for interrupting the execution of the unique contact user program by an interrupt and executing the shared contact user program using the transmitted shared contact information, A programmable controller comprising:
JP14713495A 1995-06-14 1995-06-14 Programmable controller Expired - Fee Related JP3358045B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14713495A JP3358045B2 (en) 1995-06-14 1995-06-14 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14713495A JP3358045B2 (en) 1995-06-14 1995-06-14 Programmable controller

Publications (2)

Publication Number Publication Date
JPH08339210A true JPH08339210A (en) 1996-12-24
JP3358045B2 JP3358045B2 (en) 2002-12-16

Family

ID=15423341

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14713495A Expired - Fee Related JP3358045B2 (en) 1995-06-14 1995-06-14 Programmable controller

Country Status (1)

Country Link
JP (1) JP3358045B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007501472A (en) * 2003-05-15 2007-01-25 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ USB host controller with transfer descriptor memory
JP2012168679A (en) * 2011-02-14 2012-09-06 Toshiba Mitsubishi-Electric Industrial System Corp Communication processing system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007501472A (en) * 2003-05-15 2007-01-25 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ USB host controller with transfer descriptor memory
US7747808B2 (en) 2003-05-15 2010-06-29 St-Ericsson Sa USB host controller with memory for transfer descriptors
JP4696199B2 (en) * 2003-05-15 2011-06-08 エスティー‐エリクソン、ソシエテ、アノニム USB host controller with transfer descriptor memory
JP2012168679A (en) * 2011-02-14 2012-09-06 Toshiba Mitsubishi-Electric Industrial System Corp Communication processing system

Also Published As

Publication number Publication date
JP3358045B2 (en) 2002-12-16

Similar Documents

Publication Publication Date Title
EP0298396B1 (en) Function-distributed control apparatus
US6925486B2 (en) Information processing apparatus and method and information processing program recording medium
US7516265B2 (en) System and method for providing an application with memory access methods
JP4151198B2 (en) Interrupt controller and microcomputer
US6668205B1 (en) Control method of factory automation system, recording medium recording a program therefor and central processor of factory automation system
JP3358045B2 (en) Programmable controller
JPH0830550A (en) Interface device, information processor, information processing system, and data transferring method
US20010052088A1 (en) Automation system and method for operating an automation system
JPH086614A (en) Programmable controller
JP2001051871A (en) Remote debugging device
JP4152079B2 (en) Peripheral device of programmable controller
JP2003108513A (en) Hardware chain pull
JP3024345B2 (en) Data link method
EP0923010B1 (en) Programmable controller
JP3350699B2 (en) Programmable controller
JP3105029B2 (en) Redundant controller
JP2522412B2 (en) Communication method between programmable controller and input / output device
KR20190127110A (en) Apparatus for processing programmable logic controller program
JPH1165623A (en) Programmable controller
JP2001229136A (en) Unit and system for control and data transfer device
JPH0736374A (en) Data link system
JPH05216507A (en) Program changing method for programmable controller
JPH11288307A (en) Fa system
JPH08221106A (en) Programmable controller
JP2001265610A (en) Device control method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020830

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

Free format text: PAYMENT UNTIL: 20071011

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20081011

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091011

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees