JPH0736370A - Data transmitting and receiving system, and method therefor - Google Patents

Data transmitting and receiving system, and method therefor

Info

Publication number
JPH0736370A
JPH0736370A JP18393893A JP18393893A JPH0736370A JP H0736370 A JPH0736370 A JP H0736370A JP 18393893 A JP18393893 A JP 18393893A JP 18393893 A JP18393893 A JP 18393893A JP H0736370 A JPH0736370 A JP H0736370A
Authority
JP
Japan
Prior art keywords
area
request
data
response
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
JP18393893A
Other languages
Japanese (ja)
Other versions
JP2848762B2 (en
Inventor
Takeshi Kobayashi
毅 小林
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 JP18393893A priority Critical patent/JP2848762B2/en
Publication of JPH0736370A publication Critical patent/JPH0736370A/en
Application granted granted Critical
Publication of JP2848762B2 publication Critical patent/JP2848762B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To realize an efficient communication without having an influence on the sequence control of a programmable controller, and realize the shortening of waiting time in the multitask processing of a FA controller. CONSTITUTION:A data transmitting and receiving system is provided with a common memory device 70 formed of plural sets of a request area 11-i (hereinafter i=1-N) and a response area 12-i, and a control area 10-i for controlling the size of the request area 11-i and the response area 12-i every set in such a manner that the length can be varied; a FA controller 1 for setting the data size of the request area 11-i and the response area 12-i, and setting a request data in the request area 11-i; and a programmable controller 2 for reading the request data of the FA controller 1, executing a prescribed processing, writing the response data in the response area 12-i, and replying to the FA controller 1.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、FAコントローラと
プログラマブルコントローラ間におけるデータ処理にお
いて、要求エリアと応答エリアのサイズや使用状況を管
理する管理エリアと、該管理エリアの各情報に基づいて
要求エリアと応答エリアを管理する共通記憶装置を用い
て、データの授受を効率よく行うデータ授受システムお
よびその方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing between a FA controller and a programmable controller, a management area for managing the size and usage of a request area and a response area, and a request area based on each information of the management area. The present invention relates to a data transfer system and method for efficiently transferring data using a common storage device that manages a response area.

【0002】[0002]

【従来の技術】ベルトコンベア上を製品(ワーク)が流
れていくような生産ラインにおいては、プログラマブル
コントローラが設備中に複数台設置され、それぞれ機械
制御や部品のカウント等を実行している。これらのプロ
グラマブルコントローラは、ネットワークにより接続さ
れ、相互にリアルタイムでデータを授受し、ライン全体
としての制御を実現している。リアルタイムでデータを
授受することは、生産ラインでは必要不可欠の機能であ
り、もし、リアルタイムでデータの授受ができない場合
には、例えば、ある部品が欠品となってもワークの流れ
が止まらず、欠品のままの状態で製品が次工程に流れて
しまうという好ましくない事態が発生する。
2. Description of the Related Art In a production line in which a product (work) flows on a belt conveyor, a plurality of programmable controllers are installed in the equipment to perform machine control and counting of parts. These programmable controllers are connected by a network, exchange data with each other in real time, and control the entire line. Sending and receiving data in real time is an indispensable function in a production line.If data cannot be sent and received in real time, for example, even if a certain component is out of stock, the flow of work does not stop, An unfavorable situation occurs in which the product flows to the next process in the state of being out of stock.

【0003】FAコントローラは、上記のようなプログ
ラマブルコントローラにより構成されたネットワークの
統括管理を行うもので、生産ラインの工程制御、設備監
視等を実行する。例えば、段取り情報に基づいて、各プ
ログラマブルコントローラへシーケンスプログラムをダ
ウンロードしたり、各プログラマブルコントローラから
生産情報や故障情報等を収集し、複数のプログラマブル
コントローラ間における同期を取る等の制御を実行す
る。このようにFAコントローラは、各プログラマブル
コントローラのデータを常に監視し、作業工程の変更や
機械の故障に対して迅速に対応する必要がある。加え
て、FAコントローラとプログラマブルコントローラの
間におけるデータ授受は通信頻度が高く、かつ、高速で
ある。
The FA controller controls the network composed of the programmable controller as described above, and controls the production line processes and monitors the facilities. For example, based on the setup information, a sequence program is downloaded to each programmable controller, production information, failure information, etc. are collected from each programmable controller, and control such as synchronization among a plurality of programmable controllers is executed. As described above, the FA controller needs to constantly monitor the data of each programmable controller and quickly respond to a change in the work process or a machine failure. In addition, data is exchanged between the FA controller and the programmable controller with high communication frequency and high speed.

【0004】このような要求に対して、従来、FAコン
トローラとプログラマブルコントローラとの間におい
て、データの授受を行う方式の1つとして、プログラマ
ブルコントローラをボード化し、FAコントローラのオ
プションスロット(外部バススロット)に装着する方式
が知られている。この方式にあっては、FAコントロー
ラとプログラマブルコントローラとのインターフェース
は、プログラマブルコントローラ上にある共有記憶装置
を介して実行される。プログラマブルコントローラは、
他の複数のプログラマブルコントローラとネットワーク
により接続され、各プログラマブルコントローラとデー
タの授受を行いながらシーケンスプログラムを実行す
る。FAコントローラは、プログラマブルコントローラ
が持つネットワーク上におけるプログラマブルコントロ
ーラのデータにアクセスする場合と、ネットワークを介
して直接プログラマブルコントローラのデータにアクセ
スする場合がある。
In response to such a request, conventionally, as one of the methods of exchanging data between the FA controller and the programmable controller, the programmable controller is made into a board and an optional slot (external bus slot) of the FA controller is provided. A method of attaching to the is known. In this system, the interface between the FA controller and the programmable controller is executed via the shared storage device on the programmable controller. Programmable controller
It is connected to a plurality of other programmable controllers via a network and executes a sequence program while exchanging data with each programmable controller. The FA controller may access the data of the programmable controller on the network possessed by the programmable controller or may directly access the data of the programmable controller via the network.

【0005】FAコントローラがプログラマブルコント
ローラとデータの授受を実行する場合は、FAコントロ
ーラからデータ授受の要求を出力し、プログラマブルコ
ントローラは、その要求に応答する。例えば、FAコン
トローラからプログラマブルコントローラに対してデー
タを送信する場合には、FAコントローラがデータ書き
込みの要求を出力するため、書き込みを示すコードと書
込先の先頭アドレスと書込データ数および書込データか
ら構成されるデータを送信すると、プログラマブルコン
トローラからは書込確認を示すデータが返送される。ま
た、FAコントローラがプログラマブルコントローラの
データを読み出す場合には、FAコントローラが読み出
しを示すコードと読み出しの先頭アドレスおよび読出数
から構成されるデータを送信すると、プログラマブルコ
ントローラから読出データが応答として返送される。
When the FA controller exchanges data with the programmable controller, the FA controller outputs a request for data exchange, and the programmable controller responds to the request. For example, when data is transmitted from the FA controller to the programmable controller, the FA controller outputs a data writing request, so a code indicating writing, the start address of the writing destination, the number of writing data, and the writing data. When the data composed of is transmitted, the programmable controller returns data indicating the write confirmation. Further, when the FA controller reads data from the programmable controller, the FA controller sends data including a read code, a read start address, and a read number, and the programmable controller returns read data as a response. .

【0006】このように、FAコントローラとプログラ
マブルコントローラの間におけるデータの授受処理で
は、要求と応答が1組となったデータ授受が実行され
る。従来において、この要求と応答に対しては、共有記
憶装置上に要求エリアと応答エリアを設けて、それぞれ
使用していた。しかし、従来における要求エリアと応答
エリアにあっては、共有記憶装置上のサイズが固定であ
り、一度の通信において授受できるデータは、自ずと決
められていた。また、データ授受の要求を送信する場合
に取り扱うデータの指定は、先頭アドレスとデータ数だ
けで実行していたので、一度の通信において授受できる
データは連続アドレスのものだけであった。
As described above, in the data transfer processing between the FA controller and the programmable controller, the data transfer in which the request and the response are one set is executed. Conventionally, a request area and a response area are provided on the shared storage device and used for the request and the response, respectively. However, in the conventional request area and response area, the size on the shared storage device is fixed, and the data that can be transmitted and received in one communication is naturally determined. Further, since the data to be handled when transmitting the data transfer request is specified only by the start address and the number of data, the data that can be transferred in one communication is only the continuous address.

【0007】次に、上記従来例について具体的に説明す
る。図12は、従来におけるシステム全体を示すブロッ
ク図であり、従来におけるFAコントローラとプログラ
マブルコントローラとの間においてデータの授受を行う
方式を示している。図において、本システムは、大きく
マルチタスク処理を実行するFAコントローラ1と、シ
ーケスプログラムに基づいて所定の処理を実行するプロ
グラマブルコントローラ20とから構成されている。
Next, the above conventional example will be specifically described. FIG. 12 is a block diagram showing the entire conventional system, and shows a method of exchanging data between a conventional FA controller and a programmable controller. In the figure, the present system mainly comprises an FA controller 1 that executes multitasking processing, and a programmable controller 20 that executes predetermined processing based on a sequence program.

【0008】FAコントローラ1は、該FAコントロー
ラ1用のCPU3と、FAコントローラ1用の主記憶装
置4とから構成されている。また、プログラマブルコン
トローラ2は、該プログラマブルコントローラ2用の主
記憶装置5と、プログラマブルコントローラ2のシーケ
ンスプログラム処理実行用のCPU6と、共有記憶装置
7とから構成されている。また、該共有記憶装置7は、
FAコントローラ1用のCPU3およびプログラマブル
コントローラ20用のCPU6の両者からアクセス可能
な状態に接続されている。
The FA controller 1 comprises a CPU 3 for the FA controller 1 and a main storage device 4 for the FA controller 1. The programmable controller 2 includes a main storage device 5 for the programmable controller 2, a CPU 6 for executing sequence program processing of the programmable controller 2, and a shared storage device 7. Further, the shared storage device 7 is
Both the CPU 3 for the FA controller 1 and the CPU 6 for the programmable controller 20 are connected so as to be accessible.

【0009】また、共有記憶装置7は、FAコントロー
ラ1がプログラマブルコントローラ20に対して要求を
出力する場合に、要求データをセットする要求エリア9
0と、プログラマブルコントローラ20がFAコントロ
ーラ1からの要求を受けて、応答データをセットする応
答エリア91と、FAコントローラ1とプログラマブル
コントローラ20との間において要求、応答の有無を知
らせるためのハンドシェークフラグを格納するハンドシ
ェークフラグ格納エリア92とが用意されている。な
お、要求エリア90および応答エリア91の、共有記憶
装置70中におけるアドレスおよびサイズは固定であ
る。
Further, the shared storage device 7 has a request area 9 for setting request data when the FA controller 1 outputs a request to the programmable controller 20.
0, the programmable controller 20 receives a request from the FA controller 1, and sets a response area 91 for setting response data, and a handshake flag for notifying the presence or absence of a request or response between the FA controller 1 and the programmable controller 20. A handshake flag storage area 92 for storing is prepared. The address and size of the request area 90 and the response area 91 in the shared storage device 70 are fixed.

【0010】次に、動作について説明する。FAコント
ローラ1とプログラマブルコントローラ20との間にお
いてデータの授受を実行する場合、まず、FAコントロ
ーラ1用のCPU3が共有記憶装置7中の固定アドレス
で示される要求エリア90に要求データを書き込み、ハ
ンドシェークフラグ格納エリア92に「要求あり」を示
す値をセットする。プログラマブルコントローラ20用
のCPU6は、定期的に、ハンドシェークフラグ格納エ
リア92を監視しており、「要求あり」を検出すると要
求エリア90から要求データを読み出し、要求に対する
処理を実行する。そして、共有記憶装置7中の固定アド
レスで示される応答エリア91に応答データを書き込
み、ハンドシェークフラグ格納エリア92に「応答あ
り」を示す値をセットする。FAコントローラ1用のC
PU3は、この「応答あり」を受け取ると応答エリア9
1から応答データを読み出す。
Next, the operation will be described. When exchanging data between the FA controller 1 and the programmable controller 20, first, the CPU 3 for the FA controller 1 writes the request data in the request area 90 indicated by the fixed address in the shared storage device 7, and then the handshake flag. A value indicating "requested" is set in the storage area 92. The CPU 6 for the programmable controller 20 regularly monitors the handshake flag storage area 92, and when "requested" is detected, the requested data is read from the requested area 90 and the processing for the request is executed. Then, the response data is written in the response area 91 indicated by the fixed address in the shared storage device 7, and the value indicating “response is present” is set in the handshake flag storage area 92. C for FA controller 1
When PU3 receives this "response", the response area 9
Read response data from 1.

【0011】また、上記従来例の他に、この発明に関連
する従来技術として、特開平2−310664号公報に
開示されている「共有メモリを用いた通信方式」があ
る。これは複数のCPU間での通信の効率化を目指した
通信方式であり、共有記憶装置内におけるメモリを必要
に応じて動的に確保して、通信バッファとして割り当て
るものである。この方式では、送信の必要が生じた場合
に必要なメモリを確保し、該確保したメモリに送信デー
タを書き込んだ後、相手先を指し示すための通信IDを
セットし、受信側CPUに対して割り込みを発生させ
る。割り込みを受けた受信側では、送信されてきたデー
タを読み出した後、受信確認を示すデータを送信時と同
様の方法で送信元へ返すものである。
In addition to the above-mentioned conventional example, there is a "communication system using a shared memory" disclosed in Japanese Patent Laid-Open No. 210310/1983 as a conventional technique related to the present invention. This is a communication method aiming to improve the efficiency of communication between a plurality of CPUs, in which a memory in a shared storage device is dynamically secured as necessary and allocated as a communication buffer. In this method, a memory required when transmission is necessary is secured, the transmission data is written in the secured memory, a communication ID for pointing the destination is set, and an interruption is made to the receiving CPU. Generate. The receiving side receiving the interrupt reads the transmitted data, and then returns the data indicating the reception confirmation to the transmission source in the same manner as at the time of transmission.

【0012】その他、この発明に関連する参考技術文献
として、特開平3−105441号公報に開示されてい
る「オペレーティングシステムにおけるメモリコントロ
ール方法」、特開平3−127104号公報に開示され
ている「プログラマブルコントローラのデータリンク装
置」がある。
[0012] In addition, as a reference technical document related to the present invention, "memory control method in operating system" disclosed in Japanese Patent Laid-Open No. 3-105441 and "Programmable Programmable" disclosed in Japanese Patent Laid-Open No. 3-127104. There is a controller data link device.

【0013】[0013]

【発明が解決しようとする課題】しかしながら、上記に
示されるような従来におけるデータ授受方式にあって
は、要求エリアと応答エリアの共有記憶装置中における
アドレスおよびサイズが固定であるため、FAコントロ
ーラからプログラマブルコントローラに対してデータを
書き込むときに送信するデータが多く、要求エリアを多
く使用する場合において、また、FAコントローラにプ
ログラマブルコントローラのデータを読み込むときに受
信するデータが多く、応答エリアを多く使用する場合に
おいて、データの書き込み、読み出し等に応じて、共有
記憶装置のメモリ領域を有効に活用することができない
という問題点があった。
However, in the conventional data transfer system as described above, the address and size in the shared storage device of the request area and the response area are fixed, so When writing a large amount of data to the programmable controller, when a large amount of request area is used, when receiving a programmable controller data into the FA controller, a large amount of data is received, and a large amount of response area is used. In this case, there is a problem in that the memory area of the shared storage device cannot be effectively used according to the writing and reading of data.

【0014】また、1回のデータ授受で取り扱えるデー
タは、プログラマブルコントローラの連続デバイスのメ
モリ領域に該当する連続アドレスである必要があり、不
連続なアドレスのデータを読み書きする場合には、複数
回に分けて通信を繰り返えす必要があった。複数回に分
けてデータ授受を行うと、当然、その通信にかかる時間
が増大し、生産ラインをリアルタイムで制御することが
困難になるという問題点があった。
Further, the data that can be handled in one data transfer needs to be continuous addresses corresponding to the memory area of the continuous device of the programmable controller. It was necessary to divide and repeat the communication. When data is exchanged in a plurality of times, naturally, there is a problem that the time required for the communication increases and it becomes difficult to control the production line in real time.

【0015】例えば、各プログラマブルコントローラが
制御している機械の故障情報をFAコントローラにより
監視する場合、それぞれプログラマブルコントローラの
データが連続アドレスでなければ、ネットワーク中のプ
ログラマブルコントローラの台数分だけ、データの読出
処理を繰り返されなければならない。特に、生産ライン
中に故障が発生し、非常停止をかけなければならない場
合には、停止の遅れにより機械が壊れたり、事故が発生
したりするという危険性があった。
For example, when the FA controller monitors the failure information of the machine controlled by each programmable controller, if the data of each programmable controller is not a continuous address, the data is read by the number of programmable controllers in the network. The process has to be repeated. In particular, when a failure occurs in the production line and an emergency stop must be applied, there is a risk that the machine may be broken or an accident may occur due to the delay of the stop.

【0016】また、複数に分けて通信を実行すると、通
信と通信の間に生産ラインの状況が変化してしまうとい
う問題点が発生する。例えば、FAコントローラにより
生産台数と部品の残り数のデータを収集し、そのデータ
に基づいて帳票を作成する場合に、最初にデータを読み
出したときと最後にデータを読み出したときとにおい
て、実際の生産台数が変わっていると、誤ったデータの
帳票が作成されるという問題点があった。
Further, if the communication is divided into a plurality of pieces, the problem that the situation of the production line changes between the communication occurs. For example, when the FA controller collects data on the number of units produced and the number of remaining parts and creates a form based on the data, the actual data is read when the data is read first and when the data is read last. If the production volume has changed, there is a problem that incorrect data forms are created.

【0017】さらに、FAコントローラでは上記のよう
に常にプログラマブルコントローラを監視する必要があ
るため、帳票をプリントアウトしたり、FAコントロー
ラの上位にあるホストコンピュータと通信を実行してい
る間にも、プログラマブルコントローラとの交信を中断
してはならない。したがって、FAコントローラには、
プログラマブルコントローラとデータの授受を実行しな
がら他の処理を実行するため、マルチタスク機能が必要
とされる。しかし、従来におけるデータ授受方式にあっ
ては、要求エリアと応答エリアは1通信しか使用でき
ず、FAコントローラのマルチタスク処理に対応した要
求エリアになっていないため、マルチタスク処理で使用
する場合に、タスクのキューイングを実行する必要があ
り、待ち時間が長くなるという問題点があった。
Further, in the FA controller, since it is necessary to constantly monitor the programmable controller as described above, the programmable controller can be programmed even while the form is printed out or communication with the host computer above the FA controller is being executed. Do not interrupt communication with the controller. Therefore, the FA controller
A multitasking function is required to perform other processing while exchanging data with the programmable controller. However, in the conventional data transfer method, only one communication can be used in the request area and the response area, and the request area is not compatible with the multitask processing of the FA controller. However, there is a problem that it is necessary to execute task queuing, and the waiting time becomes long.

【0018】例えば、生産する品目の切り替わり時に、
プログラマブルコントローラのシーケンスプログラムを
次の生産品目に書き換える場合、従来の方式にあって
は、1つのタスクで稼働中のプログラマブルコントロー
ラを監視し、もう1つのタスクでシーケンスプログラム
をダウンロードさせることができなかった。したがっ
て、生産ライン上における全てのワークがなくなるまで
は、プログラマブルコントローラの監視を実行し、プロ
グラマブルコントローラにより制御される機械が全て停
止した時点で、プログラムのダウンロードを実行しなけ
ればならず、作業効率が悪いという問題点があった。
[0018] For example, when switching the items to be produced,
When rewriting the sequence program of the programmable controller to the next production item, in the conventional method, it was not possible to monitor the programmable controller in operation by one task and download the sequence program by another task. . Therefore, until all the workpieces on the production line are exhausted, it is necessary to monitor the programmable controller and download the program when all the machines controlled by the programmable controller are stopped, thus improving work efficiency. There was a problem that it was bad.

【0019】また、特開平2−310664号公報に開
示されている「共有メモリを用いた通信方式」にあって
は、通信の度にメモリを確保する処理を実行するため、
FAコントローラとプログラマブルコントローラとの間
におけるデータ授受のようにリアルタイム性が要求さ
れ、通信頻度が高い場合には、空き領域のサーチやメモ
リ確保のためのCPUオーバーヘッドが増加する。さら
に、プログラマブルコントローラのようにシーケンスプ
ログラムを実行するCPUに対して、割り込みを発生さ
せてデータ送信する通信方式にあっては、シーケンス制
御を渋滞させる恐れがあるという問題点があった。
Further, in the "communication system using a shared memory" disclosed in Japanese Patent Laid-Open No. 2-310664, a process of securing a memory is executed each time communication is performed.
When real-time property is required such as data exchange between the FA controller and the programmable controller, and when communication frequency is high, CPU overhead for searching a free area and securing memory increases. Further, in a communication system in which an interrupt is generated and data is transmitted to a CPU that executes a sequence program, such as a programmable controller, there is a problem that sequence control may be jammed.

【0020】この発明は、上記に鑑みてなされたもので
あって、FAコントローラとプログラマブルコントロー
ラ間におけるデータ授受において、共有記憶装置を有効
に活用し、プログラマブルコントローラのシーケンス制
御に影響を与えることなく効率のよい通信を実現すると
共に、FAコントローラのマルチタスク処理にて待ち時
間の短縮化を実現することができるデータ授受システム
およびその方法を得ることを目的とする。
The present invention has been made in view of the above, and in the data transfer between the FA controller and the programmable controller, the shared storage device is effectively utilized, and the efficiency is improved without affecting the sequence control of the programmable controller. It is an object of the present invention to provide a data transfer system and method capable of realizing good communication and reducing the waiting time in the FA controller multitask processing.

【0021】[0021]

【課題を解決するための手段】この発明に係るデータ授
受システムは、上記の目的を達成するために、要求デー
タを格納する要求エリアと、応答データを格納する応答
エリアを複数組設け、該要求エリアと応答エリアのサイ
ズを各組毎に可変長可能に管理する管理エリアとからな
る共有記憶手段と、前記要求エリアと応答エリアのデー
タサイズをセットし、要求エリアに要求データをセット
するFAコントローラと、前記FAコントローラの要求
データを読み出して、所定の処理を実行し、応答エリア
に応答データを書き込み、FAコントローラに応答する
プログラマブルコントローラとを具備するものである。
In order to achieve the above object, a data transfer system according to the present invention is provided with a plurality of request areas for storing request data and a plurality of response areas for storing response data. A shared storage means consisting of an area and a management area that manages the size of the response area so that each set can be variable in length, and an FA controller that sets the data size of the request area and the response area and sets the request data in the request area And a programmable controller that reads the request data from the FA controller, executes a predetermined process, writes the response data in the response area, and responds to the FA controller.

【0022】また、前記FAコントローラは、要求の種
類を示す要求コードと要求ブロックの数を示すブロック
数を設定して前記プログラマブルコントローラのデータ
を授受するものである。
Further, the FA controller sets a request code indicating the type of request and a block number indicating the number of request blocks, and transmits / receives the data of the programmable controller.

【0023】また、前記管理エリアは、要求および応答
の有無を判別するための値を格納するフラグ格納エリア
と、要求エリアの先頭アドレスまでのオフセット値を格
納する要求エリア先頭オフセット格納エリアと、要求エ
リアのエリア長を格納する要求エリア長格納エリアと、
応答エリアの先頭アドレスまでのオフセット値を格納す
る応答エリア先頭オフセット格納エリアと、応答エリア
のエリア長を格納する応答エリア長格納エリアとから成
るものである。
The management area includes a flag storage area for storing a value for determining the presence or absence of a request and a response, a request area head offset storage area for storing an offset value up to the head address of the request area, and a request area. A requested area length storage area that stores the area length of the area,
It comprises a response area head offset storage area for storing an offset value up to the head address of the response area and a response area length storage area for storing the area length of the response area.

【0024】また、前記共有記憶手段の管理エリアに、
1回の通信で2つ以上の要求エリアあるいは応答エリア
を使用する場合における次のエリア番号を格納する次エ
リア番号格納エリアを設けたものである。
In the management area of the shared storage means,
A next area number storage area is provided for storing the next area number when two or more request areas or response areas are used in one communication.

【0025】また、この発明に係るデータ授受方法は、
上記の目的を達成するために、要求エリアに要求データ
を書き込む際に、管理エリアのハンドシェークフラグに
基づいて使用可能な要求エリアを探索し、該要求エリア
のサイズに応じて管理エリア中の要求エリア長と応答エ
リア先頭オフセットを更新し、応答データのサイズに応
じて応答エリア長を更新し、FAコントローラとプログ
ラマブルコントローラ間においてデータ授受を実行する
ものである。
The data transfer method according to the present invention is
In order to achieve the above object, when writing the request data in the request area, search for an available request area based on the handshake flag of the management area, and request area in the management area according to the size of the request area. The length and the response area start offset are updated, the response area length is updated according to the size of the response data, and data is exchanged between the FA controller and the programmable controller.

【0026】[0026]

【作用】この発明に係るデータ授受システムは、要求エ
リアと応答エリアの先頭アドレスとサイズを管理エリア
に登録し、FAコントローラおよびプログラマブルコン
トローラが、要求エリアあるいは応答エリアをアクセス
する場合には、管理エリアに登録されているアドレスに
基づいてアクセスを実行する。また、先頭アドレスとサ
イズを管理エリアに登録することにより、共有記憶装置
内における要求エリアと応答エリアが可変長となる。
The data transfer system according to the present invention registers the start address and the size of the request area and the response area in the management area, and when the FA controller and the programmable controller access the request area or the response area, Access is performed based on the address registered in. Also, by registering the start address and size in the management area, the request area and the response area in the shared storage device have variable lengths.

【0027】また、要求データに対して、プログラマブ
ルコントローラが有する種々のデータを1回の通信で授
受できるように、要求コードとブロック数を設定する。
要求コードは要求の種類を示し、プログラマブルコント
ローラは、この要求コードに基づいてデータ読み出し、
データ書き込み、ネットワーク情報読み出し等の処理を
実行する。また、ブロック数は不連続なアドレスのデー
タにアクセスするために、連続アドレスのデータを1ブ
ロックとし、一度に多ブロックのデータを指定できる。
Further, the request code and the number of blocks are set so that various data possessed by the programmable controller can be transmitted and received with respect to the request data in one communication.
The request code indicates the type of request, and the programmable controller reads the data based on this request code,
Processing such as data writing and network information reading is executed. Further, since the number of blocks is to access the data of discontinuous addresses, the data of continuous addresses can be set as one block, and the data of multiple blocks can be designated at one time.

【0028】また、管理エリアを、フラグ格納エリア
と、要求エリア先頭オフセット格納エリアと、要求エリ
ア長格納エリアと、応答エリア先頭オフセット格納エリ
アと、応答エリア長格納エリアとから構成し、これらの
各エリアにセットしたデータに基づいて、FAコントロ
ーラとプログラマブルコントローラのデータ授受を実行
する。
The management area comprises a flag storage area, a request area start offset storage area, a request area length storage area, a response area start offset storage area, and a response area length storage area. Data exchange between the FA controller and the programmable controller is executed based on the data set in the area.

【0029】また、共有記憶装置の管理エリアに、1回
の通信で2つ以上の要求エリアあるいは応答エリアを使
用する場合における次のエリア番号を格納する次エリア
番号格納エリアを設けることにより、データが大きい場
合に使用するエリアを拡張し、複数のエリアを使用して
通信を実行する。
Further, by providing a next area number storage area for storing the next area number when two or more request areas or response areas are used in one communication in the management area of the shared storage device, When the area is large, the area used is expanded and communication is performed using multiple areas.

【0030】また、この発明に係るデータ授受方法は、
要求エリアに要求データを書き込む際に、管理エリアの
ハンドシェークフラグに基づいて使用可能な要求エリア
を探索し、該要求エリアのサイズに応じて管理エリア中
の要求エリア長と応答エリア先頭オフセットを更新し、
応答データのサイズに応じて応答エリア長を更新して、
FAコントローラとプログラマブルコントローラ間にお
けるデータ授受を実行する。
The data transfer method according to the present invention is
When writing the request data to the request area, search the available request area based on the handshake flag of the management area, and update the request area length and response area start offset in the management area according to the size of the request area. ,
Update the response area length according to the size of the response data,
Data is exchanged between the FA controller and the programmable controller.

【0031】[0031]

【実施例】【Example】

〔実施例1〕以下、この発明に係るデータ授受システム
およびその方法の実施例を添付図面に基づいて説明す
る。図1は、この発明に係るデータ授受システム全体の
構成を示すブロック図である。本システムは、大きくマ
ルチタスク処理を実行するFAコントローラ1と、シー
ケンスプログラムに基づいて所定の処理を実行するプロ
グラマブルコントローラ2とから構成されており、従来
と同様に、プログラマブルコントローラ2をボード化し
て、該プログラマブルコントローラ2をFAコントロー
ラ1のオプションスロット(外部バススロット)に装着
する構造となっている。
[Embodiment 1] An embodiment of a data transfer system and method according to the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a block diagram showing the configuration of the entire data transfer system according to the present invention. This system is mainly composed of an FA controller 1 that executes multitasking processing and a programmable controller 2 that executes a predetermined processing based on a sequence program. The programmable controller 2 is mounted in an optional slot (external bus slot) of the FA controller 1.

【0032】FAコントローラ1は、該FAコントロー
ラ1を制御するCPU3と、FAコントローラ1の主記
憶装置4とから構成されている。また、プログラマブル
コントローラ2は、該プログラマブルコントローラ2の
シーケンスプログラムを実行するCPU5と、プログラ
マブルコントローラ2のシーケンスプログラムを格納す
る主記憶装置6と、共有記憶装置70とから構成されて
いる。
The FA controller 1 comprises a CPU 3 for controlling the FA controller 1 and a main memory 4 of the FA controller 1. The programmable controller 2 includes a CPU 5 that executes the sequence program of the programmable controller 2, a main storage device 6 that stores the sequence program of the programmable controller 2, and a shared storage device 70.

【0033】また、上記共有記憶装置70には、管理エ
リア、要求エリア、応答エリアがそれぞれN組用意され
ており、1回の通信について、1組のエリアが使用され
るように構成されている。10−iは管理エリア
(i)、11−iは要求エリア(i)、12−iは応答
エリア(i)である(i=1〜N)。なお、以下、説明
上、上記(i)は誤解が生じない場合において省略す
る。
In the shared storage device 70, N sets of management areas, request areas, and response areas are prepared, and one set of areas is used for one communication. . 10-i is a management area (i), 11-i is a request area (i), and 12-i is a response area (i) (i = 1 to N). Note that, for the sake of explanation, the above (i) will be omitted unless misunderstanding occurs.

【0034】上記構成をさらに詳述すれば、FAコント
ローラ1は、マルチタスク処理を実行し、FAコントロ
ーラ1の主記憶装置4上には、複数のプログラムが並列
に走る。一方、プログラマブルコントローラ2では、主
記憶装置6にシーケンスプログラムが格納され、シーケ
ンスプログラムを実行するCPU5により、シーケンス
プログラムの読み出しが繰り返し、実行される。
More specifically, the FA controller 1 executes multitask processing, and a plurality of programs run in parallel on the main storage device 4 of the FA controller 1. On the other hand, in the programmable controller 2, the sequence program is stored in the main storage device 6, and the sequence program is repeatedly read by the CPU 5 that executes the sequence program.

【0035】また、共有記憶装置70の管理エリア10
−iは、それぞれ要求エリア11−iと応答エリア12
−iを管理している。管理エリア10−iが管理するエ
リアのメモリは予め確保されており、通信時に空き領域
をサーチしたり、メモリの確保を行う必要はない。ただ
し、管理エリア10−iが管理するエリア中で、要求エ
リア11−iおよび応答エリア12−iのアドレスおよ
びサイズは可変である。
Further, the management area 10 of the shared storage device 70
-I is the request area 11-i and the response area 12 respectively.
-Manage i. The memory of the area managed by the management area 10-i is secured in advance, and it is not necessary to search for a free area or secure the memory during communication. However, the addresses and sizes of the request area 11-i and the response area 12-i are variable in the area managed by the management area 10-i.

【0036】図2は、上記管理エリア10−iの詳細構
成を示す説明図であり、該管理エリア10−iは、以下
に示す各エリアが割り付けられている。すなわち、20
は要求/応答の有無を判別するためのハンドシェークフ
ラグを格納するハンドシェークフラグ格納エリア、21
は要求エリア11−iの先頭アドレスまでのオフセット
値を格納する要求エリア先頭オフセット格納エリア、2
2は要求エリア11−iのエリア長を格納する要求エリ
ア長格納エリア、23は応答エリア12−iの先頭アド
レスまでのオフセット値を格納する応答エリア先頭オフ
セット格納エリア、24は応答エリア12−iのエリア
長を格納する応答エリア長格納エリアである。
FIG. 2 is an explanatory diagram showing a detailed structure of the management area 10-i, and the management area 10-i is assigned with the following areas. That is, 20
Is a handshake flag storage area for storing a handshake flag for determining the presence / absence of a request / response, 21
Is a request area head offset storage area for storing an offset value up to the head address of the request area 11-i, 2
Reference numeral 2 is a request area length storage area for storing the area length of the request area 11-i, 23 is a response area start offset storage area for storing an offset value up to the start address of the response area 12-i, and 24 is a response area 12-i. Is a response area length storage area for storing the area length of.

【0037】図3は、FAコントローラ1がプログラマ
ブルコントローラ2からデータを読み出す場合における
要求データおよび応答データのデータ構造を示す説明図
であり、図において、30は要求データ、31は要求の
種類(データ読み出し)を示す要求コード、32は要求
ブロックの数を示すブロック数、33は読出データのプ
ログラマブルコントローラ2側での先頭アドレスを示す
先頭アドレスデータ、34は読出データのデータ数を示
す読出データ数である。この先頭アドレスデータ33と
読出データ数34はブロック数(32)分だけ繰り返さ
れる。また、35は応答データ、36は読出データであ
り、該読出データ36はブロック数(32)分だけ繰り
返される。
FIG. 3 is an explanatory diagram showing the data structure of request data and response data when the FA controller 1 reads data from the programmable controller 2. In the figure, 30 is request data and 31 is request type (data Read), 32 is the number of blocks indicating the number of requested blocks, 33 is the start address data indicating the start address of the read data on the programmable controller 2 side, and 34 is the number of read data indicating the number of read data. is there. The head address data 33 and the read data number 34 are repeated by the number of blocks (32). 35 is response data and 36 is read data, and the read data 36 is repeated by the number of blocks (32).

【0038】図4は、FAコントローラ1がプログラマ
ブルコントローラ2にデータを書き込む場合における要
求データおよび応答データのデータ構造を示す説明図で
ある。図において、40は要求データ、41は要求の種
類(データ書き込み)を示す要求コード、42は要求ブ
ロックの数を示すブロック数、43は書込データのプロ
グラマブルコントローラ2側での先頭アドレスを示す先
頭アドレスデータ、44は書込データのデータ数を示す
書込データ数である。この先頭アドレスデータ43と書
込データ数44は、ブロック数(42)分だけ繰り返さ
れる。また、46は書込データであり、ブロック数(4
2)分だけ繰り返される。また、45は応答データであ
り、データ受信確認用に用いられる。
FIG. 4 is an explanatory diagram showing the data structure of request data and response data when the FA controller 1 writes data to the programmable controller 2. In the figure, 40 is request data, 41 is a request code indicating the type of request (data writing), 42 is the number of blocks indicating the number of request blocks, and 43 is the head indicating the start address of the write data on the programmable controller 2 side. Address data, 44 is the number of write data indicating the number of write data. The head address data 43 and the write data number 44 are repeated by the number of blocks (42). Further, 46 is write data, and the number of blocks (4
2) Repeat for minutes. Further, 45 is response data, which is used for confirmation of data reception.

【0039】次に、動作について説明する。図5は、F
Aコントローラ1側の通信処理の動作を示すフローチャ
ートであり、図6は、プログラマブルコントローラ2側
の通信処理の動作を示すフローチャートである。
Next, the operation will be described. FIG. 5 shows F
7 is a flowchart showing an operation of communication processing on the A controller 1 side, and FIG. 6 is a flowchart showing an operation of communication processing on the programmable controller 2 side.

【0040】図5に示したフローチャートにおいて、ま
ず、FAコントローラ1からプログラマブルコントロー
ラ2に対して要求を出力するため、FAコントローラ1
用のCPU3は、要求エリア11−iと応答エリア12
−iに必要なメモリサイズを計算する(S50)。な
お、これらのメモリサイズは、図3および図4に示した
データ構造に基づいて計算される。
In the flow chart shown in FIG. 5, first, the FA controller 1 outputs a request to the programmable controller 2, so the FA controller 1
CPU 3 for use has a request area 11-i and a response area 12
-The memory size required for i is calculated (S50). Note that these memory sizes are calculated based on the data structure shown in FIGS. 3 and 4.

【0041】次に、各管理エリア10−i中におけるハ
ンドシェークフラグ格納用エリア20を探索し、「使用
可」を示す値が格納されている管理エリア10−Iを見
つける(S51)。その後、管理エリア10−I中の要
求エリア先頭オフセット格納エリア21に要求エリア1
1−Iの先頭アドレスまでのオフセット値、要求エリア
長格納エリア22に要求エリア11−Iのサイズ、応答
エリア先頭オフセット値格納エリア23に応答エリア1
2−Iの先頭アドレスまでのオフセット値、応答エリア
長格納エリア24に応答エリア12−Iのサイズを登録
する(S52)。
Next, the handshake flag storage area 20 in each management area 10-i is searched to find the management area 10-I in which the value indicating "available" is stored (S51). After that, the request area 1 is added to the request area head offset storage area 21 in the management area 10-I
1-I to the start address, the size of the request area 11-I in the request area length storage area 22, and the response area 1 in the response area start offset value storage area 23
The offset value to the start address of 2-I and the size of the response area 12-I are registered in the response area length storage area 24 (S52).

【0042】次に、FAコントローラ1用のCPU3
は、要求エリア先頭オフセット格納エリア21の値に基
づいて、要求データを要求エリア11−iにセットし
(S53)、ハンドシェークフラグ格納エリア20に対
して、「要求あり」を示す値、すなわち、ハンドシェー
クフラグをセットする(S54)。
Next, the CPU 3 for the FA controller 1
Sets the request data in the request area 11-i based on the value of the request area start offset storage area 21 (S53), and sets a value indicating "requested" in the handshake flag storage area 20, that is, the handshake. The flag is set (S54).

【0043】ここで、図6に示したフローチャートへ説
明を移行する。プログラマブルコントローラ2では、シ
ーケンスプログラムを実行するプログラマブルコントロ
ーラ用のCPU5が定期的(シーケンスプログラムの繰
り返しスキャン毎)に、ハンドシェークフラグ格納エリ
ア20を監視しており、ハンドシェークフラグが「要求
あり」か否かを判断する(S60)。このステップS6
0において、上記ステップS54の「要求あり」を検出
すると、要求エリア先頭オフセット格納エリア21の値
に基づいて、要求データを読み出す(S61)。
Here, the description shifts to the flowchart shown in FIG. In the programmable controller 2, the CPU 5 for the programmable controller that executes the sequence program regularly (every repeated scan of the sequence program) monitors the handshake flag storage area 20 to check whether the handshake flag is “requested” or not. A judgment is made (S60). This step S6
At 0, when "requested" in step S54 is detected, the requested data is read based on the value of the requested area start offset storage area 21 (S61).

【0044】その後、要求に応じた処理を実行する(S
62)。この場合、例えば、データの読み出し、データ
の書き込み、ネットワーク情報の収集、シーケンスプロ
グラム実行の停止等の処理を実行する。さらに、応答エ
リア先頭オフセット格納エリア23の値に基づいて、応
答エリア12−Iに応答データを書き込み(セットし)
(S63)、ハンドシェークフラグ格納エリア20に
「応答あり」を示す値をセットする(S64)。
Thereafter, the processing according to the request is executed (S
62). In this case, for example, processing such as data reading, data writing, network information collection, and sequence program execution stop is executed. Further, based on the value of the response area head offset storage area 23, response data is written (set) in the response area 12-I.
(S63), a value indicating "responding" is set in the handshake flag storage area 20 (S64).

【0045】次に、再び、説明を図5に示したフローチ
ャートに戻す。FAコントローラ1側では、ハンドシェ
ークフラグが「応答あり」であるか否かを判断し(S5
5)、「応答あり」であると判断した場合に、応答エリ
ア先頭オフセット格納エリア23の値に基づいて、応答
エリア12−Iから応答データを読み出す(S56)。
あるいは、プログラマブルコントローラ2からFAコン
トローラ1へデータを返送する場合には、割り込みによ
り「応答あり」を知らせてもよい。この場合、FAコン
トローラ1では、ハンドシェークフラグ格納エリア20
を監視する必要がないため、他の処理を実行することが
できる。応答データを読み出し、通信が完了したら、ハ
ンドシェークフラグ格納エリア20に「使用可」を示す
値をセットする(S57)。
Next, the explanation will be returned to the flowchart shown in FIG. 5 again. The FA controller 1 side determines whether or not the handshake flag is "response" (S5).
5) If it is determined that there is a response, the response data is read from the response area 12-I based on the value of the response area head offset storage area 23 (S56).
Alternatively, when data is returned from the programmable controller 2 to the FA controller 1, an "interrupt response" may be notified by an interrupt. In this case, in the FA controller 1, the handshake flag storage area 20
Since it does not need to be monitored, other processing can be performed. When the response data is read and the communication is completed, a value indicating "available" is set in the handshake flag storage area 20 (S57).

【0046】以上、説明した動作から明らかなように、
要求エリア11−iと応答エリア12−iに対するアク
セスは、全て管理エリア10−i内におけるデータに基
づいて実行されており、管理エリア10−i内における
要求エリア先頭オフセット格納エリア21、要求エリア
長格納エリア22、応答エリア先頭オフセット格納エリ
ア23、応答エリア長格納エリア24の値を変えること
によって、要求エリア11−iは可変長となる。したが
って、読出要求時には、要求エリア11−iを小さく、
応答エリア12−iを大きく設定し、これとは反対に、
書込要求時には、要求エリア11−iを大きく、応答エ
リア12−iを小さく設定することにより、一度に取り
扱うデータ量を増加させることができる。
As is clear from the operation described above,
All access to the request area 11-i and the response area 12-i is executed based on the data in the management area 10-i, and the request area head offset storage area 21 and the request area length in the management area 10-i. The request area 11-i has a variable length by changing the values of the storage area 22, the response area head offset storage area 23, and the response area length storage area 24. Therefore, when a read request is made, the request area 11-i is made small,
The response area 12-i is set to a large value, on the contrary,
When writing is requested, the request area 11-i is set large and the response area 12-i is set small, so that the amount of data handled at one time can be increased.

【0047】また、この実施例のようにN個に分割され
たエリア構成とすることにより、FAコントローラ1か
らは複数のタスクが待ち時間なしで要求を送信すること
ができる。1つのタスクから同時に、複数の通信要求を
出力してもよい。プログラマブルコントローラ2の動作
としては、定期的にN個のハンドシェークフラグ格納エ
リア20を監視し、「要求あり」を検出したエリアすべ
てについて要求に応じた処理を実行する。
Further, by adopting an area configuration divided into N as in this embodiment, a plurality of tasks can send requests from the FA controller 1 without waiting time. Multiple communication requests may be output simultaneously from one task. As the operation of the programmable controller 2, the N handshake flag storage areas 20 are regularly monitored, and the processing according to the request is executed for all the areas where "requested" is detected.

【0048】次に、上記第1の実施例について、再度、
図7,図8を用いてさらに詳細に説明する。図7は、第
1の実施例における共有記憶装置70のメモリ状態を示
す説明図である。図において、太枠で示されている部分
が、要求エリア11−i+応答エリア12−iに相当す
る。第1の実施例では、管理エリア10−iが管理する
エリアである。また、図8は、第1の実施例における共
有記憶装置70の空き領域とエリアの状態を示す説明図
である。
Next, again regarding the first embodiment,
This will be described in more detail with reference to FIGS. 7 and 8. FIG. 7 is an explanatory diagram showing a memory state of the shared storage device 70 in the first embodiment. In the figure, the portion indicated by the thick frame corresponds to the request area 11-i + response area 12-i. In the first embodiment, the management area 10-i manages the area. Further, FIG. 8 is an explanatory diagram showing the states of free areas and areas of the shared storage device 70 in the first embodiment.

【0049】上記第1の実施例にあっては、管理エリア
10−iが管理するエリア(太枠部分)はサイズが固定
である。すなわち、管理エリア10−iが管理するエリ
アは固定領域となる。この固定領域の中において、要求
エリア11−iと応答エリア12−iのサイズは可変と
なる。例えば、データの読み出し時には、図7(a)に
示すように要求エリア11−iを小さく、応答エリア1
2−iを大きくする。一方、データの書き込み時には、
反対に、要求エリア11−iを大きく、応答エリア12
−iを小さくする。
In the first embodiment, the area (thick frame portion) managed by the management area 10-i has a fixed size. That is, the area managed by the management area 10-i is a fixed area. In this fixed area, the sizes of the request area 11-i and the response area 12-i are variable. For example, when reading data, as shown in FIG. 7A, the request area 11-i is made smaller and the response area 1 is made smaller.
Increase 2-i. On the other hand, when writing data,
On the contrary, the request area 11-i is enlarged and the response area 12 is
-Reduce i.

【0050】また、上記において、管理エリア10−i
が管理するエリアを固定長とするのは、共有記憶装置7
0上の空き領域を探索し、確保する処理を不要とするた
めである。例えば、管理エリア10−iの管理するエリ
アを可変長とした場合、共有記憶装置70は、図8に示
すように多様なサイズのエリアから構成されるようにな
る。なお、図8では、説明を簡単にするため、要求エリ
ア11−iと応答エリア12−iを省略し、管理エリア
10−1〜Nが管理するエリアを、単にエリア1〜Nと
記述する。
Further, in the above, the management area 10-i
The area managed by the shared storage device 7 has a fixed length.
This is because there is no need to search for a free area on 0 and secure it. For example, when the area managed by the management area 10-i has a variable length, the shared storage device 70 is composed of areas of various sizes as shown in FIG. Note that in FIG. 8, the request areas 11-i and the response areas 12-i are omitted and the areas managed by the management areas 10-1 to 10-N are simply described as areas 1 to N, for the sake of simplicity.

【0051】図8(a)において、エリア1〜4がすべ
てデータ授受に使用され、各エリアのサイズはデータ数
に応じて決められたとする。次に、図8(b)に示すよ
うにエリア2とエリア4が通信を終了し、メモリを開放
する。ここで、新たに、図8(c)に示されるだけのエ
リアを必要とする通信の要求があった場合には、下記
〜の何れかの処理を実行する必要がある。すなわち、 空き領域のうち、次の通信に必要なサイズを確保で
きる部分を探索する。このような空き領域が見つからな
い場合には、他の通信が終了し、新たに十分な空き領域
ができるまで待つ、 飛び飛びの空き領域(図8(b)においては、エリ
ア2とエリア4の部分の空き領域)を使用し、次の通信
を実行する。この場合、空き領域間の連結関係を記述す
る何等かの手段が必要となる、 図8(b)に示すように、空き領域ができた時点
で、その空き領域を詰め(通信に使用しているエリアを
シフトする)、空き領域を常にまとめておく。次の通信
では、まとめられた空き領域から必要なメモリを確保し
て使用する、である。
In FIG. 8A, areas 1 to 4 are all used for data transfer, and the size of each area is determined according to the number of data. Next, as shown in FIG. 8B, the area 2 and the area 4 finish the communication, and the memory is released. Here, when there is a new request for communication that requires the area shown in FIG. 8C, it is necessary to execute any one of the following processes. That is, a search is made for a portion of the free area in which the size required for the next communication can be secured. If such a free area is not found, other communication is terminated and waits until a new sufficient free area is created. A scattered free area (in FIG. 8 (b), area 2 and area 4) Free space) to execute the next communication. In this case, some means for describing the connection relationship between the empty areas is required. As shown in FIG. 8B, when the empty areas are created, the empty areas are packed (used for communication. Shift the area that you are in), always keep empty areas together. In the next communication, the necessary memory is secured from the combined free area and used.

【0052】FAコントローラ1とプログラマブルコン
トローラ2との通信のように、リアルタイムでデータを
授受し、通信頻度が高い場合には、通信の度に上記〜
のような処理を実行していたのでは、かえって、通信
時間を増加させてしまう。そこで、上記第1の実施例で
は、管理エリア10−iが管理するエリアを固定長と
し、各エリアは均一のサイズとすることによって、エリ
アが使用可能か否かをチェックし、使用可能と判断した
場合に、直ちに通信に使用可能とする。エリアが使用可
能か否かのチェックは、管理エリア10−i中のハンド
シェークフラグ格納エリア20に「使用可」を示す値が
入っているか否かを調べるだけである。
As in the case of communication between the FA controller 1 and the programmable controller 2, when data is exchanged in real time and the communication frequency is high, the above-mentioned
If such a process were executed, the communication time would be rather increased. Therefore, in the first embodiment, the area managed by the management area 10-i has a fixed length, and each area has a uniform size to check whether the area can be used and determine that the area can be used. If it does, it will be immediately available for communication. Whether or not the area can be used is checked only by checking whether or not the value indicating "usable" is included in the handshake flag storage area 20 in the management area 10-i.

【0053】そして、この固定領域中において最大限に
メモリを有効利用するために、要求エリア11−iおよ
び応答エリア12−iのサイズを可変長とする。要求エ
リア11−iおよび応答エリア12−iを可変長とする
処理は、管理エリア10−iに、エリア先頭のオフセッ
トアドレスとエリアサイズを登録するだけであるため、
通信時間に影響を与えることはない。
The size of the request area 11-i and the size of the response area 12-i are set to be variable so that the memory can be effectively used to the maximum extent in this fixed area. Since the processing for making the request area 11-i and the response area 12-i variable lengths only involves registering the offset address and area size of the area head in the management area 10-i,
It does not affect the communication time.

【0054】〔実施例2〕次に、第2の実施例について
説明する。この実施例では、上記第1の実施例の通信方
式において、共有記憶装置70中における管理エリアに
次エリア番号格納エリアを追加することにより、要求エ
リアと応答エリアをさらに有効に利用可能とする。
[Embodiment 2] Next, a second embodiment will be described. In this embodiment, the request area and the response area can be used more effectively by adding the next area number storage area to the management area in the shared storage device 70 in the communication method of the first embodiment.

【0055】図9は、上記第2の実施例における管理エ
リア10−iの詳細構成を示す説明図である。図におい
て、80はハンドシェークフラグ格納エリア、81は1
回の通信で2つ以上の要求エリアあるいは応答エリアを
使用する場合に、次のエリアの番号を格納するための次
エリア番号格納エリアである。また、82は要求エリア
先頭オフセット格納エリア、83は要求長格納エリア、
84は応答エリア先頭オフセット格納エリア、85は応
答エリア長格納エリアである。
FIG. 9 is an explanatory diagram showing the detailed structure of the management area 10-i in the second embodiment. In the figure, 80 is a handshake flag storage area, and 81 is 1.
It is a next area number storage area for storing the number of the next area when two or more request areas or response areas are used in one communication. Further, 82 is a required area head offset storage area, 83 is a required length storage area,
Reference numeral 84 is a response area head offset storage area, and 85 is a response area length storage area.

【0056】次に、動作について説明する。通信に必要
な要求データあるいは応答データのサイズが、要求エリ
ア11−iあるいは応答エリア12−iのサイズを越え
ていない場合には、上記第1の実施例と同様の方式によ
り通信を実行することができる。一方、要求データある
いは応答データのサイズが、要求エリア11−iあるい
は応答エリア12−iのサイズを越えている場合には、
次のような処理を実行する。なお、ここでは、要求エリ
ア11−iに要求データが入りきらない場合について説
明する。
Next, the operation will be described. If the size of the request data or the response data required for communication does not exceed the size of the request area 11-i or the response area 12-i, the communication is executed by the same method as in the first embodiment. You can On the other hand, if the size of the request data or the response data exceeds the size of the request area 11-i or the response area 12-i,
Perform the following processing. Note that, here, a case will be described in which the requested data does not fit in the requested area 11-i.

【0057】まず、通信に使用していない他のエリア番
号を探索し(これをJとする)、管理エリア10−iの
次エリア番号格納エリア81に、探索されたエリア番号
Jを格納する。エリアが通信に使用可能であるか否か
は、管理エリア10−i中のハンドシェークフラグ格納
エリア80に「使用可」を示す値が格納されているか否
かにより判断する。次に、探索されたエリアの管理エリ
ア10−i中のハンドシェークフラグ格納エリア80に
「使用中」を示す値を書き込み、他の通信により、この
エリアを使用することができないように設定する。そし
て、要求データを要求エリア11−Iから書き込み、該
要求エリア11−Iに入りきらない部分は、要求エリア
11−Jに書き込む。
First, another area number not used for communication is searched (this is set as J), and the searched area number J is stored in the next area number storage area 81 of the management area 10-i. Whether or not the area can be used for communication is determined by whether or not a value indicating "usable" is stored in the handshake flag storage area 80 in the management area 10-i. Next, a value indicating "in use" is written in the handshake flag storage area 80 in the management area 10-i of the searched area, and it is set so that this area cannot be used by other communication. Then, the request data is written from the request area 11-I, and the portion that does not fit in the request area 11-I is written to the request area 11-J.

【0058】上記において、2つのエリアに入りきらな
い場合は、順次「使用可」のエリアを探索し、複数エリ
アを使用して要求データを書き込む。要求データの書き
込みが終了したら、管理エリア10−i中のハンドシェ
ークフラグ格納エリア80に「要求あり」を示す値をセ
ットする。要求データをセットした後の動作は、上記第
1の実施例の場合の動作と同様である。また、上記の説
明では、要求データが要求エリア11−iに入りきらな
い場合について述べたが、応答データが応答エリア12
−iに入りきらない場合についても同様に処理する。
In the above case, if the data cannot fit in the two areas, the "usable" areas are sequentially searched, and the required data is written using the plurality of areas. When the writing of the request data is completed, a value indicating "requested" is set in the handshake flag storage area 80 in the management area 10-i. The operation after setting the request data is the same as the operation in the case of the first embodiment. Further, in the above description, the case where the request data does not fit in the request area 11-i has been described.
-If i cannot be fully filled, the same process is performed.

【0059】したがって、上記のような通信方式を実行
することにより、通信するデータが少ない場合には、共
有記憶装置70上の1つのエリアを使用して通信を実行
し、一方、データが大きい場合には、使用するエリアを
拡張し、複数のエリアを使用して通信を実行することが
できる。また、この場合においても、FAコントローラ
1のマルチタスク処理にも対応しており、FAコントロ
ーラ1からは複数のタスクが待ち時間なしで要求を送信
することができる。
Therefore, by executing the communication method as described above, when the amount of data to be communicated is small, the communication is executed using one area on the shared storage device 70, while the amount of data is large. In addition, the area to be used can be expanded and communication can be executed using a plurality of areas. Also in this case, the FA controller 1 is also compatible with multitask processing, and a plurality of tasks can send requests from the FA controller 1 without waiting time.

【0060】次に、上記第2の実施例について図10を
用いて、さらに詳細に説明する。図10は、第2の実施
例における共有記憶装置のエリア状態を示す説明図であ
る。上記第1の実施例にあっては、リアルタイム性を重
視しながら、共有記憶装置70を有効に活用する例につ
いて説明したが、管理エリア10−iが管理するエリア
(要求エリア11−i+応答エリア12−i)が固定長
であるため、このエリアだけでは通信できない大量のデ
ータを授受する場合には、複数回に分けて通信を実行す
る必要がある(ただし、通常は、複数回に分けて通信す
る必要がないように、エリアを十分大きく取ってい
る)。そこで、このような場合に対処するために、この
第2の実施例では、管理エリア10−iに、次エリア番
号格納エリア81(図9参照)を設けている。
Next, the second embodiment will be described in more detail with reference to FIG. FIG. 10 is an explanatory diagram showing an area state of the shared storage device in the second embodiment. In the first embodiment described above, an example in which the shared storage device 70 is effectively used while giving importance to real-time property has been described, but the area managed by the management area 10-i (request area 11-i + response area). 12-i) has a fixed length, so when exchanging a large amount of data that cannot be communicated only in this area, it is necessary to execute communication in multiple times (however, normally, it is necessary to execute communication in multiple times). The area is large enough so that there is no need to communicate). Therefore, in order to deal with such a case, in the second embodiment, the next area number storage area 81 (see FIG. 9) is provided in the management area 10-i.

【0061】この次エリア番号格納エリア81を管理エ
リア10−iに設けたことにより、各エリアを連結する
ことができ、第1の実施例に示した方式を用いて1回の
通信で授受できなかったデータを一度に授受できるよう
になる。例えば、図10(a)に示すように、エリア1
とエリア3に相当する部分が通信に使用されていない場
合で、かつ、図10(b)に示されるだけのエリアを必
要とするデータ授受の場合について考える。
By providing the next area number storage area 81 in the management area 10-i, the areas can be connected and can be exchanged by one-time communication using the method shown in the first embodiment. You will be able to transfer the missing data at once. For example, as shown in FIG.
Consider a case where the portion corresponding to the area 3 is not used for communication and the data is transmitted and received requiring the area shown in FIG. 10B.

【0062】この場合にあって、図10(c)に示すよ
うにエリア1の全てとエリア3の一部を通信に使用す
る。このときの管理エリア10−1と管理エリア10−
3の内容は、図10(d)に示すようになる。管理エリ
ア10−1の次エリア番号格納エリア81には、エリア
3を示す値が入り、要求エリア先頭オフセット格納エリ
ア82には、エリア1の先頭までのオフセット値、要求
エリア長格納エリア83には、エリア1のサイズが登録
される。また、応答エリア先頭オフセット格納エリア8
4には、「なし」を示す値、応答エリア長格納エリア8
5には“0”が格納される。
In this case, as shown in FIG. 10C, the entire area 1 and a part of the area 3 are used for communication. Management area 10-1 and management area 10- at this time
The contents of 3 are as shown in FIG. A value indicating the area 3 is entered in the next area number storage area 81 of the management area 10-1, the offset value to the beginning of the area 1 is stored in the required area start offset storage area 82, and the required area length storage area 83 is stored in the required area length storage area 83. , The size of area 1 is registered. In addition, the response area top offset storage area 8
4, a value indicating “none”, a response area length storage area 8
“0” is stored in 5.

【0063】一方、管理エリア10−3では、ハンドシ
ェークフラグ格納エリア80に、「使用中」を示すフラ
グが入り、次エリア番号格納エリア81には、「なし」
を示す値が格納される。そして、FAコントローラ1が
上記のような設定を行った後、管理エリア10−1のハ
ンドシェークフラグ格納エリア80に、「要求あり」を
示す数値をセットすると、プログラマブルコントローラ
2側では、まず、管理エリア10−1中の要求エリアの
オフセットとサイズを参照して、エリア1のデータを読
み出し、さらに、次エリア番号格納エリア81中の数値
に基づいて管理エリア10−3中の要求データを読み出
す。このとき、次エリア番号格納エリア81が「なし」
なので、要求データの読み出しを終了し、要求された処
理(デバイスデータの読み出し/書き込み、ネットワー
ク情報収集、シーケンスプログラム実行停止等)を実行
する。
On the other hand, in the management area 10-3, a flag indicating "in use" is entered in the handshake flag storage area 80, and "none" in the next area number storage area 81.
A value indicating is stored. Then, after the FA controller 1 makes the settings as described above, when a numerical value indicating “requested” is set in the handshake flag storage area 80 of the management area 10-1, the programmable controller 2 firstly manages the management area. By referring to the offset and size of the request area in 10-1, the data in area 1 is read, and further, the request data in the management area 10-3 is read based on the numerical value in the next area number storage area 81. At this time, the next area number storage area 81 is “none”
Therefore, the reading of the requested data is completed, and the requested processing (reading / writing of device data, network information collection, sequence program execution stop, etc.) is executed.

【0064】また、上記において、応答データを返送す
る場合には、まず、管理エリア10−1の応答エリア先
頭オフセット格納エリア84を調べると、「なし」を示
す値が入っているので、さらに、次エリアであるエリア
3の応答エリア先頭オフセット格納84を調べる。そし
て、応答データを応答エリアに格納して、管理エリア1
0−1のハンドシェークフラグ格納エリア80に、「応
答あり」を示す値をセットする。なお、この実施例で
は、2つのエリアを連結して使用する方法について説明
したが、連結するエリアは複数であってよい。また、要
求エリア11−iおよび応答エリア12−iが共に複数
エリアにまたがっていてもよい。
Further, in the above, when returning the response data, first, when the response area start offset storage area 84 of the management area 10-1 is checked, a value indicating "none" is entered. The response area head offset storage 84 of the area 3, which is the next area, is checked. Then, the response data is stored in the response area, and the management area 1
In the 0-1 handshake flag storage area 80, a value indicating "responding" is set. In this embodiment, the method of connecting and using two areas has been described, but a plurality of areas may be connected. Further, both the request area 11-i and the response area 12-i may extend over a plurality of areas.

【0065】また、この第2の実施例では、上記第1の
実施例の処理に対して、次の処理を加えることが必要と
なる。すなわち、 エリアの連結時に通信に使用していないエリアを見
つける処理、 次エリア番号格納エリア81に、次エリア番号およ
び「なし」を示す値を格納する処理、 エリアのオフセットおよびサイズを計算して登録す
る処理、 要求データおよび応答データの読み出し/書き込み
時に、エリア毎に管理エリア10−iを参照し、アクセ
スするアドレスを変更する処理、である。
In addition, in the second embodiment, it is necessary to add the following processing to the processing of the first embodiment. That is, a process of finding an area that is not used for communication when linking areas, a process of storing a next area number and a value indicating "none" in the next area number storage area 81, an area offset and a size are calculated and registered. The process is to refer to the management area 10-i for each area at the time of reading / writing request data and response data, and changing the address to be accessed.

【0066】上記において、処理時間の面から考える
と、特に、,の処理に時間を要する。したがって、
複数エリアに渡るような大量のデータを取り扱わなけ
ば、上記第1の実施例の方がより高速に処理できる。し
かし、第2の実施例においても、予め確保されているエ
リアを連結する方式をとっているため、空き領域を探索
し、確保する方式に比べて十分に高速であり、リアルタ
イムでデータを授受する場合にあっても何ら悪影響を与
えることはない。
Considering the processing time in the above, it takes a long time to process ,. Therefore,
If a large amount of data that covers a plurality of areas is not handled, the first embodiment can process at higher speed. However, also in the second embodiment, since the method of connecting the areas secured in advance is adopted, it is sufficiently faster than the method of searching for and securing a free area, and data is exchanged in real time. In any case, there is no adverse effect.

【0067】したがって、マルチタスク処理において、
複数のタスクから待ち時間なしで、要求を出力すること
ができる。これは、例えば、生産ラインにおいて、生産
する品目の切り替わり時に、プログラマブルコントロー
ラのシーケンスプログラムを次の生産品目に書き換える
場合、最後のワークが通過した時点で、作業を終えたプ
ログラマブルコントローラ2にシーケンスプログラムを
ダウンロードさせることができ、段取り時間を大幅に短
縮させることができる。
Therefore, in multitask processing,
Requests can be output from multiple tasks without waiting. For example, when the sequence program of the programmable controller is rewritten to the next production item at the time of switching the item to be produced on the production line, the sequence program is sent to the programmable controller 2 that has finished the work when the last work passes. It can be downloaded and the setup time can be greatly reduced.

【0068】〔実施例3〕次に、第3の実施例について
説明する。この発明の第3の実施例として、ユーザプロ
グラムにより、FAコントローラ1からプログラマブル
コントローラ2のデータを読み出す処理方法について説
明する。図11は、FAコントローラ1からプログラマ
ブルコントローラ2のデータを読み出すユーザプログラ
ムの動作を示すフローチャートである。
[Third Embodiment] Next, a third embodiment will be described. As a third embodiment of the present invention, a processing method for reading data of the programmable controller 2 from the FA controller 1 by a user program will be described. FIG. 11 is a flowchart showing the operation of the user program for reading the data of the programmable controller 2 from the FA controller 1.

【0069】図11において、まず、N個の管理エリア
10−iの中から使用可能なエリアを探索する管理エリ
ア10−iの番号をiとし、i=0とする初期化を行い
(S1)、さらに、i=i+1とする(S2)。次に、
i>Nであるか否かを判断する(S3)。このステップ
S3において、i>Nであると判断した場合には、プロ
グラマブルコントローラ2がビジーであり(S4)、一
方、上記ステップS3において、iがNを越えていない
と判断した場合には、管理エリアiのハンドシェークフ
ラグ格納エリアから、ハンドシェークフラグを読み込む
(S5)。
In FIG. 11, first, the number of the management area 10-i for searching the usable area from the N management areas 10-i is set to i, and initialization is performed to set i = 0 (S1). , And i = i + 1 (S2). next,
It is determined whether i> N (S3). If it is determined in step S3 that i> N, the programmable controller 2 is busy (S4), while if it is determined in step S3 that i does not exceed N, management is performed. The handshake flag is read from the handshake flag storage area of area i (S5).

【0070】上記ステップS5においてハンドシェーク
フラグを読み込んだ後、さらに、該ハンドシェークフラ
グが「使用可」を示す値であるか否かを判断する(S
6)。このステップS6において、ハンドシェークフラ
グが「使用可」を示す値ではないと判断した場合には、
上記ステップS2に戻り、次の管理エリアをチェックす
る。なお、上記のように、管理エリアが使用可能である
か否かをチェックすることにより、マルチタスク処理に
おいて、複数のタスクがプログラマブルコントローラ2
にも、前の要求が終了するのを待つことなく、空いてい
るエリアを用いて要求を出力することができる。
After reading the handshake flag in step S5, it is further determined whether or not the handshake flag is a value indicating "usable" (S).
6). If it is determined in step S6 that the handshake flag is not a value indicating "available",
Returning to step S2, the next management area is checked. As described above, by checking whether or not the management area is available, a plurality of tasks can be executed by the programmable controller 2 in the multitask processing.
Also, it is possible to output a request using an empty area without waiting for the previous request to be completed.

【0071】一方、上記ステップS6において、ハンド
シェークフラグが「使用可」を示す値であると判断した
場合には、ハンドシェークフラグを「使用中」を示す値
にセットし(S7)、他のタスクが、そのエリアを使用
できないようにする。そして、管理エリア中の要求エリ
ア長格納エリアに要求に必要なデータサイズを格納する
(S8)。次に、応答エリア12−iが要求エリア11
−iの次のアドレスから始まるように応答エリア先頭オ
フセット格納エリアに、要求エリア先頭オフセット+要
求データサイズを格納する(S9)。
On the other hand, when it is determined in step S6 that the handshake flag has a value indicating "usable", the handshake flag is set to a value indicating "in use" (S7), and another task is set. , Make the area unusable. Then, the data size required for the request is stored in the required area length storage area in the management area (S8). Next, the response area 12-i is the request area 11
The request area start offset + request data size is stored in the response area start offset storage area so as to start from the address next to -i (S9).

【0072】このように管理エリア10−i内における
要求エリア11−iと応答エリア12−iのサイズをユ
ーザプログラムから制御することができるため、ユーザ
が実行したい要求に応じて、要求エリア11−iおよび
応答エリア12−iを有効に活用することができる。
Since the sizes of the request area 11-i and the response area 12-i in the management area 10-i can be controlled by the user program in this way, the request area 11-i can be controlled in accordance with the user's request. i and the response area 12-i can be effectively utilized.

【0073】次に、上記ステップS9を実行後、応答エ
リア長格納エリアに応答データサイズを格納する(S1
0)。このように管理エリア10−i内における要求エ
リア11−iと応答エリア12−iの設定が終了した
後、要求エリア先頭オフセットで示されるアドレスに要
求データを書き込み(S11)、そして、ハンドシェー
クフラグを「要求あり」にセットする(S12)。次
に、ハンドシェークフラグが「応答あり」を示す値であ
るか否かを判断する(S13)。このステップS13に
おいて、ハンドシェークフラグが「応答あり」を示す値
であると判断した場合には、応答エリア先頭オフセット
により示されるアドレスから応答データを読み出す(S
14)。最後に、ハンドシェークフラグを「使用可」を
示す値に戻して(S15)、エリアを開放する。
Next, after executing step S9, the response data size is stored in the response area length storage area (S1).
0). After setting the request area 11-i and the response area 12-i in the management area 10-i in this way, the request data is written in the address indicated by the request area start offset (S11), and the handshake flag is set. Set to "Requested" (S12). Next, it is determined whether or not the handshake flag is a value indicating "response is received" (S13). When it is determined in step S13 that the handshake flag has a value indicating "response is present", response data is read from the address indicated by the response area start offset (S).
14). Finally, the handshake flag is returned to a value indicating "usable" (S15), and the area is opened.

【0074】なお、上記第1〜第3の実施例では、FA
コントローラ1とプログラマブルコントローラ2との通
信に、この発明を利用する場合について説明したが、F
Aコントローラ1とその他のボード(制御機器)との通
信にも、適用することができる。
In the first to third embodiments, the FA
The case where the present invention is used for the communication between the controller 1 and the programmable controller 2 has been described.
It can also be applied to communication between the A controller 1 and other boards (control devices).

【0075】[0075]

【発明の効果】以上説明したように、この発明に係るデ
ータ授受システムおよびその方法によれば、要求エリア
と応答エリアへのアクセスは、全て管理エリア内におけ
るデータに基づいて実行しており、管理エリア内におけ
る要求エリア先頭オフセット格納エリア、要求エリア長
格納エリア、応答エリア先頭オフセット格納エリア、応
答エリア長格納エリアの値を変えることによって、要求
エリアは可変長となり、したがって、読出要求時には、
要求エリアを小さく、応答エリアを大きく設定し、これ
とは反対に、書込要求時には、要求エリアを大きく、応
答エリアを小さく設定することにより、一度に取り扱う
データ量を増加させることができる。
As described above, according to the data transfer system and method according to the present invention, all access to the request area and the response area is executed based on the data in the management area, and the management is performed. By changing the values of the request area start offset storage area, the request area length storage area, the response area start offset storage area, and the response area length storage area in the area, the request area becomes a variable length.
By setting the request area small and the response area large, and conversely, when writing is requested, the request area is set large and the response area is set small so that the amount of data handled at one time can be increased.

【0076】また、マルチタスク処理において、複数の
タスクから待ち時間なしで、要求を出力することがで
き、これは、例えば、生産ラインにおいて、生産する品
目の切り替わり時に、プログラマブルコントローラのシ
ーケンスプログラムを次の生産品目に書き換える場合、
最後のワークが通過した時点で、作業を終えたプログラ
マブルコントローラにシーケンスプログラムをダウンロ
ードさせることができ、段取り時間を大幅に短縮させる
ことができる。
Further, in multitask processing, a request can be output from a plurality of tasks without waiting time. This means that, for example, when switching the items to be produced in the production line, the sequence program of the programmable controller When rewriting to the production item of
When the last work passes, the programmable controller that has finished the work can download the sequence program, and the setup time can be greatly shortened.

【0077】また、管理エリア内における要求エリアと
応答エリアのサイズをユーザプログラムから制御するこ
とができるため、ユーザが実行したい要求に応じて要求
エリアおよび応答エリアを有効に活用することができ
る。
Since the sizes of the request area and the response area in the management area can be controlled by the user program, the request area and the response area can be effectively used according to the request that the user wants to execute.

【0078】この結果、FAコントローラとプログラマ
ブルコントローラ間におけるデータ授受において、共有
記憶装置を有効に活用し、プログラマブルコントローラ
のシーケンス制御に影響を与えることなく効率のよい通
信を実現すると共に、FAコントローラのマルチタスク
処理にて待ち時間の短縮化を実現することができる。
As a result, in exchanging data between the FA controller and the programmable controller, the shared storage device is effectively utilized, efficient communication is realized without affecting the sequence control of the programmable controller, and the FA controller multi-function is realized. It is possible to shorten the waiting time in task processing.

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

【図1】この発明に係るデータ授受システム全体の概略
構成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of an entire data transfer system according to the present invention.

【図2】この発明に係る管理エリアの詳細構成を示す説
明図である。
FIG. 2 is an explanatory diagram showing a detailed configuration of a management area according to the present invention.

【図3】FAコントローラがプログラマブルコントロー
ラからデータを読み出す場合における要求データおよび
応答データのデータ構造を示す説明図である。
FIG. 3 is an explanatory diagram showing data structures of request data and response data when the FA controller reads data from the programmable controller.

【図4】FAコントローラがプログラマブルコントロー
ラにデータを書き込む場合における要求データおよび応
答データのデータ構造を示す説明図である。
FIG. 4 is an explanatory diagram showing data structures of request data and response data when the FA controller writes data to the programmable controller.

【図5】この発明に係るFAコントローラ側における通
信処理の動作を示すフローチャートである。
FIG. 5 is a flowchart showing an operation of communication processing on the FA controller side according to the present invention.

【図6】この発明に係るプログラマブルコントローラ側
における通信処理の動作を示すフローチャートである。
FIG. 6 is a flowchart showing an operation of communication processing on the programmable controller side according to the present invention.

【図7】この発明に係る共有記憶装置のメモリ状態(実
施例1)を示す説明図である。
FIG. 7 is an explanatory diagram showing a memory state (first embodiment) of the shared storage device according to the present invention.

【図8】この発明に係る共有記憶装置の空き領域とエリ
アの状態(実施例1)を示す説明図である。
FIG. 8 is an explanatory diagram showing states of empty areas and areas (first embodiment) of the shared storage device according to the present invention.

【図9】この発明に係る管理エリアの詳細構成(実施例
2)を示す説明図である。
FIG. 9 is an explanatory diagram showing a detailed configuration (second embodiment) of a management area according to the present invention.

【図10】この発明に係る共有記憶装置のエリア状態
(実施例2)を示す説明図である。
FIG. 10 is an explanatory diagram showing an area state (second embodiment) of the shared storage device according to the present invention.

【図11】FAコントローラからプログラマブルコント
ローラのデータを読み出すユーザプログラムの動作を示
すフローチャートである。
FIG. 11 is a flowchart showing an operation of a user program for reading data of the programmable controller from the FA controller.

【図12】従来におけるデータ授受システム全体の概略
構成を示すブロック図である。
FIG. 12 is a block diagram showing a schematic configuration of an entire conventional data transfer system.

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

1 FAコントローラ 2 プログラマブルコントーラ 3 CPU(FAコントローラ用) 5 CPU(プログラマブルコントローラ用) 7 共有記憶装置 10−i 管理エリア 11−i 要求エリア 12−i 応答エリア 20 ハンドシェークフラグ格納エリア 21 要求エリア先頭オフセット格納エリア 22 要求エリア長格納エリア 23 応答エリア先頭オフセット格納エリア 24 応答エリア長格納エリア 30 要求データ 35 応答データ 40 要求データ 45 応答データ 80 ハンドシェークフラグ格納エリア 81 次エリア番号格納エリア 82 要求エリア先頭オフセット格納エリア 83 要求エリア長格納エリア 84 応答エリア先頭オフセット格納エリア 85 応答エリア長格納エリア 1 FA Controller 2 Programmable Controller 3 CPU (For FA Controller) 5 CPU (For Programmable Controller) 7 Shared Memory 10-i Management Area 11-i Request Area 12-i Response Area 20 Handshake Flag Storage Area 21 Request Area Start Offset Storage Area 22 Request area length storage area 23 Response area start offset storage area 24 Response area length storage area 30 Request data 35 Response data 40 Request data 45 Response data 80 Handshake flag storage area 81 Next area number storage area 82 Request area start offset storage area 83 request area length storage area 84 response area start offset storage area 85 response area length storage area

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 要求データを格納する要求エリアと、応
答データを格納する応答エリアを複数組設け、該要求エ
リアと応答エリアのサイズを各組毎に可変長可能に管理
する管理エリアとからなる共有記憶手段と、前記要求エ
リアと応答エリアのデータサイズをセットし、要求エリ
アに要求データをセットするFAコントローラと、前記
FAコントローラの要求データを読み出して、所定の処
理を実行し、応答エリアに応答データを書き込み、FA
コントローラに応答するプログラマブルコントローラと
を具備することを特徴とするデータ授受システム。
1. A request area for storing request data, and a management area for providing a plurality of sets of response areas for storing response data and managing the size of the request area and the response area so that each set can have a variable length. A shared storage unit, an FA controller that sets the data size of the request area and the response area, and sets the request data in the request area, and reads the request data from the FA controller, executes a predetermined process, and sets the response area. Write response data, FA
A data transfer system comprising a programmable controller responsive to the controller.
【請求項2】 前記FAコントローラは、要求の種類を
示す要求コードと要求ブロックの数を示すブロック数を
設定して前記プログラマブルコントローラのデータを授
受することを特徴とする請求項1記載のデータ授受シス
テム。
2. The data exchange according to claim 1, wherein the FA controller exchanges data of the programmable controller by setting a request code indicating a request type and a block number indicating the number of request blocks. system.
【請求項3】 前記管理エリアは、要求および応答の有
無を判別するための値を格納するフラグ格納エリアと、
要求エリアの先頭アドレスまでのオフセット値を格納す
る要求エリア先頭オフセット格納エリアと、要求エリア
のエリア長を格納する要求エリア長格納エリアと、応答
エリアの先頭アドレスまでのオフセット値を格納する応
答エリア先頭オフセット格納エリアと、応答エリアのエ
リア長を格納する応答エリア長格納エリアとから成るこ
とを特徴とする請求項1記載のデータ授受システム。
3. The management area, a flag storage area for storing a value for determining the presence or absence of a request and a response,
Request area head offset storage area that stores the offset value to the start address of the request area, request area length storage area that stores the area length of the request area, and response area head that stores the offset value to the start address of the response area 2. The data transfer system according to claim 1, comprising an offset storage area and a response area length storage area for storing the area length of the response area.
【請求項4】 前記共有記憶手段の管理エリアに、1回
の通信で2つ以上の要求エリアあるいは応答エリアを使
用する場合における次のエリア番号を格納する次エリア
番号格納エリアを設けたことを特徴とする請求項1記載
のデータ授受システム。
4. The next area number storage area for storing the next area number when two or more request areas or response areas are used in one communication is provided in the management area of the shared storage means. The data transfer system according to claim 1, which is characterized in that.
【請求項5】 要求エリアに要求データを書き込む際
に、管理エリアのハンドシェークフラグに基づいて使用
可能な要求エリアを探索し、該要求エリアのサイズに応
じて管理エリア中の要求エリア長と応答エリア先頭オフ
セットを更新し、応答データのサイズに応じて応答エリ
ア長を更新し、FAコントローラとプログラマブルコン
トローラ間においてデータ授受を実行することを特徴と
するデータ授受方法。
5. When writing request data to the request area, a usable request area is searched based on the handshake flag of the management area, and the request area length and the response area in the management area are determined according to the size of the request area. A data transfer method comprising updating a head offset, updating a response area length according to a size of response data, and executing data transfer between the FA controller and the programmable controller.
JP18393893A 1993-07-26 1993-07-26 Data transfer system and method Expired - Lifetime JP2848762B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18393893A JP2848762B2 (en) 1993-07-26 1993-07-26 Data transfer system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18393893A JP2848762B2 (en) 1993-07-26 1993-07-26 Data transfer system and method

Publications (2)

Publication Number Publication Date
JPH0736370A true JPH0736370A (en) 1995-02-07
JP2848762B2 JP2848762B2 (en) 1999-01-20

Family

ID=16144435

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18393893A Expired - Lifetime JP2848762B2 (en) 1993-07-26 1993-07-26 Data transfer system and method

Country Status (1)

Country Link
JP (1) JP2848762B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6783374B2 (en) 1999-12-21 2004-08-31 Murata Manufacturing Co., Ltd. Electronic component, coaxial connector, and communication device
JP4492778B2 (en) * 2001-08-30 2010-06-30 豊和工業株式会社 Communication system in monitoring system
USRE41473E1 (en) 2003-09-12 2010-08-03 Molex Incorporated Board-to-board electrical connector assembly
US8083530B2 (en) 2007-08-22 2011-12-27 Autonetworks Technologies, Ltd. Circuit board connector

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6783374B2 (en) 1999-12-21 2004-08-31 Murata Manufacturing Co., Ltd. Electronic component, coaxial connector, and communication device
JP4492778B2 (en) * 2001-08-30 2010-06-30 豊和工業株式会社 Communication system in monitoring system
USRE41473E1 (en) 2003-09-12 2010-08-03 Molex Incorporated Board-to-board electrical connector assembly
US8083530B2 (en) 2007-08-22 2011-12-27 Autonetworks Technologies, Ltd. Circuit board connector

Also Published As

Publication number Publication date
JP2848762B2 (en) 1999-01-20

Similar Documents

Publication Publication Date Title
US5940612A (en) System and method for queuing of tasks in a multiprocessing system
CN100454280C (en) Processor system, DMA control circuit, DMA control method, control method for DMA controller, graphic processing method, and graphic processing circuit
CN100373362C (en) Direct memory access controller
JPH02178756A (en) Schedule system for multi-processor work
JPH0944424A (en) Message transmission method between remote information-processing systems
JPH0736370A (en) Data transmitting and receiving system, and method therefor
JP2877095B2 (en) Multiprocessor system
EP1936514B1 (en) Apparatus and method for controlling issue of requests to another operation processing device
JP4152079B2 (en) Peripheral device of programmable controller
EP0578496B1 (en) Job execution method in multi-CPU system
US20090019259A1 (en) Multiprocessing method and multiprocessor system
EP0884682A2 (en) Cache memory management method for real time operating system
JPH0666061B2 (en) Multi CPU communication device
JP2001229136A (en) Unit and system for control and data transfer device
JPH0519179B2 (en)
JPH02245864A (en) Multiprocessor system
JPH0512173A (en) Information processor
JPS6239789B2 (en)
JP2913930B2 (en) Extended storage data transfer method
JPH08221106A (en) Programmable controller
KR20060009292A (en) Processing system and method for transmitting data
JPH056333A (en) Multi-processor system
JPH0535507A (en) Central processing unit
Avramov et al. Evaluation of two systems for distributed message passing in transputer networks
JP2966051B2 (en) Processor unit

Legal Events

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

Free format text: PAYMENT UNTIL: 20071106

Year of fee payment: 9

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

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20081106

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

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20081106

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

Year of fee payment: 11

Free format text: PAYMENT UNTIL: 20091106

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

Year of fee payment: 11

Free format text: PAYMENT UNTIL: 20091106

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

Year of fee payment: 12

Free format text: PAYMENT UNTIL: 20101106

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

Free format text: PAYMENT UNTIL: 20111106

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20121106

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20121106

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: 20131106

EXPY Cancellation because of completion of term