[go: up one dir, main page]

JP2001257696A - Communication method between master and slave - Google Patents

Communication method between master and slave

Info

Publication number
JP2001257696A
JP2001257696A JP2000068955A JP2000068955A JP2001257696A JP 2001257696 A JP2001257696 A JP 2001257696A JP 2000068955 A JP2000068955 A JP 2000068955A JP 2000068955 A JP2000068955 A JP 2000068955A JP 2001257696 A JP2001257696 A JP 2001257696A
Authority
JP
Japan
Prior art keywords
message
request message
node
master
slave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000068955A
Other languages
Japanese (ja)
Inventor
Kazuto Nagatsuka
一人 永塚
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2000068955A priority Critical patent/JP2001257696A/en
Publication of JP2001257696A publication Critical patent/JP2001257696A/en
Pending legal-status Critical Current

Links

Landscapes

  • Small-Scale Networks (AREA)

Abstract

(57)【要約】 【課題】 ネットワーク内に複数のマスタノードを設
け、各マスタノードが全てのスレーブノードとの通信を
可能にする。 【解決手段】 マスタノード10Bから自局を特定する
要求元局番と要求メッセージを識別する要求メッセージ
IDを付加して要求メッセージを送信し、これを受信し
たスレーブノード20Cは、要求メッセージに対する応
答メッセージに、要求メッセージに付加された要求元局
番と要求メッセージIDとを付加してこれをマスタノー
ド10Bに返信する。マスタノード10Bでは受信した
応答メッセージに付加された要求元局番及び要求メッセ
ージが、要求メッセージに付加したものと一致しないと
きには、この要求メッセージに対する応答メッセージで
はなく、例えば他のマスタノード10Aが送信した要求
メッセージであると認識する。
(57) [Problem] To provide a plurality of master nodes in a network, and enable each master node to communicate with all slave nodes. SOLUTION: A request message ID is added from a master node 10B by adding a request source station number for identifying the own station and a request message ID for identifying the request message, and a slave node 20C receiving this transmits a request message to the response message to the request message. The request source station number and the request message ID added to the request message are added, and the request message ID is returned to the master node 10B. In the master node 10B, when the request source station number and the request message added to the received response message do not match those added to the request message, the request is not a response message to the request message, but is a request transmitted by another master node 10A, for example. Recognize it as a message.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、マスタスレーブ
方式のネットワークシステムにおいて、ネットワーク内
に複数のマスタノードを設け、これらマスタノードとス
レーブノードとの間で通信を行うようにしたマスタスレ
ーブ間の通信方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a master-slave type network system in which a plurality of master nodes are provided in a network and communication is performed between the master nodes and the slave nodes. About the method.

【0002】[0002]

【従来の技術】従来、マスタスレーブ方式のネットワー
クシステムにおいては、ネットワークシステム内の一つ
のノードがマスタノードとなり、データ伝送を行うよう
になっている。そして、マスタノードからスレーブノー
ドにデータを送信するときには、マスタノードが、送信
データを含むデータライトメッセージをスレーブノード
に送信し、これを受信したスレーブノードが、データラ
イトメッセージを受信したことを通知するためのACK
メッセージを前記データライトメッセージの送信元のマ
スタノードに返信する。逆に、マスタノードがスレーブ
ノードからデータを受信するときには、マスタノード
が、スレーブノードに対してデータリードメッセージを
送信し、これを受信したスレーブノードが所定のデータ
を、前記ACKメッセージに付加してマスタノードに送
信するようにしている。
2. Description of the Related Art Conventionally, in a master-slave type network system, one node in the network system becomes a master node and performs data transmission. Then, when transmitting data from the master node to the slave node, the master node transmits a data write message including the transmission data to the slave node, and the slave node that has received the data write message notifies that the data write message has been received. ACK for
A message is returned to the master node that transmitted the data write message. Conversely, when the master node receives data from the slave node, the master node transmits a data read message to the slave node, and the slave node that has received the data appends predetermined data to the ACK message. It is sent to the master node.

【0003】そして、例えばマスタノードがスレーブノ
ードから指定したデータを受信する場合等、スレーブノ
ードに対して何らかの処理を要求する場合、つまりトラ
ンザクションメッセージを送信する場合には、まずマス
タノードがデータライトメッセージにより、スレーブノ
ードに対して要求する処理内容を表す要求情報をスレー
ブノードに送信し、これによりスレーブノードでは要求
情報にしたがって所定の応答データを生成し、次に、マ
スタノードからデータリードメッセージが通知されたと
きに、生成した応答データをACKメッセージに付加し
て送信するようにしている。
When the master node requests some processing to the slave node, for example, when the master node receives data specified from the slave node, that is, when a transaction message is transmitted, the master node first transmits a data write message. , The request information indicating the processing contents requested to the slave node is transmitted to the slave node, whereby the slave node generates predetermined response data according to the request information, and then a data read message is notified from the master node. Then, the generated response data is added to the ACK message and transmitted.

【0004】[0004]

【発明が解決しようとする課題】前記スレーブノードで
は、データライトメッセージにより通知された要求情報
に基づいて所定の応答データを生成し、次にデータリー
ドメッセージを受信したときに、このデータリードメッ
セージの送信元に対して前記応答データを送信するよう
にしている。このため、例えば複数のノードから、スレ
ーブノードに対する要求情報を通知するためのデータラ
イトメッセージを受信したときには、先に受信したデー
タライトメッセージを有効とし、このメッセージで指定
された要求情報にしたがって所定の応答データを生成す
ることになる。そして、スレーブノードでは、データリ
ードメッセージを受信したときに、その送信元のマスタ
ノードに応答データを送信するようになっている。
In the slave node, predetermined response data is generated based on the request information notified by the data write message, and when the data read message is received next, the slave node generates the response data. The response data is transmitted to the transmission source. For this reason, for example, when a data write message for notifying the request information to the slave node is received from a plurality of nodes, the previously received data write message is validated, and a predetermined data write message is specified according to the request information specified in the message. Response data will be generated. Then, when the slave node receives the data read message, the slave node transmits response data to the master node of the transmission source.

【0005】このとき、スレーブノードでは、データラ
イトメッセージが無効となったマスタノードであって
も、このマスタノードからデータリードメッセージを受
信したならば、応答データを送信することになるため、
無効となったマスタノードには、自己が要求した要求情
報に対する応答データではない応答データを送信するこ
とになる。このため、マスタノードでは、実際には自己
が要求した要求情報に対する応答データではないにも係
わらず、この受信した応答データに基づいて処理を実行
してしまう場合がある。
[0005] At this time, even if the slave node receives the data read message from the master node, the slave node will transmit response data even if the master node has invalidated the data write message.
Response data that is not response data to the request information requested by itself will be transmitted to the invalidated master node. For this reason, the master node may execute processing based on the received response data although the master node does not actually respond to the request information requested by itself.

【0006】そのため、ネットワーク内に複数のマスタ
ノードを設けることができず、ネットワーク内にはマス
タノードを一つのみ設けてこれにより各スレーブノード
との通信を行うようにしている。また、複数のマスタノ
ードを持つことのできる通信方式も考えられているが、
この場合、一台のスレーブノードはある決まったマスタ
ノードとの間でしか通信を行うことができず、同じネッ
トワーク内にあってもマスタノード及びスレーブノード
は通信先のノードに制約を受けるという問題がある。
[0006] Therefore, a plurality of master nodes cannot be provided in the network, and only one master node is provided in the network, thereby performing communication with each slave node. Also, a communication method that can have multiple master nodes is being considered,
In this case, one slave node can communicate only with a certain master node, and the master node and the slave node are restricted by the communication destination node even in the same network. There is.

【0007】そこで、この発明は、上記従来の未解決の
課題に着目してなされたものであり、ネットワーク内に
複数のマスタノードを設けた場合でも、これらマスタノ
ードとスレーブノードとの間でその通信先に制約を受け
ることなく通信を行うことの可能なマスタスレーブ間の
通信方式を提供することを目的としている。
Accordingly, the present invention has been made in view of the above-mentioned conventional unsolved problem, and even when a plurality of master nodes are provided in a network, the master node and the slave nodes are not connected to each other. An object of the present invention is to provide a communication method between a master and a slave that can perform communication without being restricted by a communication destination.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、本発明の請求項1に係るマスタスレーブ間の通信方
式は、マスタノードが送信した要求メッセージを受信し
たスレーブノードが当該要求メッセージに対する応答メ
ッセージを生成し、マスタノードが送信したデータリー
ドメッセージを受信したスレーブノードが当該データリ
ードメッセージの送信元のマスタノードに前記応答メッ
セージを送信するようにしたマスタスレーブ間の通信方
式において、前記マスタノードは前記要求メッセージに
当該要求メッセージを識別するための識別情報を付加し
て送信し、前記スレーブノードは前記要求メッセージに
付加された前記識別情報を前記応答メッセージに付加し
て送信し、前記マスタノードは受信した応答メッセージ
に付加された識別情報及び前記要求メッセージに付加し
た識別情報から受信した応答メッセージと前記要求メッ
セージとの対応を判別するようになっていることを特徴
としている。
In order to achieve the above object, according to the first aspect of the present invention, there is provided a communication method between a master and a slave, wherein a slave node receiving a request message transmitted by a master node responds to the request message. In a communication method between a master and a slave, wherein a response message is generated and a slave node that has received a data read message transmitted by a master node transmits the response message to a master node that has transmitted the data read message, The node transmits the request message with identification information for identifying the request message added thereto, and the slave node adds the identification information added to the request message to the response message and transmits the response message, The node identifies the response message received It is characterized by being adapted to determine the correspondence between the response message to the request message received from the identification information added to the broadcast and the request message.

【0009】この請求項1に係る発明では、マスタノー
ドではスレーブノードに対してトランザクションメッセ
ージ等要求メッセージを送信するときには、この要求メ
ッセージにこの要求メッセージを識別するための識別情
報、例えばID番号等を付加して送信する。一方、要求
メッセージを受信したスレーブノードでは、その要求メ
ッセージで指定される応答メッセージを生成し、マスタ
ノードからデータリードメッセージを受信したときに、
このデータリードメッセージの送信元のマスタノードに
対して、先に生成した応答メッセージを送信する。この
とき、スレーブノードでは、要求メッセージに付加され
た識別情報を応答メッセージに付加して送信する。
According to the first aspect of the present invention, when the master node transmits a request message such as a transaction message to the slave node, the request message includes identification information for identifying the request message, for example, an ID number. Add and send. On the other hand, the slave node receiving the request message generates a response message specified by the request message, and when receiving the data read message from the master node,
The previously generated response message is transmitted to the master node that has transmitted the data read message. At this time, the slave node adds the identification information added to the request message to the response message and transmits it.

【0010】そして、マスタノードでは、要求メッセー
ジを送信するときに付加した識別情報を予め記憶してお
き、応答メッセージを受信したときにこの応答メッセー
ジに付加された識別情報と、予め記憶している要求メッ
セージに付加した識別情報とが一致するかどうかを判定
し、一致しているならば、先に送信した要求メッセージ
に対する応答メッセージであると認識する。逆に、一致
していないときには、先に送信した要求メッセージに対
する応答ではなく、例えば他のマスタノードが送信した
要求メッセージに対する応答であると認識する。
In the master node, the identification information added when transmitting the request message is stored in advance, and when the response message is received, the identification information added to the response message is stored in advance. It is determined whether or not the identification information added to the request message matches, and if they match, it is recognized as a response message to the previously transmitted request message. Conversely, if they do not match, it recognizes that this is not a response to the previously transmitted request message, but a response to, for example, a request message transmitted by another master node.

【0011】ここで、例えばネットワークシステム内に
複数のマスタノードが設けられ、これら複数のマスタノ
ードが一つのスレーブノードに対して要求メッセージを
送信した場合、スレーブノードでは何れか一つのマスタ
ノードからの要求メッセージに対する応答メッセージを
生成し、データリードメッセージを受信したときに、こ
の応答メッセージをデータリードメッセージの送信元に
送信することになる。よって、各マスタノードが要求メ
ッセージを送信後、データリードメッセージを送信した
とき、全てのマスタノードに対して、ある一つのマスタ
ノードからの要求メッセージに対する応答メッセージが
送信されることになるが、各マスタノードでは、自ノー
ドが送信した要求メッセージに対する応答であるかどう
かを認識することができる。よって、ネットワークシス
テム内に複数のマスタノードが存在する場合であって
も、各マスタノードは所望のスレーブノードと通信を行
うことが可能となる。
Here, for example, when a plurality of master nodes are provided in a network system, and the plurality of master nodes transmit a request message to one slave node, the slave node receives a request message from any one of the master nodes. A response message to the request message is generated, and when the data read message is received, the response message is transmitted to the source of the data read message. Therefore, when each master node transmits a request message and then transmits a data read message, a response message to a request message from a certain master node is transmitted to all master nodes. The master node can recognize whether or not the response is to the request message transmitted by the own node. Therefore, even when a plurality of master nodes exist in the network system, each master node can communicate with a desired slave node.

【0012】また、請求項2に係るマスタスレーブ間の
通信方式は、前記マスタノードは、受信した応答メッセ
ージに付加された識別情報と前記要求メッセージに付加
した識別情報とが一致するとき、前記応答メッセージの
送信元のスレーブノードに受信完了メッセージを送信
し、前記スレーブノードは、前記受信完了メッセージを
受信するまで前記応答メッセージを保持するようになっ
ていることを特徴としている。
Further, in the communication method between the master and the slave according to the present invention, when the identification information added to the received response message coincides with the identification information added to the request message, the master node responds to the response message. A reception completion message is transmitted to a slave node that has transmitted the message, and the slave node holds the response message until the reception completion message is received.

【0013】この請求項2に係る発明では、マスタノー
ドは、受信した応答メッセージに付加された識別情報
と、先に要求メッセージを送信する際に付加した識別情
報とが一致するときに、受信完了メッセージを受信した
応答メッセージの送信元のスレーブノードに送信する。
一方、スレーブノードでは要求メッセージに対する応答
メッセージを生成したときに、この応答メッセージを保
持しておき、受信完了メッセージを受信したときにこれ
を削除する。
According to the second aspect of the present invention, when the identification information added to the received response message matches the identification information added when the request message was transmitted earlier, the master node completes the reception. The message is transmitted to the slave node that has transmitted the response message.
On the other hand, when the slave node generates a response message to the request message, it holds this response message and deletes it when it receives the reception completion message.

【0014】つまり、マスタノードでは要求メッセージ
に対する応答メッセージを受信したときに受信完了メッ
セージを送信するから、スレーブノードでは、要求メッ
セージの送信元のマスタノードが、応答メッセージを確
実に受信し、すなわち、マスタノードとスレーブノード
との間でのメッセージ授受が確実に終了した時点で応答
メッセージを削除するから、識別情報の異なる応答メッ
セージを受信したマスタノードでは、応答メッセージの
送信元のスレーブノードが他の要求メッセージに対する
処理中であることを認識することが可能となる。
That is, since the master node transmits a reception completion message when receiving a response message to the request message, the slave node surely receives the response message from the master node which is the transmission source of the request message. Since the response message is deleted when the message exchange between the master node and the slave node has been securely completed, the master node that has received the response message with different identification information may send the response message to another slave node. It is possible to recognize that the processing is being performed on the request message.

【0015】また、本発明の請求項3に係るマスタスレ
ーブ間の通信方式は、前記識別情報は、前記要求メッセ
ージの送信元のマスタノードを特定する局識別情報であ
ることを特徴としている。この請求項3に係る発明で
は、識別情報として、要求メッセージの送信元のマスタ
ノードを特定する局識別情報が設定される。よって、識
別情報の異なる応答メッセージを受信したマスタノード
では、この応答メッセージの送信元のスレーブノードが
どのマスタノードと通信を行っているのかを認識するこ
とが可能となる。
According to a third aspect of the present invention, there is provided a communication method between a master and a slave, wherein the identification information is station identification information for identifying a master node of a transmission source of the request message. According to the third aspect of the present invention, the station identification information for specifying the master node of the transmission source of the request message is set as the identification information. Therefore, the master node that has received the response message with the different identification information can recognize with which master node the slave node that is the source of the response message is communicating.

【0016】また、本発明の請求項4に係るマスタスレ
ーブ間の通信方式は、前記識別情報は、前記局識別情報
とこの局識別情報で特定される局内で前記要求メッセー
ジを生成したタスクを特定するためのタスク識別情報と
から構成されることを特徴としている。この請求項4に
係る発明では、識別情報として、要求メッセージの送信
元のマスタノードを特定する局識別情報と、この局識別
情報で特定される局内でこの要求メッセージを生成した
タスクを特定するタスク識別情報とから構成される。よ
って、識別情報の異なる応答メッセージを受信したマス
タノードでは、この応答メッセージの送信元のスレーブ
ノードが、どのマスタノードのどのタスクとの間でメッ
セージの授受を行っているのかを認識することが可能と
なる。
According to a fourth aspect of the present invention, in the communication method between a master and a slave, the identification information specifies the station identification information and a task that has generated the request message in a station identified by the station identification information. And task identification information for performing the task. In the invention according to claim 4, as identification information, a station identification information for specifying a master node of a transmission source of a request message, and a task for specifying a task that has generated the request message in a station specified by the station identification information And identification information. Therefore, a master node that receives a response message with different identification information can recognize which slave node of which response message is transmitting / receiving a message to / from which task of the master node. Becomes

【0017】また、本発明の請求項5に係るマスタスレ
ーブ間の通信方式は、前記スレーブノードは、前記要求
メッセージを受信した後前記受信完了メッセージを受信
するまでの間に新たな要求メッセージを受信したときに
は、これを破棄するようになっていることを特徴として
いる。この請求項5に係る発明では、スレーブノードで
は、要求メッセージを受信した後、受信完了メッセージ
を受信するまでの間は、新たに要求メッセージを受信し
たとしてもこれを破棄し、他の要求メッセージに対する
処理は行わない。よって、他の要求メッセージを送信し
たマスタノードが、続いてデータリードメッセージを送
信したとしても、その応答として処理中の要求メッセー
ジに対する応答メッセージが送信されることになるか
ら、後から要求メッセージを送信したマスタノードは、
要求メッセージ送信先のスレーブノードが他の要求メッ
セージに対する処理を実行中であることを認識すること
が可能となる。
According to a fifth aspect of the present invention, there is provided the communication method between the master and the slave, wherein the slave node receives a new request message after receiving the request message and before receiving the reception completion message. It is characterized in that when it is done, it is discarded. According to the fifth aspect of the present invention, after receiving the request message, the slave node discards the new request message until it receives the reception completion message, even if a new request message is received, and responds to other request messages. No processing is performed. Therefore, even if the master node that has transmitted another request message subsequently transmits a data read message, a response message to the request message being processed is transmitted as a response, and the request message is transmitted later. The master node
It is possible to recognize that the slave node to which the request message is to be transmitted is executing a process for another request message.

【0018】また、本発明の請求項6に係るマスタスレ
ーブ間の通信方式は、前記マスタノードは、前記要求メ
ッセージに付加した識別情報と、受信した応答メッセー
ジに付加された識別情報とが一致しないときには、所定
時間経過後、前記要求メッセージを再送するようになっ
ていることを特徴としている。この請求項6に係る発明
では、マスタノードでは、受信した応答メッセージに付
加された識別情報と、要求メッセージに付加した識別情
報とが一致しないときには、所定時間経過したときに再
度要求メッセージを送信する。よって、例えば受信した
応答メッセージに付加された識別情報と、要求メッセー
ジに付加した識別情報とが一致しないときに、正常に通
信が行われている場合のスレーブノードのメッセージの
授受時間が経過した後再度要求メッセージを送信し、そ
れでも応答メッセージに付加された識別情報が異なると
きには、スレーブノードとその通信先のマスタノードと
の間のメッセージ授受が正常に行われていないとみなす
ことが可能となる。
In the communication method between a master and a slave according to claim 6 of the present invention, the master node does not match the identification information added to the request message with the identification information added to the received response message. Sometimes, after a lapse of a predetermined time, the request message is retransmitted. In the invention according to claim 6, in the case where the identification information added to the received response message does not match the identification information added to the request message, the master node transmits the request message again when a predetermined time has elapsed. . Therefore, for example, when the identification information added to the received response message does not match the identification information added to the request message, after the transmission / reception time of the message of the slave node when the communication is normally performed, If the request message is transmitted again and the identification information added to the response message is still different, it can be considered that the message exchange between the slave node and the master node of the communication destination is not normally performed.

【0019】さらに、本発明の請求項7に係るマスタス
レーブ間の通信方式は、前記マスタノードは、前記要求
メッセージを再送しても応答メッセージに付加された識
別情報と前記要求メッセージに付加した識別情報とが一
致しないときには、受信した応答メッセージに付加され
た識別情報で特定されるノードの状態を確認し、前記ノ
ードが異常であるときには、このノードに替わって前記
受信完了メッセージを送信するようになっていることを
特徴とする請求項6に記載のマスタスレーブ間の通信方
式。
Further, in the communication method between master and slave according to claim 7 of the present invention, the master node is capable of re-transmitting the request message even when re-transmitting the identification information added to the response message and the identification information added to the request message. When the information does not match, the state of the node specified by the identification information added to the received response message is checked, and when the node is abnormal, the reception completion message is transmitted instead of this node. 7. The communication method between a master and a slave according to claim 6, wherein:

【0020】この請求項7に係る発明では、マスタノー
ドでは、要求メッセージを再送しても、要求メッセージ
に付加した識別情報と受信した応答メッセージに付加さ
れた識別情報とが一致しないときには、受信した応答メ
ッセージに付加された識別情報で特定されるノードの状
態を確認する。ここで、ノードに何らかの異常が発生し
ているときつまり、ノード自体が異常のとき或いは要求
メッセージの送信元のタスクが異常のときには受信完了
メッセージが送信されないから、スレーブノードとの通
信中にマスタノードに異常が生じた場合等には、スレー
ブノードが他の要求メッセージを受け付けなくなる場合
がある。
In the invention according to claim 7, in the master node, when the identification information added to the request message does not match the identification information added to the received response message even if the request message is retransmitted, the master node receives the request message. Check the state of the node specified by the identification information added to the response message. Here, when any abnormality occurs in the node, that is, when the node itself is abnormal or the task of the source of the request message is abnormal, the reception completion message is not transmitted. For example, when an error occurs, the slave node may not accept another request message.

【0021】しかしながら、異常が生じたマスタノード
或いはタスクを検出したときには、これに替わって他の
マスタノードが受信完了メッセージを送信するから、ス
レーブノードは他の要求メッセージを受け付けることが
可能となる。
However, when a master node or a task in which an abnormality has occurred is detected, another master node transmits a reception completion message instead, so that the slave node can receive another request message.

【0022】[0022]

【発明の実施の形態】以下に、本発明の実施の形態を説
明する。図1は、本発明を適用したネットワークシステ
ムの一例であって、このネットワークシステム100
は、例えばマスタとして作動するマスタノード10A及
びマスタノード10Bと、スレーブとして作動する複数
のスレーブノード20とが通信回線Lで接続され、マス
タノード及びスレーブノード間で、マスタスレーブ方式
によってメッセージ伝送を行うようになっている。
Embodiments of the present invention will be described below. FIG. 1 shows an example of a network system to which the present invention is applied.
For example, a master node 10A and a master node 10B that operate as masters and a plurality of slave nodes 20 that operate as slaves are connected by a communication line L, and messages are transmitted between the master node and the slave nodes by a master-slave method. It has become.

【0023】前記マスタノード10(10A,10B)
は、スレーブノード20との間でメッセージの授受を行
い、スレーブノード20から受信したメッセージに基づ
いて所定の処理を実行する。そして、マスタノード10
とスレーブノード20との間でメッセージ授受を行う場
合には、マスタノード10が、スレーブノード20に対
して処理を要求するための要求メッセージを送信し、こ
れに対する応答としてスレーブノード20から応答メッ
セージを受信し、この応答メッセージを受信したことを
通知するための受信完了メッセージを送信する。この手
順により前記要求メッセージの伝送に伴う一連の処理が
終了する。
The master node 10 (10A, 10B)
Transmits and receives a message to and from the slave node 20, and executes a predetermined process based on the message received from the slave node 20. And the master node 10
When the master node 10 transmits and receives a message between the slave node 20 and the slave node 20, the master node 10 transmits a request message for requesting processing to the slave node 20, and in response to the request message, sends a response message from the slave node 20. Receives and transmits a reception completion message for notifying that this response message has been received. With this procedure, a series of processes accompanying the transmission of the request message is completed.

【0024】そして、マスタノード10では、前記スレ
ーブノード20との間で前記各メッセージを授受すると
きには、マスタノード10からメッセージを送信すると
きには、送信メッセージを含む所定フォーマットのデー
タライトメッセージを生成し、これを送信先のスレーブ
ノード20宛に送信し、その応答としてACK応答を受
信する。逆に、スレーブノード20からメッセージを受
信するときには、スレーブノード20宛にデータリード
メッセージを送信し、その応答として所定のメッセージ
と共にACK応答を受信する。
The master node 10 generates a data write message of a predetermined format including a transmission message when transmitting and receiving each message with the slave node 20 and transmitting a message from the master node 10. This is transmitted to the destination slave node 20, and an ACK response is received as a response. Conversely, when a message is received from slave node 20, a data read message is transmitted to slave node 20, and an ACK response is received together with a predetermined message as a response.

【0025】また、マスタノード10では、他のマスタ
ノードからステータスチェック要求が行われたときに
は、自局及びマスタノード10上の指定されたタスクに
ついてステータスチェックを行い、その結果を返信す
る。一方、前記スレーブノード20は、マスタノード1
0からのアクセスに応じてマスタノード10との間でメ
ッセージの授受を行う。そして、マスタノード10から
データライトメッセージを受信したときには、これを受
信したことを通知するためのACK応答をデータライト
メッセージの送信元のマスタノード宛に返信する。ま
た、データリードメッセージを受信したときには、所定
の記憶領域に格納された応答メッセージをACK応答に
付加して送信元のマスタノード宛に返信する。そして、
前記データライトメッセージで要求メッセージが通知さ
れた場合には、その要求メッセージにしたがって所定の
処理を実行し、要求メッセージに対する応答として前記
応答メッセージを生成しこれを所定の記憶領域に格納す
る。また、前記データライトメッセージで受信完了メッ
セージが通知されたときには、前記記憶領域に格納され
た応答メッセージを除去する。
When a status check request is made from another master node, the master node 10 performs a status check on its own station and a designated task on the master node 10, and returns the result. On the other hand, the slave node 20 is the master node 1
A message is exchanged with the master node 10 in response to the access from 0. When the data write message is received from the master node 10, an ACK response for notifying that the data write message has been received is returned to the master node of the transmission source of the data write message. When the data read message is received, a response message stored in a predetermined storage area is added to the ACK response and returned to the transmission source master node. And
When the request message is notified by the data write message, a predetermined process is executed according to the request message, the response message is generated as a response to the request message, and the response message is stored in a predetermined storage area. When a reception completion message is notified by the data write message, the response message stored in the storage area is removed.

【0026】図2は、要求メッセージ、応答メッセー
ジ、受信完了メッセージを送信するためのデータライト
メッセージ及びデータ付きACK応答のメッセージフレ
ームのフォーマットを表したものである。図2に示すよ
うに、各メッセージフレームは、データライトメッセー
ジであるか、データリードメッセージに対する応答であ
るデータ付きACK応答であるかといったメッセージフ
レームの種別を表すフレームコードm1と、このメッセ
ージの送信先のノードを特定するための宛先局番m2
と、このメッセージの送信元のノードを特定するための
送信元局番m3と、要求メッセージであるか応答メッセ
ージであるか受信完了メッセージであるかといったこの
メッセージフレームで送信するメッセージの種別を表す
メッセージ種別m4と、要求メッセージの送信元のノー
ドを特定するための要求元局番m5と、要求メッセージ
を識別するための要求メッセージIDm6と、要求メッ
セージデータ或いは応答メッセージデータといったもの
を送信するメッセージデータm7とから構成されてい
る。
FIG. 2 shows a message frame format of a data write message for transmitting a request message, a response message, a reception completion message, and an ACK response with data. As shown in FIG. 2, each message frame includes a frame code m1 indicating a type of the message frame such as a data write message or an ACK response with data that is a response to the data read message, and a transmission destination of the message. Destination station number m2 for specifying the node of
And the source station number m3 for specifying the source node of the message, and a message type indicating the type of the message to be transmitted in this message frame such as a request message, a response message, or a reception completion message m4, a request source station number m5 for specifying the source node of the request message, a request message ID m6 for identifying the request message, and message data m7 for transmitting request message data or response message data. It is configured.

【0027】なお、前記要求元局番m5が局識別情報に
対応し、前記要求メッセージIDm6がタスク識別情報
に対応している。図3は、マスタノード10における、
スレーブノード20とメッセージ授受を行う際の処理手
順の一例を示すフローチャートである。すなわち、マス
タノード10では、まず、ステップS2で、要求メッセ
ージを送信するためのデータライトメッセージを生成す
る。つまり、図2(a)に示すように、フレームコード
m1としてデータライトメッセージ、宛先局番m2とし
て送信先のノードを特定する局番、送信元局番m3とし
て自ノードを特定する局番、メッセージ種別m4として
“要求メッセージ”、要求元局番m5として自ノードを
特定する局番、要求メッセージIDm6として、例えば
識別番号、そして、スレーブノード20に対して要求す
る処理からなる要求メッセージデータm7を設定し、こ
れらから要求メッセージを送信するためのデータライト
メッセージからなる要求メッセージフレームを生成す
る。また、この要求メッセージフレームを所定の記憶領
域に記憶しておく。
The request source station number m5 corresponds to the station identification information, and the request message ID m6 corresponds to the task identification information. FIG. 3 shows the state of the master node 10.
9 is a flowchart illustrating an example of a processing procedure when a message is exchanged with the slave node 20. That is, the master node 10 first generates a data write message for transmitting a request message in step S2. That is, as shown in FIG. 2A, the data write message is used as the frame code m1, the station number specifying the transmission destination node as the destination station number m2, the station number specifying the own node as the transmission source station number m3, and the message type m4 as " Request message ", a station number for specifying the own node as the request source station number m5, an identification number as the request message ID m6, and request message data m7 comprising a process requesting the slave node 20, for example. A request message frame including a data write message for transmitting the request message is generated. The request message frame is stored in a predetermined storage area.

【0028】次に、ステップS4に移行し、要求メッセ
ージフレームを通信回線Lを介して送信し、その応答と
してACK応答を受信する。次いで、ステップS6に移
行し、要求メッセージフレームの送信先のスレーブノー
ド20宛に、データリードメッセージを送信し、応答メ
ッセージを受信するための応答メッセージの受信処理を
行う。前記データリードメッセージは、例えば、前記図
2のメッセージフォーマットと同様に構成され、フレー
ムコードとして“データリードメッセージ”、宛先局番
として応答メッセージを受信したいスレーブノードを特
定する局番、送信元局番として自ノードを特定する局
番、メッセージ種別として“受信要求メッセージ”とか
ら構成される。
Next, the process proceeds to step S4, in which a request message frame is transmitted via the communication line L, and an ACK response is received as a response. Next, the process proceeds to step S6, where a data read message is transmitted to the slave node 20 to which the request message frame is transmitted, and a response message receiving process for receiving the response message is performed. The data read message has, for example, the same format as the message format shown in FIG. 2 described above, and includes a “data read message” as a frame code, a station number specifying a slave node to receive a response message as a destination station number, and a local node number as a source station number. And a "reception request message" as a message type.

【0029】次いで、ステップS7に移行し、データリ
ードメッセージに対する応答としてデータ付きACK応
答を受信したかどうかを判定し、データ付きACK応答
を受信しないときには、ステップS8に移行して、再度
データリードメッセージを送信するリトライを行ったか
どうかを判定し、リトライを行っていないときには、ス
テップS6に戻って、再度データリードメッセージを送
信する。
Then, the flow shifts to step S7 to determine whether or not an ACK response with data has been received as a response to the data read message. It is determined whether or not a retry for transmitting the data read has been performed. If the retry has not been performed, the process returns to step S6, and the data read message is transmitted again.

【0030】そして、リトライしてもデータ付きACK
応答を受信しないときには処理を終了する。一方、ステ
ップS7で、データ付きACK応答を受信したときに
は、ステップS10に移行し、データ付きACK応答
で、応答メッセージに付加されて通知された、要求元局
番m5及び要求メッセージIDm6が、ステップS2の
処理で所定の記憶領域に格納した要求メッセージフレー
ムの要求元局番m5及び要求メッセージIDm6と一致
するかどうかを判定する。そして、これらが両方とも一
致するときには、ステップS12に移行して、図2
(c)に示す受信完了メッセージからなるデータライト
メッセージを生成する。つまり、フレームコードm1と
してデータライトメッセージ、宛先局番m2として受信
したデータ付きACK応答で通知された送信元局番m
3、送信元局番m3として自ノードを特定する局番、メ
ッセージ種別m4として受信完了メッセージを設定し、
これらからなる受信完了メッセージを送信するためのデ
ータライトメッセージからなる受信完了メッセージフレ
ームを生成する。そして、これを送信し、処理を終了す
る。
ACK with data even if retry
If no response is received, the process ends. On the other hand, when an ACK response with data is received in step S7, the process proceeds to step S10, and the request source station number m5 and the request message ID m6, which are added to the response message and notified in the ACK response with data, are added to the data in step S2. In the process, it is determined whether or not the request message frame stored in the predetermined storage area matches the request source station number m5 and the request message ID m6. If they match, the process proceeds to step S12,
A data write message including the reception completion message shown in (c) is generated. That is, the data write message is used as the frame code m1, and the source station number m notified by the received ACK response with data is received as the destination station number m2.
3. A station number for identifying the own node as a source station number m3, a reception completion message as a message type m4,
A reception completion message frame composed of a data write message for transmitting the reception completion message composed of these is generated. Then, this is transmitted, and the process ends.

【0031】一方、前記ステップS10で、データ付き
ACK応答の要求元局番m5及び要求メッセージIDm
6と、予め記憶している要求元局番m5及び要求メッセ
ージIDm6とが一致しないときには、ステップS14
に移行する。そして、要求メッセージを再度送信するリ
トライを行ったかどうかを判定し、リトライを行ってい
ないときにはステップS4に戻る。
On the other hand, in step S10, the request source station number m5 and the request message IDm of the ACK response with data are
When the request source station number m5 and the request message ID m6 stored in advance do not coincide with each other, step S14
Move to Then, it is determined whether or not a retry to transmit the request message again has been performed. If no retry has been performed, the process returns to step S4.

【0032】一方、ステップS14でリトライを行った
ときには、ステップS16に移行し、ステップS6で受
信したデータ付きACK応答で通知された要求元局番m
5で特定されるマスタノードに対してステータスチェッ
ク要求を行って、マスタノードの状態チェックを行う。
そして、その結果正常であれば、そのまま処理を終了す
る。一方、ステップS16で、状態チェックの結果、異
常であるときには、ステップS18に移行し、前記ステ
ップS12と同様にして、図2(c)に示す受信完了メ
ッセージからなるデータライトメッセージを生成し、こ
れを、要求メッセージの送信先のスレーブノード20宛
に送信する。そして、処理を終了する。
On the other hand, when a retry is performed in step S14, the process proceeds to step S16, and the request source station number m notified in the ACK response with data received in step S6.
A status check request is made to the master node specified in 5 to check the status of the master node.
Then, if the result is normal, the process is terminated. On the other hand, if it is determined in step S16 that the status is abnormal as a result of the status check, the process proceeds to step S18, and a data write message including a reception completion message shown in FIG. Is transmitted to the slave node 20 that is the transmission destination of the request message. Then, the process ends.

【0033】図4は、スレーブノード20における、マ
スタノード10とメッセージ授受を行う際の処理手順の
一例を示すフローチャートである。スレーブノード20
では、要求メッセージフレームを受信すると、これに対
する応答してACK応答を返信した後、ステップS22
からステップS24に移行する。前記ACK応答は、例
えば図2の各メッセージフォーマットと同様に、フレー
ムコードとしてACK応答、宛先局番としてデータライ
トメッセージの送信元の局番、送信元局番として自ノー
ドを特定する局番とから構成される。
FIG. 4 is a flowchart showing an example of a processing procedure when a message is exchanged with the master node 10 in the slave node 20. Slave node 20
Then, upon receiving the request message frame, after returning an ACK response in response to the request message frame,
Then, control goes to a step S24. The ACK response includes, for example, an ACK response as a frame code, a source station number of a data write message as a destination station number, and a station number specifying its own node as a source station number, similarly to the respective message formats of FIG.

【0034】そして、ステップS24では、データライ
トメッセージで通知された要求メッセージで指定される
処理を行いこれに対する応答として応答メッセージを生
成する。そして、この応答メッセージを含むデータ付き
ACK応答フレームを生成する。つまり、図2(b)に
示すように、フレームコードm1としてデータ付きAC
K応答、送信元局番m3として自ノードを特定する局
番、メッセージ種別m4として応答メッセージ、要求元
局番m5及び要求メッセージIDm6として、ステップ
S22で受信した要求メッセージに付加された要求元局
番m5及び要求メッセージIDm6をコピーし、メッセ
ージデータm7として、要求メッセージで指定された処
理に対する応答データからなる応答メッセージデータを
設定し、これらからデータ付きACK応答フレームを生
成する。そして、このデータ付きACK応答フレームを
所定の記憶領域に記憶しておく。
In step S24, a process specified by the request message notified by the data write message is performed, and a response message is generated as a response to the process. Then, an ACK response frame with data including the response message is generated. That is, as shown in FIG. 2B, an AC with data is used as the frame code m1.
K response, a station number that identifies the own node as the source station number m3, a response message as the message type m4, a request source station number m5 and a request message ID m6, and the request source station number m5 and the request message added to the request message received in step S22. IDm6 is copied, response message data including response data to the process specified by the request message is set as message data m7, and an ACK response frame with data is generated from these. Then, the ACK response frame with data is stored in a predetermined storage area.

【0035】次いで、ステップS26に移行し、マスタ
ノード10からデータリードメッセージを受信したなら
ばステップS28に移行して、所定の記憶領域に記憶し
たデータ付きACK応答フレーム、宛先局番m2として
データリードメッセージの送信元局番を設定し、このデ
ータ付きACK応答フレームを送信する。そして、ステ
ップS30に移行する。
Then, the flow shifts to step S26, and if a data read message is received from the master node 10, the flow shifts to step S28, where the ACK response frame with data stored in a predetermined storage area and the data read message as the destination station number m2. Is set, and this data-added ACK response frame is transmitted. Then, control goes to a step S30.

【0036】一方、ステップS26でデータリードメッ
セージを受信しないときには、そのままステップS30
に移行する。このステップS30では、マスタノード1
0から受信完了メッセージフレームを受信したかどうか
を判定する。そして、受信完了メッセージフレームを受
信しなければ、ステップS26に戻り、受信完了メッセ
ージフレームを受信したときにはステップS32に移行
する。そして、ステップS24の処理で所定の記憶領域
に格納したデータ付きACK応答フレームを削除し、処
理を終了する。
On the other hand, when the data read message is not received in step S26, the process proceeds to step S30.
Move to In this step S30, the master node 1
From 0, it is determined whether a reception completion message frame has been received. If the reception completion message frame has not been received, the process returns to step S26, and if the reception completion message frame has been received, the process proceeds to step S32. Then, the ACK response frame with data stored in the predetermined storage area in the process of step S24 is deleted, and the process ends.

【0037】図5はマスタノード10の状態遷移図であ
る。すなわち、マスタノード10では、アイドル状態
(状態st1)から、スレーブノード20にトランザク
ションメッセージの送信要求を行うときには、状態st
2に移行して要求メッセージを生成しこれを送信する、
要求メッセージ送信処理を行う状態となる。そして、要
求メッセージ送信処理が終了すると、状態st3となり
応答メッセージの受信処理、つまり、データ付きACK
応答の受信処理を行う。そして、応答メッセージを受信
したならば、状態st4に移行して、応答メッセージの
チェック、つまり、要求元局番及び要求メッセージID
のチェックを行う。一方、状態st3で応答メッセージ
を受信できないときには状態st5に移行し、再度デー
タリードメッセージを送信して応答メッセージの受信を
試みる。そして、応答メッセージを受信したならば前記
状態st4に移行し応答メッセージのチェックを行う。
FIG. 5 is a state transition diagram of the master node 10. That is, when the master node 10 requests the slave node 20 to transmit a transaction message from the idle state (state st1), the state st
Go to 2 and generate a request message and send it.
It is in a state to perform request message transmission processing. When the request message transmission processing is completed, the state is changed to the state st3, the reception processing of the response message, that is, the ACK with data.
Performs response reception processing. Then, when the response message is received, the state shifts to state st4, where the response message is checked, that is, the request source station number and the request message ID.
Check. On the other hand, when the response message cannot be received in the state st3, the process proceeds to the state st5, and the data read message is transmitted again to try to receive the response message. When the response message is received, the flow shifts to the state st4 and the response message is checked.

【0038】前記状態st5で再度応答メッセージの受
信処理を行っても応答メッセージを受信できないときに
は、リトライ失敗として状態st1に戻り、アイドル状
態となる。そして、状態st4で応答メッセージのチェ
ックを行った結果、正常であるときには状態st6に移
行し、受信完了メッセージを送信し、状態st1のアイ
ドル状態となる。
When the response message cannot be received even if the response message is received again in the state st5, the process returns to the state st1 as a retry failure and enters the idle state. Then, as a result of checking the response message in the state st4, if the response message is normal, the process proceeds to the state st6, a reception completion message is transmitted, and the state becomes the idle state st1.

【0039】一方、状態st4で応答メッセージのチェ
ックを行った結果、異常であるときには状態st2に移
行し、再度要求メッセージ送信処理を行う。そして、状
態st3で応答メッセージの受信処理を行い、状態st
4で応答メッセージのチェックを行った結果、正常であ
るときには、状態st6に移行し受信完了メッセージの
送信処理を行うが、状態st4で要求メッセージ送信の
リトライを行っても異常であるときには状態st7に移
行し、応答メッセージに付加された要求元局番及びメッ
セージIDで特定される、スレーブノード20との通信
処理を行っているマスタノードであり且つスレーブノー
ド20と通信を行っているタスクのステータスチェック
を行い、その結果正常であるときには、状態st1に移
行して、アイドル状態となる。
On the other hand, as a result of checking the response message in the state st4, if the response message is abnormal, the flow shifts to the state st2 and the request message transmission processing is performed again. Then, a response message receiving process is performed in state st3,
As a result of checking the response message in step 4, if the response message is normal, the process proceeds to state st6 and the transmission processing of the reception completion message is performed. The status check is performed for the task that is the master node that is performing the communication processing with the slave node 20 and that is communicating with the slave node 20 and that is specified by the request source station number and the message ID added to the response message. When the result is normal, the state shifts to the state st1 and becomes the idle state.

【0040】一方、状態st7でのステータスチェック
の結果、処理中タスクが異常であるときには、状態st
6に移行し、この異常が生じている処理中タスクの替わ
りに受信完了メッセージを送信し、その後状態st1に
移行してアイドル状態となる。図6は、スレーブノード
20の状態遷移図である。
On the other hand, as a result of the status check in the state st7, if the in-process task is abnormal,
The process proceeds to step 6, where a reception completion message is transmitted in place of the in-process task in which the abnormality has occurred, and thereafter, the process proceeds to state st1 to enter the idle state. FIG. 6 is a state transition diagram of the slave node 20.

【0041】すなわち、スレーブノード20では、マス
タノード10から要求メッセージを受信するとアイドル
状態(状態st11)から状態st12に移行し、要求
メッセージに対する処理を行って応答メッセージを生成
する。そして、応答メッセージを含むデータ付きACK
応答フレームを生成すると、状態st13となり、この
データ付きACK応答フレームを所定の記憶領域にセッ
トする。そして、マスタノード10からデータリードメ
ッセージを受信したときこの応答メッセージ、つまりデ
ータ付きACK応答フレームを返信する。そして、状態
st14に移行してマスタノード10から、応答メッセ
ージに対する応答としての受信完了メッセージの受信待
ち状態となり、受信完了メッセージを受信すると、状態
st15に移行し、所定の記憶領域に記憶した応答メッ
セージを削除する等の後処理を行う。そして、状態st
11に戻る。
That is, when the slave node 20 receives the request message from the master node 10, it shifts from the idle state (state st11) to the state st12, performs processing for the request message, and generates a response message. ACK with data including the response message
When the response frame is generated, the state changes to state st13, and the ACK response frame with data is set in a predetermined storage area. When a data read message is received from the master node 10, this response message, that is, an ACK response frame with data is returned. Then, the state shifts to state st14, and the reception state of the reception completion message as a response to the response message from the master node 10 is waited. When the reception completion message is received, the state shifts to state st15, and the response message stored in the predetermined storage area is stored. Post-processing, such as deleting. And the state st
Return to 11.

【0042】そして、各状態st12、st13、st
14、st15にあるときに、新たに要求メッセージを
受信したときには、状態st16に移行し、要求メッセ
ージに対する応答としてACK応答を返信するが、受信
した要求メッセージは破棄し、それぞれ移行前の状態に
戻る。次に、上記実施の形態の動作を説明する。
The states st12, st13, st
When a new request message is received at step 14 and st15, the process proceeds to state st16, and an ACK response is returned as a response to the request message. However, the received request message is discarded, and each returns to the state before the transfer. . Next, the operation of the above embodiment will be described.

【0043】今、図1に示すネットワークシステム10
0において、マスタノード10Aからスレーブノード2
0Bに対して例えば特定データの送信を要求するものと
すると、マスタノード10Aでは、まず、図2(a)に
示す要求メッセージを送信するためのデータライトメッ
セージを生成する。つまり、フレームコードとして“デ
ータライトメッセージ”、宛先局番はスレーブノード2
0Bの局番“20B”、送信元局番はマスタノード10
Aの局番“10A”、メッセージ種別は“要求メッセー
ジ”、要求元局番は自局“10A”、要求メッセージI
Dは“1”、要求メッセージデータとして“特定データ
の送信要求”として、要求メッセージフレームを生成し
(ステップS2)、この要求メッセージフレームを送信
する(ステップS4)。また、このとき、この要求メッ
セージフレームを所定の記憶領域に格納しておく。
Now, the network system 10 shown in FIG.
0, the master node 10A transmits to the slave node 2
For example, assuming that transmission of specific data is requested to 0B, the master node 10A first generates a data write message for transmitting the request message shown in FIG. That is, the “data write message” as the frame code, and the destination station number is
0B station number “20B”, source station number is master node 10
A station number “10A”, message type is “request message”, request source station number is own station “10A”, request message I
D generates a request message frame as "1" and "request for transmission of specific data" as request message data (step S2), and transmits this request message frame (step S4). At this time, the request message frame is stored in a predetermined storage area.

【0044】これによって、図7に示すように、時点t
1 で要求メッセージが、宛先局番“20B”のスレーブ
ノード20Bに送信され、これを受信したスレーブノー
ド20Bでは、その応答としてACK応答を返信する
(ステップS22)。そして、通知された要求メッセー
ジにしたがって処理を行い、図2(b)に示す、データ
付きACK応答フレームを生成する(ステップS2
4)。つまり、フレームコードm1として“データ付き
ACK応答”を設定し、宛先局番m2はまだ設定しな
い。そして、送信元局番m3として自ノードを特定する
“20B”、メッセージ種別m4として“応答メッセー
ジ”、要求元局番m5及び要求メッセージIDm6とし
て、要求メッセージと共に通知された要求元局番“10
A”及び要求メッセージID“1”を設定する。さら
に、要求メッセージで指定された処理に対するデータ、
つまり、指定された特定データを応答メッセージとし、
その応答メッセージデータを設定してデータ付きACK
応答フレームを生成する。そして、これを所定の記憶領
域に格納する。
As a result, as shown in FIG.
In step 1 , the request message is transmitted to the slave node 20B of the destination station number "20B", and the slave node 20B that has received the request message returns an ACK response as a response (step S22). Then, processing is performed according to the notified request message, and an ACK response frame with data shown in FIG. 2B is generated (step S2).
4). That is, "ACK response with data" is set as the frame code m1, and the destination station number m2 is not set yet. Then, “20B” that identifies the own node as the source station number m3, “response message” as the message type m4, and the request source station number “10” notified together with the request message as the request source station number m5 and request message ID m6
A ”and a request message ID“ 1. ”Further, data for the process specified by the request message,
That is, the specified specific data is used as the response message,
ACK with data by setting the response message data
Generate a response frame. Then, this is stored in a predetermined storage area.

【0045】そして、マスタノード10AがステップS
6の処理で宛先局番としてスレーブノード20Bの局番
“20B”を設定し、送信元局番として自ノード“10
A”を設定して時点t2 でデータリードメッセージを送
信すると、これを受信したスレーブノード20Bでは
(ステップS26)、所定の記憶領域に格納したデータ
付きACK応答フレームに、宛先局番m2としてデータ
リードメッセージで通知された送信元局番“10A”を
設定し、これを送信する(ステップS28)。
Then, the master node 10A determines in step S
In the process of No. 6, the station number “20B” of the slave node 20B is set as the destination station number, and the own node “10” is set as the source station number.
When sending data read message at time t 2 by setting A ", the slave node 20B receives this (step S26), the ACK response frame with data stored in a predetermined storage area, the data lead as the destination codes m2 The source station number "10A" notified by the message is set and transmitted (step S28).

【0046】マスタノード10Aでは、データ付きAC
K応答つまり応答メッセージを受信したからステップS
7からステップS10に移行し、応答メッセージと共に
通知された要求元局番“10A”及びメッセージID
“1”と、要求メッセージ送信時に所定の記憶領域に格
納した要求元局番“10A”及びメッセージID“1”
を比較し、これらは一致するから、ステップS12に移
行し、図2(c)に示す受信完了メッセージを送信する
ための受信完了メッセージフレームを生成し、時点t3
でこれを応答メッセージの送信元局番“20B”宛に送
信する。
In master node 10A, AC with data
Step S after receiving the K response, that is, the response message
7 to step S10, the request source station number "10A" and the message ID notified together with the response message
“1”, the request source station number “10A” and the message ID “1” stored in a predetermined storage area when transmitting the request message
Compare, because they are consistent, the process proceeds to step S12, generates a reception completion message frame for transmitting a reception completion message shown in FIG. 2 (c), the time t 3
This is transmitted to the source station number "20B" of the response message.

【0047】スレーブノード20Bでは、受信完了メッ
セージを受信したから、ステップS30からステップS
32に移行し、所定の記憶領域に記憶しているデータ付
きACK応答フレームを削除する。これにより、図7に
示す一連のメッセージ授受が行われ、マスタノード10
Aで指定された特定データが、スレーブノード20Bか
らマスタノード10Aに送信され、マスタノード10A
は所望の特定データを受信することになる。
Since the slave node 20B receives the reception completion message, it proceeds from step S30 to step S30.
32, and deletes the ACK response frame with data stored in the predetermined storage area. As a result, a series of message exchanges shown in FIG.
A is transmitted from the slave node 20B to the master node 10A, and the specific data designated by A is transmitted to the master node 10A.
Will receive the desired specific data.

【0048】このとき、図8に示すように、時点t11
マスタノード10Aからスレーブノード20Bに対して
要求メッセージを送信し(ステップS4)、これに対す
るACK応答をスレーブノード20Bから受信した後、
応答メッセージを受信するために時点t12でデータリー
ドメッセージを送信したとき(ステップS6)、何らか
によってマスタノード10Aがデータ付きACK応答を
受信できない場合には、ステップS7からステップS8
を経てステップS6に戻って時点t13で再度データリー
ドメッセージをスレーブノード20B宛に送信する。
[0048] At this time, as shown in FIG. 8, sends a request message from the master node 10A at time t 11 the slave node 20B (step S4), and after receiving an ACK response from the slave node 20B to this,
When sending the data read message at t 12 in order to receive the response message (step S6), and if the master node 10A can not receive the data with ACK response by any way, step S8 from step S7
Through the sending data again read message at time t 13 returns to step S6 addressed slave node 20B.

【0049】スレーブノード20Bでは、応答メッセー
ジを生成した後(ステップS24)、データリードメッ
セージを受信するとステップS26からステップS28
に移行してデータリードメッセージの送信元に対して応
答メッセージを送信するが、受信完了メッセージを受信
しないから、ステップS26に戻る。そして、マスタス
レーブ10Aが時点t13で再度データリードメッセージ
を送信し、スレーブノード20Bでこれを受信すると、
ステップS26からステップS28に移行して、再度マ
スタノード10A宛に応答メッセージを送信する。
After generating the response message (step S24), the slave node 20B receives the data read message and proceeds from step S26 to step S28.
Then, a response message is transmitted to the transmission source of the data read message. However, since the reception completion message is not received, the process returns to step S26. When the master slave 10A sends the data again read message at time t 13, to receive this in the slave node 20B,
The process shifts from step S26 to step S28 to transmit a response message to the master node 10A again.

【0050】そして、マスタノード10Aでは、応答メ
ッセージを正常に受信すると、ステップS7からステッ
プS10に移行し、応答メッセージのチェックの結果正
常であるならば、ステップS12に移行して時点t14
受信完了メッセージを送信する。よって、スレーブノー
ド20Bでは、受信完了メッセージを受信したから、ス
テップS30からステップS32に移行し、所定の記憶
領域に格納しているデータ付きACK応答フレームを削
除する。
[0050] Then, the master node 10A, when receiving a successful response message, and proceeds from step S7 to step S10, if a normal check response message results, received at time t 14 and proceeds to step S12 Send a completion message. Therefore, in the slave node 20B, after receiving the reception completion message, the process shifts from step S30 to step S32, and deletes the ACK response frame with data stored in the predetermined storage area.

【0051】このように、マスタノード10A側ではデ
ータ付きACK応答を受信し損なったとしても、再度デ
ータリードメッセージを送信すれば、確実に応答メッセ
ージを受信することができる。また、例えば、図9に示
すように、マスタノード10Aがスレーブノード20C
に対して時点t21で要求メッセージを送信した後に、マ
スタノード10Bでもスレーブノード20Cに対して時
点t22で要求メッセージを送信した場合、スレーブノー
ド20Cでは、マスタノード10Aに対しては、要求メ
ッセージを受信すると、これに対するACK応答をマス
タノード10A宛に送信し、要求メッセージにしたがっ
て所定の処理を行い、マスタノード10Aからの要求メ
ッセージに対する応答メッセージを生成する。そして、
応答メッセージとマスタノード10Aからの要求メッセ
ージに付加された要求元局番m5、この場合マスタノー
ド10Aの局番“10A”と要求メッセージID“1”
を付加してデータ付きACK応答フレームを生成し、こ
れを所定の記憶領域に格納する(ステップS24)。
As described above, even if the master node 10A fails to receive the ACK response with data, it can surely receive the response message by transmitting the data read message again. For example, as shown in FIG. 9, the master node 10A is connected to the slave node 20C.
If after sending a request message at time t 21, and sends a request message at time t 22 the slave node 20C even the master node 10B respect, the slave node 20C, for the master node 10A, the request message Is received, an ACK response thereto is transmitted to the master node 10A, a predetermined process is performed according to the request message, and a response message to the request message from the master node 10A is generated. And
The request source station number m5 added to the response message and the request message from the master node 10A, in this case, the station number "10A" of the master node 10A and the request message ID "1"
Is added to generate an ACK response frame with data, and this is stored in a predetermined storage area (step S24).

【0052】そして、時点t22でマスタノード10Bが
要求元局番“10B”、要求メッセージID“11”と
して、要求メッセージをスレーブノード20C宛に送信
すると、スレーブノード20Cでは、マスタノード10
Bからの要求メッセージを受信し、これに対するACK
応答は返信するが、受信した要求メッセージは破棄す
る。
[0052] Then, the master node 10B is requesting station number "10B" at the time point t 22, as a request message ID "11", and send a request message to the slave node 20C, the slave node 20C, the master node 10
B receives a request message and receives an ACK
The response is returned, but the received request message is discarded.

【0053】そして、マスタノード10Aが時点t23
データリードメッセージを送信すると(ステップS
6)、スレーブノード20Cでは、これをうけて所定の
記憶領域に格納したデータ付きACK応答をマスタノー
ド10A宛に送信する(ステップS26、S28)。一
方、マスタノード10Bでも、時点t22で送信した要求
メッセージに対するACK応答をスレーブノード20C
から受信すると、応答メッセージを受信するために時点
24でデータリードメッセージを送信し(ステップS
6)、スレーブノード20Cでは、データリードメッセ
ージを受信したことからステップS26からステップS
28に移行して、所定の記憶領域に格納している、マス
タノード10Aの要求メッセージに対する応答メッセー
ジからなるデータ付きACK応答フレームの宛先局番m
2として、データリードメッセージの送信元局番つまり
マスタノード10Bの局番“10B”を設定し送信す
る。
[0053] When the master node 10A transmits a data read message at time t 23 (step S
6) In response, the slave node 20C receives the data and transmits an ACK response with data stored in a predetermined storage area to the master node 10A (steps S26 and S28). On the other hand, the master node 10B even, an ACK response to the request message transmitted at time t 22 the slave node 20C
When receiving from, and sending data read message at time t 24 in order to receive the response message (step S
6) In the slave node 20C, since the data read message is received, steps S26 to S
28, the destination station number m of the ACK response frame with data, which is stored in a predetermined storage area and includes a response message to the request message of the master node 10A.
As 2, the source station number of the data read message, that is, the station number "10B" of the master node 10B is set and transmitted.

【0054】そして、データ付きACK応答を受信した
マスタノード10A及び10Bでは、それぞれ応答メッ
セージのチェックを行う。このとき、マスタノード10
Aでは、要求メッセージに付加した要求元局番“10
A”及び要求メッセージID“1”と、応答メッセージ
に付加された要求元局番“10A”及び要求メッセージ
ID“1”とが一致する。よって、マスタノード10A
では、時点t25で受信完了メッセージを送信し(ステッ
プS12)、これを受けて、スレーブノード20Cで
は、ステップS30からステップS32に移行して、記
憶領域に格納したマスタノード10Aの要求メッセージ
に対する応答メッセージからなるデータ付きACK応答
フレームを削除し、次の要求メッセージを待つ待ち状態
となる。
Then, the master nodes 10A and 10B that have received the ACK response with data check the response message. At this time, the master node 10
In A, the request source station number “10” added to the request message
A and the request message ID “1” match the request source station number “10A” and the request message ID “1” added to the response message, and thus the master node 10A.
In, and sends a reception completion message at time t 25 (step S12), the response to this, the slave node 20C, the process proceeds from step S30 to step S32, in response to the request message of the master node 10A stored in the storage area The ACK response frame with data consisting of the message is deleted, and a state of waiting for the next request message is entered.

【0055】一方、マスタノード10Bでは、要求メッ
セージに付加した要求元局番は“10B”、要求メッセ
ージID“11”であって、応答メッセージに付加され
た要求元局番“10A”及び要求メッセージID“1”
とは一致しない。よって、ステップS10からステップ
S14を経てステップS4に移行し、再度、要求元局番
“10B”、要求メッセージID“11”として時点t
26で要求メッセージを送信する。
On the other hand, in the master node 10B, the request source station number added to the request message is “10B” and the request message ID is “11”, and the request source station number “10A” and the request message ID “ 1 "
Does not match. Therefore, the process moves from step S10 to step S4 via step S14, and again as request source station number "10B" and request message ID "11" at time t.
At 26 , a request message is sent.

【0056】この時点t26では、スレーブノード20C
は、要求メッセージを待つ待ち状態となっているから、
今度は、マスタノード10Bからの要求メッセージが正
常に受け付けられる。そして、スレーブノード20Cで
は、マスタノード10Bからの要求メッセージにしたが
って所定の応答メッセージを生成し、これに要求元局番
“10B”、メッセージID“11”を付加してデータ
付きACK応答フレームを生成する。
At this time t 26 , the slave node 20C
Is waiting for a request message,
This time, the request message from master node 10B is normally received. Then, the slave node 20C generates a predetermined response message in accordance with the request message from the master node 10B, and adds a request source station number “10B” and a message ID “11” to generate an ACK response frame with data. .

【0057】よって、続いてマスタノード10Bが時点
27でデータリードメッセージを送信したときには(ス
テップS6)、この要求元局番“10B”、メッセージ
ID“11”が付加されたデータ付きACK応答がマス
タノード10Bに送信されるから、マスタノード10B
では、要求メッセージに付加した要求元局番“10B”
及びメッセージID“11”と、応答メッセージに付加
された要求元局番“10B”及びメッセージID“1
1”とが一致することからステップS12に移行し、時
点t28で受信完了メッセージを送信する。
[0057] Thus, followed (step S6) when the master node 10B transmits a data read message at time t 27, this request source code "10B", the message ID "11" is added to data with ACK response master Since it is transmitted to the node 10B, the master node 10B
Then, the request source station number "10B" added to the request message
And the message ID “11”, the request source station number “10B” added to the response message, and the message ID “1”.
Shifted from the 1 "and is equal to the step S12, it transmits a reception completion message at time t 28.

【0058】スレーブノード20Cでは、これを受け
て、マスタノード10Bに対する応答メッセージからな
るデータ付きACK応答フレームを記憶領域から削除す
る。このように、マスタノード10A及び10Bでは、
受信した応答メッセージに付加された要求メッセージI
D及び要求元局番から、受信した応答メッセージが、自
己が送信した要求メッセージに対する応答メッセージで
あるかどうかを認識することができる。よって、マスタ
ノードでは、スレーブノードに対する要求メッセージが
競合したために他のマスタノードが送信した要求メッセ
ージに対する応答メッセージを受信した場合であって
も、自己が送信した要求メッセージに対する応答メッセ
ージではないことを認識することができ、誤った応答メ
ッセージに基づいて処理を実行することが回避される。
In response to this, the slave node 20C deletes the ACK response frame with data including the response message to the master node 10B from the storage area. Thus, in the master nodes 10A and 10B,
Request message I added to the received response message
From D and the request source station number, it can be recognized whether or not the received response message is a response message to the request message transmitted by itself. Therefore, the master node recognizes that even if a response message to a request message transmitted by another master node is received due to a conflict between request messages to the slave node, the response message is not a response message to the request message transmitted by itself. And performing the processing based on the incorrect response message is avoided.

【0059】なお、この場合、マスタノード10Aと1
0Bとの間でスレーブノードに対する要求メッセージが
競合した場合について説明したが、例えばマスタノード
10Aの異なるタスク間で要求メッセージが競合した場
合も同様であり、一方のタスクがマスタノード10Bと
同様に動作し、一方のタスクが誤った応答メッセージに
基づいて処理を実行することが回避される。
In this case, the master nodes 10A and 10A
Although the case where the request message for the slave node conflicts with the master node 10B has been described, for example, the same applies when the request message conflicts between different tasks of the master node 10A, and one task operates in the same manner as the master node 10B. However, it is possible to prevent one task from executing a process based on an incorrect response message.

【0060】また、例えば図10に示すように、マスタ
ノード10Aがスレーブノード20Cに対して時点t31
で要求メッセージ(要求元局番“10A”、要求メッセ
ージID“2”)を送信し、時点t32でデータリードメ
ッセージを送信しこれに対するデータ付きACK応答を
受信した後、時点t33でマスタノード10A或いは、ス
レーブノード20Cと通信を行っているマスタノード1
0A上のタスクに異常が発生した場合には、マスタノー
ド10Aから受信完了メッセージが送信されないため、
スレーブノード20Cではマスタノード10Aからの受
信完了メッセージを待つ待ち状態となる。
Further, for example, as shown in FIG. 10, the master node 10A makes a point of time t 31 with respect to the slave node 20C.
In the request message (request source code "10A", the request message ID "2") sends, after receiving the data with ACK response sends a data read message thereto at time t 32, the master node 10A at time t 33 Alternatively, the master node 1 communicating with the slave node 20C
When an error occurs in the task on 0A, the reception completion message is not transmitted from the master node 10A.
The slave node 20C enters a waiting state to wait for a reception completion message from the master node 10A.

【0061】このため、時点t34でマスタノード10B
からスレーブノード20Cに対して要求メッセージ(要
求元局番“10B”、要求メッセージID“12”)を
送信した場合、このスレーブノード20では、マスタノ
ード10Bからの要求メッセージを受信しACK応答を
返信するが、マスタノード10Bからの要求メッセージ
は破棄してしまう。
[0061] Therefore, the master node 10B at time t 34
Sends a request message (request source station number “10B”, request message ID “12”) to the slave node 20C, the slave node 20 receives the request message from the master node 10B and returns an ACK response. However, the request message from the master node 10B is discarded.

【0062】このため、マスタノード10Bが続いて時
点t35でデータリードメッセージを送信した場合、スレ
ーブノード20Cでは、所定の記憶領域に記憶してい
る、マスタノード10Aからの要求メッセージに対する
応答メッセージからなるデータ付きACK応答をマスタ
ノード10B宛に送信することになる。しかしながら、
マスタノード10Bでは、受信した応答メッセージに付
加された要求元局番“10A”及び要求メッセージID
“2”と、時点t34で要求メッセージに付加した要求元
局番“10B”及び要求メッセージID“12”とが異
なることから、ステップS10からステップS14を経
てステップS4に移行し、時点t36で再度要求メッセー
ジを送信する。
[0062] Therefore, when transmitting the data read message at time t 35 followed master node 10B is the slave node 20C, stored in the predetermined storage area, the response message to the request message from the master node 10A Is transmitted to the master node 10B. However,
In the master node 10B, the request source station number “10A” and the request message ID added to the received response message
"2" and, from the different and requesting station number "10B" was added to the request message and the request message ID "12" at time t 34, the process proceeds to step S4 through step S14 from step S10, at time t 36 Send the request message again.

【0063】スレーブノード20Cでは、再度マスタノ
ード10Bから要求メッセージを受信しACK応答を返
信するが、マスタノード10Aから受信完了メッセージ
を受信していないため、これを破棄する。そして、再度
マスタノード10Bが時点t 37でデータリードメッセー
ジを送信した場合には、スレーブノード20Cでは、所
定の記憶領域に格納された、要求元局番“10A”及び
要求メッセージID“2”を付加したデータ付きACK
応答を返信する。
In the slave node 20C, the master node
Receives a request message from the host 10B and returns an ACK response
To receive, but a reception completion message from the master node 10A.
Since it has not been received, it is discarded. And again
Master node 10B is at time t 37Data read message
When the slave node 20C transmits the message,
The request source station number “10A” stored in a fixed storage area and
ACK with data to which request message ID "2" is added
Reply back.

【0064】マスタノード10Bでは、リトライして
も、応答メッセージに付加された要求元局番及び要求メ
ッセージIDと、時点t36で送信した要求メッセージに
付加した要求元局番及び要求メッセージIDとが一致し
ないことから、ステップS10からステップS14を経
てステップS16に移行し、応答メッセージに付加され
た要求元局番“10A”のノードつまりマスタノード1
0Aに対してステータスチェック要求を行う。
[0064] In the master node 10B, even if the retry, the requesting station number and the request message ID appended to the response message, and the requesting station number and the request message ID added to the request message transmitted at time t 36 does not match Therefore, the process proceeds from step S10 to step S16 via step S14, and the node of the request source station number “10A” added to the response message, that is, the master node 1
A status check request is made to 0A.

【0065】マスタノード10Aでは、ステータスチェ
ックの結果、自己のタスクが異常であればタスク異常と
してマスタノード10Bに返信し、また、マスタノード
10A自体が異常であれば、マスタノード10Bにチェ
ック結果が返信されないことから、マスタノード10B
では、マスタノード10A或いはそのタスクの異常と認
識し、ステップS16からステップS18に移行し、マ
スタノード10Aに替わって、時点t38で受信完了メッ
セージを送信する。
As a result of the status check, the master node 10A returns a task abnormality to the master node 10B if its own task is abnormal, and if the master node 10A itself is abnormal, the check result is transmitted to the master node 10B. Since there is no reply, the master node 10B
In the master node 10A or recognizes abnormality of the task, the process proceeds from step S16 to step S18, in place of the master node 10A, it transmits a reception completion message at time t 38.

【0066】したがって、スレーブノード20Cでは、
受信完了メッセージを受信したことから、所定の記憶領
域に格納しているマスタノード10Aからの要求メッセ
ージに対する応答メッセージからなるデータ付きACK
応答フレームを削除し、次の要求メッセージを待つ待ち
状態となる。そして、マスタノード10Bが時点t39
再度要求メッセージ(要求元局番“10B”、要求メッ
セージID“12”)を送信すると、スレーブノード2
0Cでは、今度はこれを受け付け、この要求メッセージ
に対する処理を行って応答メッセージを生成し、時点t
40でマスタノード10Bがデータリードメッセージを送
信したとき、スレーブノード20Cでは、マスタノード
10Bに、要求元局番“10B”、要求メッセージID
“12”としてデータ付きACK応答を返信する。この
データ付きACK応答の要求元局番“10B”及び要求
メッセージID“12”と、マスタノード10Bが記憶
している時点t41で要求メッセージに付加した要求元局
番“10B”及び要求メッセージID“12”とは一致
するから、マスタノード10Bでは時点t41で受信完了
メッセージを送信する。
Therefore, in the slave node 20C,
Since the reception completion message is received, the ACK with data including the response message to the request message from the master node 10A stored in the predetermined storage area
The response frame is deleted, and a state of waiting for the next request message is entered. Then, again request message master node 10B is at t 39 (the requesting station number "10B", the request message ID "12") when transmitting the slave node 2
At 0C, this is received, and the request message is processed to generate a response message.
When the master node 10B transmits a data read message at 40 , the slave node 20C sends a request source station number “10B” and a request message ID to the master node 10B.
An ACK response with data is returned as "12". The requesting station number "10B" and the request message ID "12" of this data with ACK response, the master node 10B is stored to at t 41 and the request message has been added to the requesting station number "10B" and the request message ID "12 since matching and "sends a reception completion message at time t 41 in the master node 10B.

【0067】そして、スレーブノード20Cでは、マス
タノード10Bからの要求メッセージに対する応答メッ
セージからなるデータ付きACK応答フレームを削除
し、次の要求メッセージを待つ待ち状態となる。このよ
うに、マスタノード10Aがスレーブノード20Cと通
信途中で故障となり、スレーブノード20Cがマスタノ
ード10Aからの受信完了メッセージを待つ待ち状態と
なってしまった場合でも、マスタノード10Bがマスタ
ノード10Aのステータスチェックを行い、その異常を
検出したときには、マスタノード10Aに替わって受信
完了メッセージを送信し、スレーブノード20Cの待ち
状態を解除するから、通信中のマスタノードが故障する
ことに起因して他のマスタノードがスレーブノードと通
信できなくなることを回避することができる。
Then, the slave node 20C deletes the data-added ACK response frame composed of the response message to the request message from the master node 10B, and waits for the next request message. As described above, even when the master node 10A fails during communication with the slave node 20C and the slave node 20C is in a waiting state for waiting for a reception completion message from the master node 10A, the master node 10B is not connected to the master node 10A. When a status check is performed and the abnormality is detected, a reception completion message is transmitted instead of the master node 10A, and the slave node 20C is released from the waiting state. Of the master node cannot communicate with the slave node.

【0068】上述のように、ネットワークシステム内に
複数のマスタノードが存在する場合であっても、各マス
タノードでは、自己が送信した要求メッセージに対する
応答メッセージを確実に受信することができるから、ネ
ットワークシステム内に複数のマスタノードを設けるこ
とができ、また、各マスタノードは何れのスレーブノー
ド20に対しても何ら制約を受けることなく通信を行う
ことができる。
As described above, even when a plurality of master nodes exist in the network system, each master node can surely receive a response message to the request message transmitted by the master node. A plurality of master nodes can be provided in the system, and each master node can communicate with any slave node 20 without any restrictions.

【0069】なお、上記実施の形態においては、ネット
ワークシステム内に二つのマスタノードを設けた場合に
ついて説明したが、これに限らず二つ以上のマスタノー
ドを設けた場合でも適用できることはいうまでもない。
In the above embodiment, the case where two master nodes are provided in the network system has been described. However, the present invention is not limited to this, and it is needless to say that the present invention can be applied to a case where two or more master nodes are provided. Absent.

【0070】[0070]

【発明の効果】以上説明したように、本発明の請求項1
に係るマスタスレーブ間の通信方式によれば、マスタノ
ードが要求メッセージに識別情報を付加して送信し、ス
レーブノードでは要求メッセージに付加された識別情報
を応答メッセージに付加してこれを送信するようにした
から、マスタノードでは、受信した応答メッセージが先
に送信した要求メッセージに対する応答であるかどうか
を認識することができ、よってネットワークシステム内
に複数のマスタノードが設けられている場合でもマスタ
ノードは確実に所望のスレーブノードとのメッセージ授
受を行うことができる。
As described above, according to the first aspect of the present invention,
According to the master-slave communication method, the master node adds identification information to the request message and transmits the request message, and the slave node adds the identification information added to the request message to the response message and transmits the response message. Therefore, the master node can recognize whether or not the received response message is a response to the previously transmitted request message. Therefore, even when a plurality of master nodes are provided in the network system, the master node Can reliably exchange messages with desired slave nodes.

【0071】また、請求項2に係るマスタスレーブ間の
通信方式によれば、スレーブノードは、マスタノードか
ら受信完了メッセージを受信したときに、応答メッセー
ジを削除するようにしたから、識別情報の異なる応答メ
ッセージを受信したマスタノードでは、応答メッセージ
の送信元のスレーブノードが他の要求メッセージに対す
る処理中であることを認識することができる。
According to the communication method between the master and the slave according to the second aspect, the slave node deletes the response message when receiving the reception completion message from the master node. The master node that has received the response message can recognize that the slave node that is the source of the response message is processing another request message.

【0072】また、請求項3に係るマスタスレーブ間の
通信方式によれば、識別情報として、要求メッセージの
送信元のマスタノードを特定する局識別情報を設定する
から、識別情報の異なるマスタノードでは、この応答メ
ッセージがどのマスタノードに対する応答メッセージで
あるかを認識することができる。また、請求項4に係る
マスタスレーブ間の通信方式によれば、識別情報とし
て、局識別情報と、この局識別情報で特定される局内で
この要求メッセージを生成したタスクを特定するタスク
識別情報とを設定するから、識別情報の異なる応答メッ
セージを受信したマスタノードでは、この応答メッセー
ジがどのマスタノードのどのタスクに対する応答メッセ
ージであるのかを認識することができる。
Further, according to the communication method between the master and the slave according to the third aspect, since the station identification information for specifying the master node of the transmission source of the request message is set as the identification information, the master node having the different identification information can set the identification information. It is possible to recognize which master node this response message is a response message to. According to the master-slave communication method according to the fourth aspect, the identification information includes station identification information and task identification information for identifying the task that generated the request message in the station identified by the station identification information. Is set, the master node that has received the response message having the different identification information can recognize which response message the master node responds to.

【0073】また、請求項5に係るマスタスレーブ間の
通信方式によれば、スレーブノードは、要求メッセージ
を受信後これに対する受信完了メッセージを受信するま
での間に新たな要求メッセージを受信したときには、こ
れを破棄するようにしたから、他の要求メッセージに対
する処理中のスレーブノードに対して要求メッセージを
送信した際に、誤った応答メッセージが送信されること
を回避することができる。
According to the communication method between the master and the slave according to the fifth aspect, when the slave node receives a new request message after receiving the request message and before receiving a reception completion message corresponding to the request message, Since this is discarded, it is possible to avoid sending an erroneous response message when transmitting a request message to a slave node that is processing another request message.

【0074】また、請求項6に係るマスタスレーブ間の
通信方式によれば、マスタノードは、要求メッセージに
付加した識別情報と、受信した応答メッセージに付加さ
れた識別情報とが一致しないときには、所定時間経過
後、要求メッセージを再送するようにしたから、その応
答メッセージの識別情報に基づき、その送信元のスレー
ブノードのメッセージ授受状態を認識することができ
る。
According to the communication method between the master and the slave according to the sixth aspect, when the identification information added to the request message and the identification information added to the received response message do not match, the master node determines whether or not the identification information has a predetermined value. After a lapse of time, the request message is retransmitted, so that it is possible to recognize the message exchange state of the transmission source slave node based on the identification information of the response message.

【0075】さらに、請求項7に係るマスタスレーブ間
の通信方式によれば、要求メッセージを再送しても応答
メッセージの識別情報が一致しないときには、受信した
応答メッセージに付加された識別情報で特定されるノー
ドの状態を確認し、その結果異常であるときには、この
ノードに替わって受信完了メッセージを送信するように
したから、異常が生じたマスタノードと通信中のスレー
ブノードが、他の要求メッセージを受け付け不可になる
ことを回避することができる。
Further, according to the communication method between the master and the slave according to the seventh aspect, when the identification information of the response message does not match even if the request message is retransmitted, the identification information is specified by the identification information added to the received response message. The node confirms the status of the node, and if it is abnormal, sends a reception completion message instead of this node.Therefore, the slave node communicating with the master node in which the abnormality has occurred transmits another request message. It is possible to avoid being unacceptable.

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

【図1】本発明を適用したネットワークシステムの概略
構成図である。
FIG. 1 is a schematic configuration diagram of a network system to which the present invention is applied.

【図2】メッセージフォーマットの一例である。FIG. 2 is an example of a message format.

【図3】マスタノードにおける、スレーブノードに対す
る処理要求時の処理手順を示すフローチャートである。
FIG. 3 is a flowchart illustrating a processing procedure when a processing request is issued to a slave node in the master node.

【図4】スレーブノードにおける、マスタノードからの
処理要求時の処理手順を示すフローチャートである。
FIG. 4 is a flowchart showing a processing procedure when a processing request is made from a master node in a slave node.

【図5】マスタノードの状態遷移図である。FIG. 5 is a state transition diagram of a master node.

【図6】スレーブノードの状態遷移図である。FIG. 6 is a state transition diagram of a slave node.

【図7】本発明の動作説明に供する説明図である。FIG. 7 is an explanatory diagram for explaining the operation of the present invention;

【図8】本発明の動作説明に供する説明図である。FIG. 8 is an explanatory diagram for explaining the operation of the present invention;

【図9】本発明の動作説明に供する説明図である。FIG. 9 is an explanatory diagram for explaining the operation of the present invention;

【図10】本発明の動作説明に供する説明図である。FIG. 10 is an explanatory diagram for explaining the operation of the present invention;

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

10A,10B マスタノード 20A〜20D スレーブノード 10A, 10B Master node 20A-20D Slave node

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 マスタノードが送信した要求メッセージ
を受信したスレーブノードが当該要求メッセージに対す
る応答メッセージを生成し、マスタノードが送信したデ
ータリードメッセージを受信したスレーブノードが当該
データリードメッセージの送信元のマスタノードに前記
応答メッセージを送信するようにしたマスタスレーブ間
の通信方式において、 前記マスタノードは前記要求メッセージに当該要求メッ
セージを識別するための識別情報を付加して送信し、 前記スレーブノードは前記要求メッセージに付加された
前記識別情報を前記応答メッセージに付加して送信し、 前記マスタノードは受信した応答メッセージに付加され
た識別情報及び前記要求メッセージに付加した識別情報
から受信した応答メッセージと前記要求メッセージとの
対応を判別するようになっていることを特徴とするマス
タスレーブ間の通信方式。
1. A slave node that has received a request message transmitted by a master node generates a response message to the request message, and a slave node that has received a data read message transmitted by the master node is a source of the data read message. In a communication method between a master and a slave configured to transmit the response message to a master node, the master node transmits the request message by adding identification information for identifying the request message, and the slave node transmits the request message. The master node adds the identification information added to the request message to the response message, and transmits the response message.The master node transmits the identification information added to the received response message and the response message received from the identification information added to the request message. Request message and A communication method between a master and a slave, characterized in that the correspondence between the master and the slave is determined.
【請求項2】 前記マスタノードは、受信した応答メッ
セージに付加された識別情報と前記要求メッセージに付
加した識別情報とが一致するとき、前記応答メッセージ
の送信元のスレーブノードに受信完了メッセージを送信
し、前記スレーブノードは、前記受信完了メッセージを
受信するまで前記応答メッセージを保持するようになっ
ていることを特徴とする請求項1記載のマスタスレーブ
間の通信方式。
2. When the identification information added to the received response message matches the identification information added to the request message, the master node transmits a reception completion message to the slave node that has transmitted the response message. 2. The communication method according to claim 1, wherein the slave node holds the response message until the slave node receives the reception completion message.
【請求項3】 前記識別情報は、前記要求メッセージの
送信元のマスタノードを特定する局識別情報であること
を特徴とする請求項1又は2記載のマスタスレーブ間の
通信方式。
3. The master-slave communication method according to claim 1, wherein the identification information is station identification information for specifying a master node that has transmitted the request message.
【請求項4】 前記識別情報は、前記局識別情報とこの
局識別情報で特定される局内で前記要求メッセージを生
成したタスクを特定するためのタスク識別情報とから構
成されることを特徴とする請求項3記載のマスタスレー
ブ間の通信方式。
4. The identification information includes the station identification information and task identification information for identifying a task that has generated the request message in a station specified by the station identification information. The communication method between a master and a slave according to claim 3.
【請求項5】 前記スレーブノードは、前記要求メッセ
ージを受信した後前記受信完了メッセージを受信するま
での間に新たな要求メッセージを受信したときには、こ
れを破棄するようになっていることを特徴とする請求項
1乃至4の何れかに記載のマスタスレーブ間の通信方
式。
5. When the slave node receives a new request message after receiving the request message and before receiving the reception completion message, the slave node discards the new request message. The communication method between a master and a slave according to any one of claims 1 to 4.
【請求項6】 前記マスタノードは、前記要求メッセー
ジに付加した識別情報と、受信した応答メッセージに付
加された識別情報とが一致しないときには、所定時間経
過後、前記要求メッセージを再送するようになっている
ことを特徴とする請求項1乃至5の何れかに記載のマス
タスレーブ間の通信方式。
6. When the identification information added to the request message does not match the identification information added to the received response message, the master node retransmits the request message after a predetermined time has elapsed. The communication method between a master and a slave according to any one of claims 1 to 5, wherein:
【請求項7】 前記マスタノードは、前記要求メッセー
ジを再送しても応答メッセージに付加された識別情報と
前記要求メッセージに付加した識別情報とが一致しない
ときには、受信した応答メッセージに付加された識別情
報で特定されるノードの状態を確認し、前記ノードが異
常であるときには、このノードに替わって前記受信完了
メッセージを送信するようになっていることを特徴とす
る請求項6に記載のマスタスレーブ間の通信方式。
7. The master node, if the identification information added to the response message does not match the identification information added to the request message even after resending the request message, the identification information added to the received response message. The master-slave according to claim 6, wherein a state of the node specified by the information is confirmed, and when the node is abnormal, the reception completion message is transmitted instead of the node. Communication method between.
JP2000068955A 2000-03-13 2000-03-13 Communication method between master and slave Pending JP2001257696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000068955A JP2001257696A (en) 2000-03-13 2000-03-13 Communication method between master and slave

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000068955A JP2001257696A (en) 2000-03-13 2000-03-13 Communication method between master and slave

Publications (1)

Publication Number Publication Date
JP2001257696A true JP2001257696A (en) 2001-09-21

Family

ID=18587927

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000068955A Pending JP2001257696A (en) 2000-03-13 2000-03-13 Communication method between master and slave

Country Status (1)

Country Link
JP (1) JP2001257696A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100420212C (en) * 2002-05-23 2008-09-17 三星电子株式会社 Networking method and device
JP2008306592A (en) * 2007-06-08 2008-12-18 Univ Nagoya In-vehicle communication system, in-vehicle communication device, and in-vehicle communication method
CN103827698A (en) * 2011-07-28 2014-05-28 沙特阿拉伯石油公司 Cluster 3d petrophysical uncertainty modeling
JP2014236453A (en) * 2013-06-05 2014-12-15 富士通株式会社 Information processing device, information processing system and control method for information processing system
JP2016195371A (en) * 2015-04-01 2016-11-17 エヌ・ティ・ティ・コミュニケーションズ株式会社 COMMUNICATION SYSTEM, COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
WO2023045987A1 (en) * 2021-09-23 2023-03-30 华为技术有限公司 Communication method, communication apparatus and terminal

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100420212C (en) * 2002-05-23 2008-09-17 三星电子株式会社 Networking method and device
JP2008306592A (en) * 2007-06-08 2008-12-18 Univ Nagoya In-vehicle communication system, in-vehicle communication device, and in-vehicle communication method
US8448035B2 (en) 2007-06-08 2013-05-21 National University Corporation Nagoya University Communication system adapting for car, communication apparatus adapting for car, and communication method adapting for car
CN103827698A (en) * 2011-07-28 2014-05-28 沙特阿拉伯石油公司 Cluster 3d petrophysical uncertainty modeling
JP2014526044A (en) * 2011-07-28 2014-10-02 サウジ アラビアン オイル カンパニー Cluster 3D petrophysical uncertainty modeling
JP2014236453A (en) * 2013-06-05 2014-12-15 富士通株式会社 Information processing device, information processing system and control method for information processing system
JP2016195371A (en) * 2015-04-01 2016-11-17 エヌ・ティ・ティ・コミュニケーションズ株式会社 COMMUNICATION SYSTEM, COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
WO2023045987A1 (en) * 2021-09-23 2023-03-30 华为技术有限公司 Communication method, communication apparatus and terminal

Similar Documents

Publication Publication Date Title
US5377188A (en) Communication system capable of detecting missed messages
EP0217351B1 (en) Communication control apparatus
EP0777948B1 (en) Duplicate message detection method and apparatus
JPH0712174B2 (en) Message exchange method
JPH0331296B2 (en)
CN101595668A (en) Method and system for establishing logical paths between servers in a coordinated timing network
JPS59218064A (en) Token access controller for controlling transmission of information field by network
JPH10200552A (en) Redundancy method using Ethernet communication
JPH0683775A (en) Data processing system
CN114285807A (en) Message information management method, device, server and storage medium
CN112118322B (en) Data synchronization method of network equipment, network equipment and system
JP2001257696A (en) Communication method between master and slave
JP2003309568A (en) Data upgrade method for switching device under double layer network environment
CN109245979B (en) CANopen master-slave station reliability control method and overall management device thereof
CN109450757B (en) Method for starting CANopen master station and overall management device thereof
CN117082048A (en) Online upgrading method and system for embedded software
JP2003058435A (en) Service control application execution method and system
JP3088683B2 (en) Data communication system
CN112433968A (en) A controller sharing synchronization method and device
JPH11312111A (en) Method for restoring data base and data base management system thereof
TWI839203B (en) Extended server system and data update method
JPH02260055A (en) Inter-computer file transfer system
CN120029549A (en) A command interaction method, storage controller card and interaction system
JP2602587B2 (en) Secondary station initialization method in SDLC communication system
EP0568479A2 (en) Method and system of establishing parallel conversations in a communications network

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20040210

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040217

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040914

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061013

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061024

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070306